/* ============================================================
   China Humanoid Robotics Tracker — Styles
   Branding: Tech Buzz China
   ============================================================ */

/* --- Variables --- */
:root {
  --red: #C0392B;
  --red-dark: #A93226;
  --black: #0D0D0D;
  --ink: #1A1A1A;
  --mid: #4A4A4A;
  --muted: #8A8A8A;
  --border: #E0DDD8;
  --surface: #F7F5F2;
  --elevated: #EDEAE6;
  --white: #FFFFFF;
  --radius-sm: 4px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container: 1152px;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 1.5rem;
}

.header-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--ink);
  letter-spacing: -0.025em;
}

.logo-accent { color: var(--red); }

.logo-subtitle {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-top: -1px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: center;
}

.header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--ink);
  background: var(--surface);
}

.header-external {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.header-external:hover {
  color: var(--red);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--mid);
  background: transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline:hover {
  color: var(--ink);
  background: var(--surface);
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.75rem; }

/* --- Hero Section --- */
.hero-section {
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 2rem 3rem;
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--red) 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.03;
  z-index: 0;
}

.hero-content {
  max-width: 720px;
  animation: fadeUp 0.8s var(--ease-out) both;
  position: relative;
  z-index: 1;
}

.text-accent { color: var(--red); }

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.hero-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}

.hero-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title .text-accent {
  color: var(--red);
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--mid);
  line-height: 1.625;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta:hover {
  background: var(--red-dark);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.2);
  transform: translateY(-1px);
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}

.hero-cta-secondary:hover {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--muted);
  transform: translateY(-1px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--muted);
  border-radius: 12px;
  opacity: 0.4;
  z-index: 1;
}

.hero-scroll-indicator span {
  display: block;
  width: 4px;
  height: 8px;
  background: var(--muted);
  border-radius: 2px;
  margin: 6px auto 0;
  animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: 0.3; }
}

/* --- Page Hero (subpages) --- */
.page-hero {
  padding: 4rem 0 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.page-title .text-accent {
  color: var(--red);
  font-style: italic;
}

.page-subtitle {
  font-size: 1.125rem;
  color: var(--mid);
}

/* --- Search Bar --- */
.directory-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.75rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.08);
}

.search-kbd {
  position: absolute;
  right: 14px;
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.search-input:focus ~ .search-kbd,
.search-input:not(:placeholder-shown) ~ .search-kbd {
  opacity: 1;
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--white);
  padding: 1.25rem 0 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 640px;
  margin: 0 auto;
}

.stat-card {
  text-align: center;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: #D0CDC8;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.stat-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.stat-card-link:hover {
  color: inherit;
  border-color: var(--red);
}

.stat-number-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
}

.stat-number {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
  animation: countUp 0.6s var(--ease-out) both;
}

.stat-prefix, .stat-suffix {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 1.875rem);
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  margin-top: 0.35rem;
}

/* --- Shared Utility Styles --- */
.logo-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--mid);
}

/* --- Analytics / Charts --- */
.analytics-section {
  padding: 3rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.section-header {
  margin-bottom: 2rem;
}

.eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.section-header h2 .text-accent {
  color: var(--red);
  font-style: italic;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--black);
  margin-bottom: 1rem;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  max-height: 280px;
}

.chart-wrapper canvas {
  width: 100% !important;
  max-height: 280px;
}

/* --- Analytics Teaser Card --- */
.analytics-teaser-section {
  padding: 2rem 0;
}

.analytics-teaser-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.analytics-teaser-card:hover {
  border-color: #D0CDC8;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.analytics-teaser-content .eyebrow {
  margin-bottom: 0.25rem;
}

.analytics-teaser-content h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.analytics-teaser-content p {
  font-size: 0.85rem;
  color: var(--mid);
}

.analytics-teaser-arrow {
  font-size: 1.5rem;
  color: var(--red);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.analytics-teaser-card:hover .analytics-teaser-arrow {
  transform: translateX(4px);
}

/* --- Explore Cards (3-up hero cards) --- */
.explore-section {
  padding: 3rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.explore-card {
  display: flex;
  flex-direction: column;
  padding: 2rem 2rem 1.75rem;
  min-height: 240px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: var(--shadow);
}

.explore-card:hover {
  border-color: var(--red);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  color: inherit;
}

.explore-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red);
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.explore-card:hover::before {
  opacity: 1;
}

.explore-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(192, 57, 43, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--red);
}

.explore-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.explore-card p {
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.5;
  flex: 1;
}

.explore-arrow {
  font-size: 1.25rem;
  color: var(--red);
  margin-top: 1.25rem;
  transition: transform 0.2s;
}

.explore-card:hover .explore-arrow {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .explore-grid {
    grid-template-columns: 1fr;
  }
  .explore-card {
    min-height: auto;
  }
}

/* --- Teaser Cards (Directory, Reports links) --- */
.teaser-section {
  padding: 1.5rem 0;
}

.teaser-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.teaser-card:hover {
  border-color: #D0CDC8;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.teaser-content .eyebrow {
  margin-bottom: 0.25rem;
}

.teaser-content h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.teaser-content p {
  font-size: 0.875rem;
  color: var(--mid);
}

.teaser-arrow {
  font-size: 1.5rem;
  color: var(--red);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.teaser-card:hover .teaser-arrow {
  transform: translateX(4px);
}

/* Deep Dives (report showcase) */
.deep-dives-section {
  padding: 3rem 0;
  background: var(--surface);
}

.deep-dives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.deep-dive-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.deep-dive-card:hover {
  border-color: #D0CDC8;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.deep-dive-card .deep-dive-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.deep-dive-card .deep-dive-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  background: var(--surface);
  border-radius: 6px;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deep-dive-card h3 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.deep-dive-card p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--mid);
  flex: 1;
}

.deep-dive-card .deep-dive-date {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.deep-dives-footer {
  text-align: center;
  margin-top: 2rem;
}

.deep-dives-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--red);
  text-decoration: none;
  transition: gap 0.2s;
}

.deep-dives-more:hover {
  gap: 0.625rem;
  color: var(--red-dark);
}

@media (max-width: 768px) {
  .deep-dives-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Mapbox Map Section --- */
.map-section {
  padding: 3rem 0 0;
  border-top: 1px solid var(--border);
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.map-filter-group {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.map-filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 90px;
  flex-shrink: 0;
}

.map-filter-bar {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.map-filter-btn {
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--mid);
  font-size: 0.78rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.map-filter-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.map-filter-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.mapbox-container {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
}

.mapbox-map {
  width: 100%;
  height: 500px;
  border-radius: 0;
}

.map-info-card {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 300px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(55, 65, 81, 0.5);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: #E5E7EB;
  z-index: 10;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.map-info-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: #6B7280;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-info-close:hover { color: #E5E7EB; }

.map-info-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 0.15rem;
}

.map-info-card .map-info-cn {
  font-size: 0.8rem;
  color: #6B7280;
  margin-bottom: 0.5rem;
}

.map-info-card .map-info-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-bottom: 0.6rem;
}

.map-info-card .map-info-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(200, 16, 46, 0.2);
  color: #FF6B6B;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.map-info-card .map-info-desc {
  font-size: 0.8rem;
  color: #D1D5DB;
  line-height: 1.5;
  margin-top: 0.5rem;
}

.map-info-card .map-info-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(55, 65, 81, 0.5);
}

.map-info-stat .val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

.map-info-stat .lbl {
  font-size: 0.6rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.map-info-card .map-info-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.45rem;
  background: rgba(200, 16, 46, 0.15);
  border: 1px solid rgba(200, 16, 46, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: #FF6B6B;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.map-info-card .map-info-btn:hover {
  background: rgba(200, 16, 46, 0.3);
}

/* Mapbox popup override */
.mapboxgl-popup-content {
  background: rgba(17, 24, 39, 0.95) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(55, 65, 81, 0.5) !important;
  border-radius: 8px !important;
  padding: 0 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3) !important;
  color: #E5E7EB;
}

.mapboxgl-popup-tip {
  border-top-color: rgba(17, 24, 39, 0.95) !important;
}

.mapboxgl-popup-close-button {
  color: #6B7280 !important;
  font-size: 18px !important;
  right: 4px !important;
  top: 4px !important;
}

/* --- Robot Anatomy Section --- */
.robot-section {
  padding: 3rem 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.robot-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2rem;
  align-items: start;
}

.robot-diagram-wrapper {
  position: sticky;
  top: 80px;
}

.robot-svg {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  display: block;
}

.robot-shape {
  stroke: transparent;
  stroke-width: 1.5;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.robot-part {
  cursor: pointer;
  transition: filter 0.3s var(--ease-out);
}

.robot-part:hover {
  filter: drop-shadow(0 0 8px rgba(200, 16, 46, 0.4));
}

.robot-part:hover .robot-shape {
  stroke: var(--red);
  stroke-width: 2;
  fill: rgba(200, 16, 46, 0.15) !important;
}

.robot-part.active {
  filter: drop-shadow(0 0 12px rgba(200, 16, 46, 0.5));
}

.robot-part.active .robot-shape {
  stroke: var(--red);
  stroke-width: 2.5;
  fill: rgba(200, 16, 46, 0.2) !important;
}

.robot-badge-text {
  font-size: 7px;
  font-family: var(--font-body);
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.robot-part-label {
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  fill: #999;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.robot-part-label-sm { font-size: 8px; }
.robot-part-label-xs { font-size: 7px; }

.robot-part:hover .robot-part-label,
.robot-part.active .robot-part-label {
  fill: var(--red);
  opacity: 1;
}

/* Robot part buttons (mobile nav) */
.robot-part-buttons {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 1rem;
  justify-content: center;
}

.robot-part-btn {
  padding: 0.3rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--mid);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}

.robot-part-btn:hover,
.robot-part-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Robot detail panel */
.robot-detail {
  min-height: 400px;
}

.robot-detail-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}

.robot-detail-placeholder svg { margin: 0 auto 1rem; }

.robot-detail-placeholder p {
  font-size: 0.9rem;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

.robot-detail-header {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.robot-detail-header h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--black);
}

.robot-detail-header p {
  font-size: 0.85rem;
  color: var(--mid);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.robot-company-count {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.robot-company-count strong {
  color: var(--red);
}

.robot-company-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.robot-company-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.robot-company-item:hover {
  border-color: #ccc;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.robot-company-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.robot-company-logo .logo-placeholder {
  width: 32px;
  height: 32px;
  font-size: 0.65rem;
}

.robot-company-info {
  flex: 1;
  min-width: 0;
}

.robot-company-info .name {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--black);
}

.robot-company-info .meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.05rem;
}

.robot-company-funding {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--black);
  white-space: nowrap;
}

/* Component company pagination */
.part-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.part-page-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.part-page-btn:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
}

.part-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.part-page-info {
  font-size: 0.75rem;
  color: var(--muted);
}

/* --- About Section --- */
.about-page {
  padding-top: 5rem;
}

.about-page .about-section {
  background: var(--white);
  padding: 3rem 0 2rem;
}

.about-section {
  padding: 3rem 0;
  background: var(--surface);
}

.about-content {
  max-width: 680px;
  margin: 0 auto;
}

.about-content h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.75rem;
  color: var(--ink);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.about-content h2 .text-accent,
.trips-content h2 .text-accent,
.teaser-content h2 .text-accent,
.analytics-teaser-content h2 .text-accent {
  color: var(--red);
  font-style: italic;
}

.about-content h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.about-content p {
  font-size: 0.95rem;
  color: var(--mid);
  line-height: 1.625;
  margin-bottom: 0.85rem;
}

/* --- Trips CTA Section --- */
.trips-section {
  padding: 2.5rem 0 3rem;
}

.trips-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
}

.trips-content .eyebrow {
  color: var(--red);
}

.trips-content h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.trips-content p {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.625;
  margin-bottom: 1.75rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.trips-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
}

.trips-btn:hover {
  background: var(--red-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* --- Detail Panel (slide-out) --- */
/* ============ FULL-PAGE PROFILE ============ */
.profile-page {
  min-height: calc(100vh - 200px);
  background: var(--light-bg, #f8f9fa);
  padding: 2rem 1rem 4rem;
}

.profile-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white, #fff);
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  padding: 2.5rem;
}

.profile-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.profile-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 1.5rem;
}

.profile-section-heading {
  font-family: var(--serif, 'Fraunces', serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

@media (max-width: 640px) {
  .profile-container {
    padding: 1.25rem;
    border-radius: 8px;
  }
  .profile-page {
    padding: 1rem 0.5rem 2rem;
  }
}

/* Keep detail-close for backwards compat but hide on profile page */
.profile-page .detail-close { display: none; }

.detail-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 1rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  font-size: 1.3rem;
  color: var(--mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.2s;
}

.detail-close:hover {
  background: var(--surface);
  color: var(--black);
}

.detail-content {
  padding: 2rem 2rem 3rem;
}

/* Detail Panel — inner styles */
.detail-header {
  margin-bottom: 1.5rem;
}

.detail-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.detail-logo .logo-placeholder {
  font-size: 1.3rem;
  width: 64px;
  height: 64px;
}

.detail-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--black);
  letter-spacing: -0.02em;
}

.detail-name-cn {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.detail-pinyin {
  font-size: 0.8rem;
  color: #999;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.6rem;
}

.detail-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(200, 16, 46, 0.08);
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
}

.detail-website {
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 500;
}

.detail-description {
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.5;
  margin-top: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* Tabs */
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--border);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-tab {
  padding: 0.6rem 1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1.5px;
}

.detail-tab:hover { color: var(--ink); }

.detail-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

.detail-tab-content {
  display: none;
}

.detail-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Detail sub-sections */
.detail-section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--black);
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
}

.detail-section-title:first-child { margin-top: 0; }

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-stat-box {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.detail-stat-box .val {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
}

.detail-stat-box .lbl {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
}

/* Funding rounds table */
.funding-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.funding-table th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1.5px solid var(--border);
}

.funding-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.funding-table tr:last-child td { border-bottom: none; }

/* Product cards */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.product-card h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--black);
}

.product-card .product-type {
  font-size: 0.72rem;
  color: var(--red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

.product-card p {
  font-size: 0.82rem;
  color: var(--mid);
  margin-top: 0.35rem;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 1rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--white);
}

.timeline-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-event {
  font-size: 0.85rem;
  color: var(--ink);
  margin-top: 0.15rem;
}

/* News list */
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.news-item:last-child { border-bottom: none; }

.news-date {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 0.15rem;
  min-width: 70px;
}

.news-title {
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.5;
}

.news-title a { color: var(--red); }
.news-title a:hover { text-decoration: underline; }

.news-source {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Video list */
.video-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.video-item:last-child { border-bottom: none; }

.video-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(200, 16, 46, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.video-icon svg { color: var(--red); }

.video-title a {
  font-size: 0.85rem;
  color: var(--red);
  font-weight: 500;
}

.video-date {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Chips (for investors, partners) */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  padding: 0.25rem 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--mid);
}

/* Competitive notes */
.competitive-notes {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.5;
  font-style: italic;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand .logo-text {
  color: var(--ink);
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 280px;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--muted);
}

/* --- Reports Section (Dashboard) --- */
.reports-section {
  padding: 3rem 0 5rem;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.section-header-row .section-header {
  margin-bottom: 0;
}

.reports-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.report-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--red);
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s var(--ease-out);
  border-top: 1px solid transparent;
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
}

.report-row:hover {
  background: var(--bg);
  border-color: var(--border);
  border-left-width: 4px;
}

.report-row-date {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-body);
  min-width: 90px;
  flex-shrink: 0;
}

.report-row-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--black);
  flex: 1;
  line-height: 1.3;
}

.report-row-tags {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.report-component-tag {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-family: var(--font-body);
  color: white;
}

.report-row-arrow {
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.report-row:hover .report-row-arrow {
  transform: translateX(3px);
  color: var(--red);
}

/* --- Company Directory --- */
.directory-section {
  padding: 3rem 0 5rem;
}

.directory-controls {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.directory-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--white) url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
  appearance: none;
  cursor: pointer;
  outline: none;
}

.directory-select:focus {
  border-color: var(--red);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.directory-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.directory-card:hover {
  border-color: #ccc;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.directory-card-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  overflow: hidden;
}

.directory-card-logo .logo-placeholder {
  width: 36px;
  height: 36px;
  font-size: 0.7rem;
}

.directory-card-info {
  flex: 1;
  min-width: 0;
}

.directory-card-info .name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.directory-card-info .name-cn {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.05rem;
}

.directory-card-info .meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

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

.directory-card-right .funding {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--black);
}

.directory-card-right .category {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: rgba(200, 16, 46, 0.08);
  color: var(--red);
  font-size: 0.6rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.directory-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.directory-page-btn {
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0 0.5rem;
}

.directory-page-btn:hover {
  border-color: #ccc;
  background: var(--surface);
}

.directory-page-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  font-weight: 600;
}

.directory-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.directory-page-info {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0.5rem;
}

.directory-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Reports in Robot Anatomy Panel --- */
/* Report link shown inline in component header */
.robot-report-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  transition: opacity 0.15s;
}

.robot-report-link:hover {
  opacity: 0.75;
}

.robot-report-link .report-label {
  font-weight: 400;
  color: var(--muted);
  margin-right: 0.15rem;
}

.robot-report-link .report-arrow {
  font-size: 0.9rem;
  transition: transform 0.15s;
}

.robot-report-link:hover .report-arrow {
  transform: translateX(2px);
}

/* --- Report Page Styles --- */
.report-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  padding: 0.75rem 0;
  transition: color 0.2s;
  font-family: var(--font-body);
}

.report-back:hover {
  color: var(--red);
}

.report-hero {
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.report-hero-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.report-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--black);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.report-hero-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.85rem;
  font-family: var(--font-body);
}

.report-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.report-hero-summary {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: var(--mid);
  line-height: 1.625;
  max-width: 720px;
}

.report-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
}

.report-toc {
  position: sticky;
  top: 2rem;
  align-self: start;
}

.report-toc-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
}

.report-toc a {
  display: block;
  font-size: 0.82rem;
  color: var(--mid);
  text-decoration: none;
  padding: 0.35rem 0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
  transition: all 0.2s;
  font-family: var(--font-body);
  line-height: 1.5;
}

.report-toc a:hover,
.report-toc a.active {
  color: var(--red);
  border-left-color: var(--red);
}

.report-body {
  max-width: 720px;
}

.report-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.report-body h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.report-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.report-body p {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
}

.report-body ul, .report-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.report-body li {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink);
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
}

.report-body strong {
  font-weight: 600;
  color: var(--black);
}

.report-callout {
  background: var(--surface);
  border-left: 4px solid var(--red);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
}

.report-callout p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.report-callout strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--red);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.report-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--surface);
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--border);
}

.report-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--mid);
}

.report-table tr:hover td {
  background: rgba(247,247,247,0.5);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; justify-content: center; }
  .header-nav { display: none; }
  .hero-title { font-size: clamp(2rem, 6vw, 3rem); }
  .trips-card { padding: 2rem 1.5rem; }
  .robot-layout { grid-template-columns: 1fr; }
  .robot-diagram-wrapper { position: static; }
  .robot-svg { max-width: 240px; }
  .robot-part-buttons { display: flex; }
  .mapbox-map { height: 400px; }
  .map-info-card { position: static; width: 100%; margin-top: -1px; border-radius: 0; }
  .report-layout { grid-template-columns: 1fr; gap: 0; }
  .report-toc { position: static; margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
  .report-row-tags { display: none; }
  .directory-grid { grid-template-columns: 1fr; }
  .section-header-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .report-row { flex-wrap: wrap; }
  .report-row-date { min-width: auto; }
  .detail-content { padding: 1.5rem 1.25rem 2rem; }
  .detail-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { justify-content: center; }
}
