@import url('https://fonts.googleapis.com/css2?family=Lora:ital@1&family=DM+Sans:ital,wght@0,400;0,500;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-light: #f0f3f7;
  --text-primary: #334155;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-light: #dbeafe;
  --accent-faint: #eff6ff;
  --green: #22c55e;
  --green-faint: #dcfce7;
  --ripple: rgba(59, 130, 246, 0.06);
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
}

/* ── Split layout ── */
.split {
  display: flex;
  height: 100vh;
}

.panel {
  overflow-y: auto;
}

/* ── Left panel ── */
.left {
  flex: 0 0 42%;
  max-width: 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 3rem 2rem 4rem;
  position: relative;
  transition: flex 0.3s ease, max-width 0.3s ease;
}

.left-content {
  max-width: 400px;
}

h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: 2.8rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}

.description {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.visitor-id {
  color: var(--green);
  font-weight: 600;
}

.description em {
  color: var(--text-primary);
  font-style: normal;
  font-weight: 500;
}

/* ── Buttons ── */
.actions {
  display: flex;
  gap: 0.6rem;
  margin: 2rem 0 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-fire {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-faint);
}

/* ── Footer ── */
.footer {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  gap: 1.5rem;
  font-size: 0.78rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── Divider ── */
.divider {
  width: 1px;
  background: var(--border);
}

/* Left panel expands when all strips collapsed */
.left.strips-collapsed {
  flex: 1;
  max-width: none;
}

/* ── Strips container (replaces .right) ── */
.strips-container {
  display: flex;
  flex: 1;
  min-width: 0;
  transition: flex 0.3s ease;
  z-index: 1;
}

/* ── Individual strip ── */
.strip {
  flex: 0 0 36px;
  min-width: 36px;
  max-width: 36px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: flex 0.3s ease, min-width 0.3s ease, max-width 0.3s ease, opacity 0.4s ease;
  border-left: 1px solid var(--border);
}

.strip.expanded {
  flex: 1;
  min-width: 0;
  max-width: none;
}

/* ── Strip header ── */
.strip-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0.7rem 0.25rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  user-select: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.strip-header:hover {
  color: var(--accent);
}

.strip-label {
  flex: 1;
  white-space: nowrap;
}

.strip-chevron {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Collapsed strip: vertical header */
.strip:not(.expanded) .strip-header {
  flex-direction: column;
  align-items: center;
  border-bottom: none;
  padding: 0.7rem 0;
  gap: 0.75rem;
  height: 100%;
}

.strip:not(.expanded) .strip-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.65rem;
}

.strip:not(.expanded) .presence-count {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.6rem;
}

/* Strip content: hidden when collapsed */
.strip-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
}

.strip:not(.expanded) .strip-content {
  display: none;
}

.strip.expanded .strip-content {
  padding: 0.5rem 1.5rem 1.5rem;
}

/* ── Pipeline status ── */
.pipeline-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
  letter-spacing: 0.02em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse 2.5s ease-in-out infinite;
}

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

/* ── Presence count ── */
.presence-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* ── Stream ── */
.stream {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  line-height: 1.85;
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.event-line {
  padding: 3px 0.75rem;
  border-radius: 4px;
  position: relative;
  margin: 1px 0;
}

.event-line .time {
  color: var(--text-muted);
}

.event-line .etype {
  color: var(--accent);
}

.event-line .visitor {
  color: var(--accent);
}

.event-line .detail {
  color: var(--text-secondary);
}

.event-line .visitor-you {
  color: var(--green);
  font-weight: 500;
}

/* ── Warehouse strip ── */
.warehouse-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.warehouse-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.warehouse-sql {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.warehouse-sql code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre;
}

.warehouse-link {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.warehouse-link:hover {
  color: #93c5fd;
}

/* ── Analytics grid ── */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  font-family: 'JetBrains Mono', monospace;
}

.metric-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metric-group-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.75rem;
}

.metric-label {
  color: var(--text-secondary);
}

.metric-value {
  color: var(--text-primary);
  font-weight: 500;
}

.analytics-cache-age {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: right;
}

/* ── Chip row ── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

/* ── Warehouse / insight chips (light theme) ── */
.warehouse-chip,
.insight-chip {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.warehouse-chip:hover,
.insight-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Warehouse textarea (readonly) ── */
.warehouse-textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 1rem 1.25rem;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.7;
  resize: none;
  margin-bottom: 0.75rem;
  cursor: default;
}

.warehouse-textarea[readonly] {
  opacity: 0.85;
}

.warehouse-textarea:focus {
  outline: none;
}

/* ── Query results (shared by warehouse + analytics) ── */
.query-results {
  margin-top: 0.75rem;
}

.query-results:empty {
  display: none;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
}

.results-table th {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 500;
  font-size: 0.68rem;
}

.results-table td {
  padding: 0.35rem 0.6rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}

.results-table tbody tr:hover {
  background: var(--ripple);
}

.query-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: right;
}

.query-loading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
}

.query-error {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #ef4444;
  padding: 0.75rem 0;
}

.query-empty {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
}

/* ── Ask a question (analytics strip) ── */
.ask-divider {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.25rem 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ask-divider::before,
.ask-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* Collapsible SQL in ask results */
.ask-sql-details {
  margin-bottom: 0.5rem;
}

.ask-sql-details summary {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ask-sql-block {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 0.4rem;
  overflow-x: auto;
}

.ask-sql-block code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre;
}


/* ── Exhibit close button ── */
.exhibit-close {
  position: fixed;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 250;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  transition: color 0.2s;
  display: none;
}

body.exhibit-mode .exhibit-close {
  display: block;
}

.exhibit-close:hover {
  color: #e2e8f0;
}

/* ── Insight summary ── */
.insight-summary {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 4px;
  border-left: 2px solid var(--accent);
}

/* ── Analytics placeholder ── */
.analytics-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

/* ── Journey container ── */
.journey-container {
  padding: 0.5rem 0 0;
}

.journey-container:empty {
  display: none;
}

/* ── Journey card ── */
.journey-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  max-width: 420px;
}

.journey-header {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.journey-steps {
  margin-bottom: 0.25rem;
}

.journey-step {
  padding: 0.3rem 0;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.journey-step.done {
  color: var(--green);
}

.step-icon {
  display: inline-block;
  width: 1.2em;
  text-align: center;
}

/* ── Journey sections (transform + metrics) ── */
.journey-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.journey-section-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.journey-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1rem;
}

.journey-field-key {
  color: var(--text-muted);
}

.journey-field-value {
  color: var(--text-primary);
}

.journey-metric-change {
  color: var(--green);
  font-weight: 500;
}

/* ── Scrollbar ── */
.stream::-webkit-scrollbar { width: 5px; }
.stream::-webkit-scrollbar-track { background: transparent; }
.stream::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.panel::-webkit-scrollbar { width: 5px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Subtle water texture on background ── */
.left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 40%);
  pointer-events: none;
}

/* ══════════════════════════════════════════
   Exhibit overlay
   ══════════════════════════════════════════ */

/* Mobile-only inline content — hidden on desktop */
.exhibit-mobile-content {
  display: none;
}

.exhibit-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.exhibit-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.exhibit-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 3rem 2rem 4rem;
  overflow-y: auto;
}

/* Steps: hidden by default, shown when active */
.exhibit-step {
  display: none;
}

.exhibit-step.active {
  display: block;
}

.exhibit-hero-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

.exhibit-hero-panel .exhibit-hero-image {
  max-width: 400px;
  width: 70%;
  opacity: 0.85;
}

.exhibit-mobile-content .exhibit-hero-image {
  max-width: 240px;
  width: 100%;
  margin-bottom: 1.25rem;
  opacity: 0.9;
}

.exhibit-heading {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 400;
  font-style: italic;
  color: #e2e8f0;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.exhibit-text {
  font-size: 0.925rem;
  line-height: 1.75;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.exhibit-text-muted {
  color: #64748b;
  font-size: 0.85rem;
}

.exhibit-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.exhibit-actions {
  margin: 1.5rem 0 1rem;
}

/* ── Exhibit navigation ── */
.exhibit-nav {
  position: absolute;
  bottom: 2rem;
  left: 4rem;
  right: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.exhibit-btn-nav {
  background: transparent;
  border-color: #475569;
  color: #94a3b8;
}

.exhibit-btn-nav:hover {
  border-color: #93c5fd;
  color: #93c5fd;
}

.exhibit-btn-exit {
  border-color: #f59e0b;
  color: #f59e0b;
}

.exhibit-btn-exit:hover {
  border-color: #fbbf24;
  color: #fbbf24;
}

.exhibit-step-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #475569;
  flex: 1;
  text-align: center;
}

/* ── Exhibit-mode overrides ── */

/* Strips sit above overlay */
body.exhibit-mode .strips-container {
  z-index: 200;
  position: relative;
}

/* In exhibit mode, strips hidden by default */
body.exhibit-mode .strip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

/* Strips become visible at the correct exhibit step */
body.exhibit-mode .strip.exhibit-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Dark theme overrides for strips during exhibit */
body.exhibit-mode .strip {
  background: #1e293b;
  border-left-color: #334155;
}

body.exhibit-mode .strip-header {
  color: #e2e8f0;
  border-bottom-color: #334155;
}

body.exhibit-mode .strip-header:hover {
  color: #93c5fd;
}

body.exhibit-mode .strip-chevron {
  color: #64748b;
}

body.exhibit-mode .pipeline-status {
  color: #64748b;
}

body.exhibit-mode .stream {
  color: #94a3b8;
}

body.exhibit-mode .event-line .time {
  color: #64748b;
}

body.exhibit-mode .event-line .etype {
  color: #93c5fd;
}

body.exhibit-mode .event-line .visitor {
  color: #93c5fd;
}

body.exhibit-mode .event-line .visitor-you {
  color: #4ade80;
}

body.exhibit-mode .dot {
  background: #4ade80;
}

body.exhibit-mode .presence-count {
  color: #64748b;
}

/* Hide the divider during exhibit */
body.exhibit-mode .divider {
  background: #334155;
}

/* Hide the left panel during exhibit (overlay replaces it) */
body.exhibit-mode .panel.left {
  opacity: 0;
  pointer-events: none;
}

/* Dark journey card in exhibit */
body.exhibit-mode .journey-card {
  background: #1e293b;
  border-color: #334155;
}

body.exhibit-mode .journey-header {
  color: #e2e8f0;
}

body.exhibit-mode .journey-step {
  color: #64748b;
}

body.exhibit-mode .journey-step.done {
  color: #4ade80;
}

body.exhibit-mode .journey-section {
  border-top-color: #334155;
}

body.exhibit-mode .journey-section-label {
  color: #64748b;
}

body.exhibit-mode .journey-field-key {
  color: #64748b;
}

body.exhibit-mode .journey-field-value {
  color: #e2e8f0;
}

body.exhibit-mode .journey-metric-change {
  color: #4ade80;
}

/* Exhibit fire button — dark variant */
body.exhibit-mode .btn-fire {
  border-color: #3b82f6;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
}

body.exhibit-mode .btn-fire:hover {
  background: rgba(59, 130, 246, 0.25);
}

/* ── Questionnaire ── */
.exhibit-questionnaire {
  margin: 1.5rem 0;
}

.exhibit-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.exhibit-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.exhibit-textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

.exhibit-textarea:disabled {
  opacity: 0.5;
}

.exhibit-textarea-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.char-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #475569;
}

.exhibit-confirmation {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #4ade80;
  margin-top: 0.5rem;
}

/* ── Shop strip ── */
.shop-content {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.shop-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.shop-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--surface);
  position: relative;
}

.shop-card-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.shop-card-description {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.shop-card-price {
  margin-bottom: 0.75rem;
}

.shop-price-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.shop-amount-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.shop-currency {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.shop-amount-input {
  width: 80px;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
}

.shop-amount-input:focus {
  outline: none;
  border-color: var(--accent);
}

.shop-fixed-price {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
}

.shop-buy-btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.shop-buy-btn.active {
  opacity: 1;
  cursor: pointer;
  pointer-events: auto;
}

.shop-coming-soon {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.5rem;
}

/* Shop dark overrides (exhibit mode) */
body.exhibit-mode .shop-card {
  background: #1e293b;
  border-color: #334155;
}

body.exhibit-mode .shop-card-name {
  color: #e2e8f0;
}

body.exhibit-mode .shop-card-description {
  color: #94a3b8;
}

body.exhibit-mode .shop-price-label {
  color: #64748b;
}

body.exhibit-mode .shop-currency {
  color: #64748b;
}

body.exhibit-mode .shop-amount-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.exhibit-mode .shop-amount-input:focus {
  border-color: #3b82f6;
}

body.exhibit-mode .shop-fixed-price {
  color: #e2e8f0;
}

body.exhibit-mode .shop-coming-soon {
  color: #475569;
}

/* Insight summary dark */
body.exhibit-mode .insight-summary {
  background: #1e293b;
  color: #cbd5e1;
  border-left-color: #3b82f6;
}

/* Analytics placeholder dark */
body.exhibit-mode .analytics-placeholder {
  color: #475569;
}

/* Warehouse strip dark overrides */
body.exhibit-mode .warehouse-label {
  color: #64748b;
}

body.exhibit-mode .warehouse-link {
  color: #93c5fd;
}

body.exhibit-mode .warehouse-link:hover {
  color: #bfdbfe;
}

/* Analytics grid dark overrides */
body.exhibit-mode .metric-group-label {
  color: #64748b;
}

body.exhibit-mode .metric-label {
  color: #94a3b8;
}

body.exhibit-mode .metric-value {
  color: #e2e8f0;
}

body.exhibit-mode .analytics-cache-age {
  color: #475569;
}

/* Interactive elements dark overrides */
body.exhibit-mode .warehouse-chip,
body.exhibit-mode .insight-chip {
  border-color: #475569;
  color: #94a3b8;
  background: transparent;
}

body.exhibit-mode .warehouse-chip:hover,
body.exhibit-mode .insight-chip:hover {
  border-color: #93c5fd;
  color: #93c5fd;
}

body.exhibit-mode .results-table th {
  border-bottom-color: #334155;
  color: #64748b;
}

body.exhibit-mode .results-table td {
  border-bottom-color: #1e293b;
  color: #e2e8f0;
}

body.exhibit-mode .results-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

body.exhibit-mode .query-meta {
  color: #475569;
}

body.exhibit-mode .query-loading {
  color: #64748b;
}

body.exhibit-mode .query-error {
  color: #f87171;
}

body.exhibit-mode .query-empty {
  color: #475569;
}

body.exhibit-mode .ask-divider {
  color: #64748b;
}

body.exhibit-mode .ask-divider::before,
body.exhibit-mode .ask-divider::after {
  background: #334155;
}

body.exhibit-mode .ask-sql-details summary {
  color: #64748b;
}

/* Exhibit link style */
.exhibit-link {
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(147, 197, 253, 0.3);
  transition: border-color 0.2s;
}

.exhibit-link:hover {
  border-bottom-color: #93c5fd;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  body {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  .split {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .left {
    flex: none;
    max-width: 100%;
    padding: 2rem 1.5rem 1.5rem;
    justify-content: flex-start;
  }

  .left-content {
    max-width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  .actions {
    margin: 1.25rem 0 0.5rem;
  }

  .footer {
    padding-top: 0.75rem;
    padding-bottom: 0;
  }

  .divider {
    width: 100%;
    height: 1px;
  }

  /* Strips stack vertically on mobile */
  .strips-container {
    flex-direction: column;
    flex: 1;
    min-height: 50vh;
  }

  .strip {
    flex: 0 0 40px;
    min-width: 0;
    max-width: 100%;
    min-height: 40px;
    max-height: 40px;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .strip.expanded {
    flex: 1;
    max-height: none;
  }

  .strip:not(.expanded) .strip-header {
    flex-direction: row;
    height: auto;
    padding: 0.7rem 1.5rem;
    gap: 0.5rem;
  }

  .strip:not(.expanded) .strip-label,
  .strip:not(.expanded) .presence-count {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    font-size: 0.72rem;
  }

  .strip:not(.expanded) .presence-count {
    font-size: 0.65rem;
  }

  .strip.expanded .strip-content {
    padding: 0.5rem 1.5rem 1.5rem;
  }

  .pipeline-status {
    font-size: 0.62rem;
    padding: 0.4rem 0;
  }

  .journey-card {
    max-width: 100%;
    padding: 1rem 1.1rem;
  }

  .journey-header {
    font-size: 0.76rem;
  }

  .journey-fields {
    gap: 0.15rem 0.75rem;
  }

  /* Exhibit mobile — self-contained walkthrough, no strips */
  .exhibit-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 2rem 1.5rem 6rem;
    justify-content: flex-start;
  }

  .exhibit-heading {
    font-size: 1.4rem;
  }

  .exhibit-nav {
    position: fixed;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1rem;
    z-index: 110;
    background: rgba(15, 23, 42, 0.95);
    padding: 0.5rem 0;
  }

  /* Hide strips entirely during exhibit on mobile */
  body.exhibit-mode .strips-container {
    display: none;
  }

  /* Hide desktop hero panel on mobile — image shown inline instead */
  .exhibit-hero-panel {
    display: none !important;
  }

  /* Show inline content in exhibit steps */
  .exhibit-mobile-content {
    display: block;
    margin-top: 1.25rem;
  }

  /* Hide desktop-only text */
  .desktop-only {
    display: none;
  }

  /* Mobile mini-stream */
  .mobile-stream {
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.75rem;
    border-top: 1px solid #334155;
    padding-top: 0.5rem;
  }

  /* Mobile inline results sizing */
  .exhibit-mobile-content .query-results table {
    font-size: 0.7rem;
  }

  .exhibit-mobile-content .warehouse-textarea {
    min-height: 60px;
    font-size: 0.7rem;
  }

  .exhibit-mobile-content .analytics-grid {
    font-size: 0.8rem;
  }

  .exhibit-mobile-content .shop-cards {
    flex-direction: column;
  }

  /* Mobile interactive elements */
  .warehouse-textarea {
    min-height: 80px;
    font-size: 0.7rem;
  }

  .chip-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .warehouse-chip,
  .insight-chip {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
  }

  .exhibit-close {
    top: 0.75rem;
    left: 0.75rem;
  }

  .shop-cards {
    gap: 0.75rem;
  }

  .shop-card {
    padding: 1rem;
  }
}

/* Checkout error message */
.shop-checkout-error {
  font-size: 0.7rem;
  color: #ef4444;
  margin-top: 0.35rem;
}

/* Checkout success toast */
.checkout-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #e2e8f0;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 0.8rem;
  z-index: 10000;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.checkout-toast-fade {
  opacity: 0;
}
