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

:root {
  /* Figma-like light file canvas */
  --bg: #e5e5e5;
  --bg-canvas: #dddddd;
  --bg-elevated: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-hover: #f5f5f5;
  --bg-panel: #ffffff;
  --border: #e6e6e6;
  --border-strong: #d0d0d0;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-quiet: #9a9a9a;
  --accent: #0d99ff;
  --accent-soft: rgba(13, 153, 255, 0.12);
  --accent-muted: #007be5;
  --success: #6a9b7a;
  --success-soft: rgba(106, 155, 122, 0.12);
  --frame-chrome: transparent;
  --frame-label: #757575;
  --frame-border: #cfcfcf;
  --frame-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.06);
  --arrow: #b0b0b0;
  --topbar-h: 48px;
  --sidebar-w: 248px;
  --radius: 8px;
  --radius-sm: 6px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* —— Top bar (white Figma chrome) —— */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  user-select: none;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.topbar-left,
.topbar-center,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-left {
  flex: 1;
}

.topbar-center {
  flex: 0 0 auto;
  gap: 8px;
}

.topbar-right {
  flex: 1;
  justify-content: flex-end;
}

.title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.step-count {
  font-size: 12px;
  color: var(--text-quiet);
  white-space: nowrap;
}

.view-toggle,
.mode-toggle {
  display: flex;
  background: #f0f0f0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 2px;
  gap: 1px;
}

.toggle-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.toggle-btn:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.toggle-btn.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.toggle-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tool-btn {
  appearance: none;
  border: none;
  background: #ffffff;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  min-width: 30px;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.tool-btn:hover {
  background: var(--bg-hover);
  
  color: var(--text);
}

.zoom-indicator {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-quiet);
  min-width: 40px;
  text-align: center;
}

/* —— Sidebar (white panel) —— */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  z-index: 90;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 14px 16px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-quiet);
  flex-shrink: 0;
}

.step-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 16px;
  scrollbar-width: thin;
  scrollbar-color: #d0d0d0 transparent;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.step-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.step-item.active {
  background: var(--accent-soft);
  color: var(--text);
}

.step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f0f0f0;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-quiet);
}

.step-item.active .step-num {
  background: rgba(13, 153, 255, 0.16);
  border-color: transparent;
  color: var(--accent-muted);
}

.step-label {
  line-height: 1.35;
  color: inherit;
}

/* —— Viewport / canvas (Figma gray) —— */
.viewport {
  position: fixed;
  top: var(--topbar-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  overflow: hidden;
  background: var(--bg-canvas);
  cursor: grab;
  touch-action: none;
}

.viewport.panning {
  cursor: grabbing;
}

.viewport.space-pan {
  cursor: grab;
}

.canvas-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.canvas-world.smooth-camera {
  transition: transform 200ms ease-out;
}

.frames {
  position: relative;
  z-index: 2;
}

.connectors {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

/* Artboards — white frames with label above (Figma-like) */
.frame {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  cursor: pointer;
}

.frame-chrome {
  background: transparent;
  border-radius: 0;
  padding: 0 2px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
}

.frame-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 16px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ececec;
  color: #6b6b6b;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.frame.active .frame-badge {
  background: var(--accent-soft);
  color: var(--accent-muted);
}

.frame-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--frame-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame.active .frame-title {
  color: #4a4a4a;
}

.frame-body {
  background: #ffffff;
  border: 1px solid var(--frame-border);
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
  box-shadow: var(--frame-shadow);
}

.frame.active .frame-chrome {
  background: transparent;
}

.frame.active .frame-body {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--frame-shadow);
}

.frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  image-rendering: auto;
  -ms-interpolation-mode: nearest-neighbor;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.connector-path {
  display: none;
  fill: none;
  stroke: var(--arrow);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  marker-end: url(#arrowhead);
}

/* Hint / nav-step kept for compatibility; elements removed from HTML */
.hint {
  display: none;
}

.nav-step {
  display: none !important;
}

body.mode-videos .nav-step {
  display: none !important;
}

.empty-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  z-index: 5;
  pointer-events: none;
}

.board-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.board-loading-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent, #0d99ff);
  animation: board-spin 0.7s linear infinite;
}

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

body.mode-videos .board-only {
  display: none !important;
}

body.mode-videos .step-count {
  display: none;
}

/* —— Videos panel (light, players stay dark) —— */
.videos-panel {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  overflow: auto;
  padding: 28px 32px 40px;
  background: #f0f0f0;
  scrollbar-width: thin;
  scrollbar-color: #d0d0d0 transparent;
}

.videos-panel[hidden] {
  display: none !important;
}

.videos-intro {
  max-width: 960px;
  margin: 0 auto 24px;
}

.videos-heading {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--text);
}

.videos-lede {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 64ch;
}

.videos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

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

  .videos-panel {
    padding: 20px 16px 32px;
  }
}

.video-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

.video-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f0f0f0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.video-badge-mobile {
  background: #f0f0f0;
  color: var(--text-muted);
}

.video-card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.video-stage {
  position: relative;
  background: #1a1a1a;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-stage-mobile {
  aspect-ratio: 9 / 16;
  max-height: 70vh;
  margin: 0 auto;
  width: 100%;
  max-width: 360px;
}

.video-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-stage.is-missing video {
  display: none;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #222;
}

.video-placeholder[hidden] {
  display: none !important;
}

.video-placeholder-inner {
  text-align: center;
  max-width: 280px;
}

.video-placeholder-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 13px;
  padding-left: 2px;
  background: rgba(255, 255, 255, 0.04);
}

.video-placeholder-title {
  font-size: 13px;
  font-weight: 500;
  color: #e5e5e5;
  margin-bottom: 8px;
  line-height: 1.35;
}

.video-placeholder-path {
  font-size: 11px;
  color: #888;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-all;
}

.video-caption {
  padding: 12px 14px 14px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: #ffffff;
}

/* —— Hub view (light Figma Recents) —— */
body.view-hub,
body.view-emails {
  overflow: auto;
  --hub-bg: #f5f5f5;
  --hub-card: #ffffff;
  --hub-border: #e6e6e6;
  --hub-border-strong: #d4d4d4;
  --hub-text: #1a1a1a;
  --hub-text-muted: #757575;
  --hub-text-quiet: #9a9a9a;
  --hub-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --hub-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --hub-placeholder: #ececec;
  --hub-radius: 10px;
  background: var(--hub-bg);
  color: var(--hub-text);
}

body.view-hub .funnel-app {
  display: none !important;
}

body.view-funnel .hub {
  display: none !important;
}

body.view-funnel {
  overflow: hidden;
}

.hub {
  min-height: 100%;
  background: var(--hub-bg, var(--bg));
}

.hub-header {
  padding: 28px 32px 8px;
  border-bottom: none;
}

.hub-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.hub-kicker {
  display: none;
}

.hub-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  color: var(--hub-text, var(--text));
}

body.view-hub .hub-subtitle {
  display: none;
}

.hub-subtitle {
  font-size: 13px;
  line-height: 1.5;
  color: var(--hub-text-muted, var(--text-muted));
  max-width: 52ch;
  font-weight: 400;
}

.hub-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 32px 64px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1100px) {
  .hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

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

  .hub-header,
  .hub-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hub-title {
    font-size: 18px;
  }
}

/* Figma Recents anatomy: preview + thin footer */
.funnel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--hub-card, #fff);
  border: 1px solid var(--hub-border, #e6e6e6);
  border-radius: var(--hub-radius, 10px);
  text-align: left;
  color: inherit;
  font: inherit;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--hub-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  min-height: 0;
  cursor: pointer;
}

.funnel-card::before {
  display: none;
}

.funnel-card:not(.is-disabled):hover {
  border-color: var(--hub-border-strong, #d4d4d4);
  box-shadow: var(--hub-shadow-hover);
  background: var(--hub-card, #fff);
  transform: translateY(-1px);
}

.funnel-card:not(.is-disabled):focus-visible {
  outline: 2px solid #0d99ff;
  outline-offset: 2px;
}

.funnel-card.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.funnel-card-preview {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--hub-placeholder, #ececec);
  overflow: hidden;
}

.funnel-card-preview-placeholder {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #f0f0f0 0%, #e4e4e4 100%);
}

.funnel-card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  background: var(--hub-placeholder, #ececec);
}

.funnel-card-footer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px 12px;
  background: var(--hub-card, #fff);
  border-top: 1px solid transparent;
}

.funnel-card-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 5px;
  background: #eef6ff;
  background: color-mix(in srgb, var(--icon-color, #0d99ff) 14%, #ffffff);
  color: var(--icon-color, #0d99ff);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1;
}

.funnel-card-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.funnel-card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--hub-text, #1a1a1a);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funnel-card-meta {
  display: block;
  margin-top: 0;
  font-size: 11px;
  font-weight: 400;
  color: var(--hub-text-muted, #757575);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.funnel-share {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  min-width: 0;
}

.funnel-share-url {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
  color: #8a8a8a;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.funnel-share-url:hover {
  color: #333;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.funnel-share-url:focus-visible {
  outline: 2px solid #0d99ff;
  outline-offset: 1px;
  border-radius: 2px;
}

/* Compact board-header Open control (no full URL in topbar) */
.board-share-open {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 8px;
  margin-left: 2px;
  border-radius: var(--radius-sm);
  border: none;
  background: #ffffff;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.board-share-open:hover {
  background: var(--bg-hover);
  
  color: var(--text);
}

.board-share-open:focus-visible {
  outline: 2px solid #0d99ff;
  outline-offset: 1px;
}

.board-share-open[hidden] {
  display: none !important;
}

/* Legacy pieces kept inert if referenced elsewhere */
.funnel-card-top,
.funnel-card-slug,
.funnel-card-badge,
.funnel-card-desc,
.funnel-card-chip,
.funnel-card-cta {
  display: none;
}

.hub-more {
  margin-top: 28px;
  padding: 14px 16px;
  background: var(--hub-card, #fff);
  border: 1px solid var(--hub-border, #e6e6e6);
  border-radius: var(--hub-radius, 10px);
  box-shadow: var(--hub-shadow);
}

.hub-more-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--hub-text, #1a1a1a);
}

.hub-more-summary {
  font-size: 12px;
  line-height: 1.5;
  color: var(--hub-text-muted, #757575);
  max-width: 72ch;
  margin-bottom: 10px;
}

.hub-more-link {
  font-size: 12px;
  font-weight: 500;
  color: #0d99ff;
  text-decoration: none;
}

.hub-more-link:hover {
  color: #007be5;
}

body.view-hub .back-link,
body.view-emails .back-link {
  border-color: transparent;
  color: var(--hub-text-muted, #757575);
  background: var(--hub-card, #fff);
}

body.view-hub .back-link:hover,
body.view-emails .back-link:hover {
  color: var(--hub-text, #1a1a1a);
  border-color: var(--hub-border-strong, #d4d4d4);
  background: #fafafa;
}

/* —— Back link in funnel topbar —— */
.back-link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.back-link:hover {
  color: var(--text);
  
  background: var(--bg-hover);
}

/* —— Marketing email gallery —— */
body.view-emails {
  overflow: auto;
}

body.view-emails .hub,
body.view-emails .funnel-app {
  display: none !important;
}

.emails-page {
  min-height: 100%;
  background: var(--hub-bg, var(--bg));
  color: var(--hub-text, var(--text));
}

.emails-page[hidden] {
  display: none !important;
}

.emails-header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--hub-border, var(--border));
}

.emails-header .back-link {
  margin-bottom: 24px;
}

.emails-body {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 32px 64px;
}

.email-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.emails-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border: 1px dashed var(--hub-border-strong, var(--border-strong));
  border-radius: var(--hub-radius, var(--radius));
  color: var(--hub-text-muted, var(--text-muted));
  text-align: center;
  font-size: 13px;
  background: var(--hub-card, #fff);
}

.email-card {
  overflow: hidden;
  background: var(--hub-card, #fff);
  border: 1px solid var(--hub-border, var(--border));
  border-radius: var(--hub-radius, var(--radius));
  box-shadow: var(--hub-shadow);
}

.email-card-image {
  display: block;
  width: 100%;
  min-height: 180px;
  object-fit: contain;
  background: #f0f0f0;
}

.email-card-image-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hub-text-muted, var(--text-muted));
  font-size: 12px;
}

.email-card-content {
  padding: 12px 14px 14px;
}

.email-card-meta {
  color: var(--hub-text-quiet, var(--text-quiet));
  font-size: 11px;
  margin-bottom: 6px;
}

.email-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--hub-text, var(--text));
}

.email-card-link {
  color: #0d99ff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.email-card-link:hover {
  color: #007be5;
}

/* —— Hub email entry —— */
.hub-email-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--hub-card, #fff);
  border: 1px solid var(--hub-border, #e6e6e6);
  border-radius: var(--hub-radius, 10px);
  box-shadow: var(--hub-shadow);
}

.hub-email-kicker {
  display: none;
}

.hub-email-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--hub-text, var(--text));
}

.hub-email-summary {
  color: var(--hub-text-muted, var(--text-muted));
  font-size: 12px;
}

.hub-email-link {
  flex-shrink: 0;
  color: #0d99ff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.hub-email-link:hover {
  color: #007be5;
}

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

  .emails-header,
  .emails-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hub-email-promo {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Compact icon-only header controls */
.back-link.icon-only,
.board-share-open.icon-only {
  min-width: 32px;
  width: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
}
.board-share-open.icon-only {
  font-size: 15px;
}


/* No borders on header / zoom control buttons */
.tool-btn,
.back-link,
.board-share-open,
.back-link.icon-only,
.board-share-open.icon-only {
  border: none !important;
  box-shadow: none;
}
.tool-btn:hover,
.back-link:hover,
.board-share-open:hover,
body.view-hub .back-link:hover,
body.view-emails .back-link:hover {
  border-color: transparent !important;
}


/* —— Presentation mode (Figma-like Present) —— */
.tool-btn-present {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  background: #1e1e1e;
  color: #f5f5f5;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tool-btn-present:hover {
  background: #2c2c2c;
  color: #ffffff;
}

body.mode-present {
  overflow: hidden;
}

body.mode-present .funnel-app,
body.mode-present .hub,
body.mode-present .emails-page {
  visibility: hidden;
  pointer-events: none;
}

.present-stage {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  background: #1e1e1e;
  color: #f0f0f0;
}

.present-stage[hidden] {
  display: none !important;
}

.present-chrome {
  flex: 0 0 48px;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.present-exit {
  appearance: none;
  justify-self: start;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #f0f0f0;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.present-exit:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.present-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.present-funnel-title {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 36vw;
}

.present-counter {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}

.present-chrome-right {
  justify-self: end;
}

.present-frame-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 56px 16px;
}

.present-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  background: #111;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.present-hit {
  appearance: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  max-width: 280px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.present-hit-prev {
  left: 0;
  cursor: w-resize;
}

.present-hit-next {
  right: 0;
  cursor: e-resize;
}

.present-hit:focus-visible {
  outline: 2px solid rgba(13, 153, 255, 0.7);
  outline-offset: -4px;
}

.present-caption {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 24px 20px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
