/* ============================================================
   Meta Ads Flow — Layout styles
   ============================================================ */

html, body, #root {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg-base);
  color: var(--fg-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Light mode overrides — applied on body.light */
body.light {
  --bg-base:        #F4F5F8;
  --bg-canvas:      #ECEEF3;
  --bg-surface:     #FFFFFF;
  --bg-surface-2:   #F8F9FC;
  --bg-elevated:    #EEF0F5;
  --bg-overlay:     rgba(20,22,30,0.4);
  --bg-blur:        rgba(255,255,255,0.85);
  --border:         #D9DEE7;
  --border-subtle:  #E7EAF0;
  --border-strong:  #B6BFCD;
  --border-accent:  rgba(8,145,178,0.4);
  --fg-primary:     #14181F;
  --fg-secondary:   #5B6776;
  --fg-muted:       #98A3B2;
  --fg-inverse:     #FFFFFF;
  --fg-on-accent:   #0B0C10;
  --accent-cyan:    #0891B2;        /* teal-cyan that reads on light */
  --accent-cyan-dim:#0E7490;
  --accent-purple:  #7B4FD4;
  --accent-blue:    #2E9DF7;
  --node-input:     #2E9DF7;
  --node-process:   #7B4FD4;
  --node-output:    #0891B2;
  --running:        #0891B2;
  --shadow-sm:      0 1px 2px rgba(20,22,30,0.06);
  --shadow-md:      0 2px 8px rgba(20,22,30,0.08);
  --shadow-lg:      0 6px 20px rgba(20,22,30,0.10);
  --shadow-xl:      0 12px 32px rgba(20,22,30,0.12);
  --shadow-panel:   0 8px 32px rgba(20,22,30,0.10), 0 0 0 1px rgba(217,222,231,0.8);
  --shadow-glow-cyan:   0 0 12px rgba(8,145,178,0.25);
  --shadow-node-selected: 0 0 0 2px #0891B2, 0 4px 24px rgba(8,145,178,0.18);
}

body.no-style-chip .style-chip { display: none; }

/* ── App shell ──────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
  background: var(--bg-base);
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── Pipeline sidebar nav ───────────────────────────────── */
.pipeline-nav {
  background: var(--bg-blur);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 0 16px;
  position: relative;
  z-index: 10;
}

.pipeline-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 18px;
}

.pipeline-brand-logo {
  width: 30px; height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.pipeline-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pipeline-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg,#7B4FD4,#2E9DF7,var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pipeline-brand-sub {
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 1px;
}

.pipeline-list {
  position: relative;
  padding: 0 14px;
  flex: 1;
}

/* the vertical connecting line */
.pipeline-line {
  position: absolute;
  left: 36px;
  top: 28px;
  bottom: 80px;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(123,79,212,0.5) 0%,
    rgba(46,157,247,0.5) 50%,
    var(--accent-cyan) 100%);
  border-radius: 999px;
  opacity: 0.5;
  pointer-events: none;
}

.pipeline-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms ease-out;
  position: relative;
  margin-bottom: 2px;
}

.pipeline-step:hover {
  background: var(--bg-elevated);
}

.pipeline-step.active {
  background: rgba(102,252,241,0.06);
}

body.light .pipeline-step.active {
  background: rgba(8,145,178,0.06);
}

.pipeline-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  transition: all 150ms ease-out;
  position: relative;
  z-index: 1;
}

.pipeline-step.active .pipeline-dot {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: var(--fg-on-accent);
  box-shadow: 0 0 0 4px rgba(102,252,241,0.15);
}

.pipeline-step.done .pipeline-dot {
  background: var(--bg-surface);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.pipeline-step.map .pipeline-dot {
  border-radius: 5px;
  background: var(--bg-surface);
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}
.pipeline-step.map.active .pipeline-dot {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(123,79,212,0.18);
}

.pipeline-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pipeline-label-vi {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.pipeline-step.active .pipeline-label-vi {
  color: var(--accent-cyan);
}

body.light .pipeline-step.active .pipeline-label-vi {
  color: var(--accent-cyan);
}

.pipeline-label-en {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pipeline-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-muted);
  margin-top: 8px;
  flex-shrink: 0;
}
.pipeline-status-dot.saved { background: var(--accent-cyan); box-shadow: 0 0 6px rgba(102,252,241,0.5); }
.pipeline-status-dot.empty { background: var(--border-strong); }

.pipeline-foot {
  padding: 16px 20px 4px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pipeline-foot-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pipeline-foot-product {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}

.pipeline-foot-product .accent {
  background: linear-gradient(135deg,#7B4FD4,var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Screen header ──────────────────────────────────────── */
.screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 14px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-base);
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}

.screen-head-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.screen-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.screen-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-primary);
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.screen-title .en {
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 400;
  letter-spacing: 0;
  font-family: var(--font-body);
}

.screen-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Screen body ────────────────────────────────────────── */
.screen-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 280px;
  overflow: hidden;
}

.screen-canvas {
  overflow-y: auto;
  padding: 28px 32px 48px;
}

.screen-section-label {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 32px;
  padding: 24px 0 0;
}

.screen-canvas.no-pad {
  padding: 0;
}

/* ── Style chip ─────────────────────────────────────────── */
.style-chip {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}

.style-chip::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-cyan));
}

.style-chip-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 12px 18px;
  border-right: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.style-chip-label-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.style-chip-label-text .vi {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: 0.02em;
}
.style-chip-label-text .en {
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.style-chip-content {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-secondary);
  line-height: 1.45;
  min-width: 0;
}

.style-chip-content.empty {
  color: var(--fg-muted);
  font-style: italic;
}

.style-chip-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px 8px 6px;
}

/* ── Claude-style prompt input ──────────────────────────── */
.prompt-shell {
  max-width: 760px;
  margin: 0 auto;
}

.prompt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  box-shadow: var(--shadow-md);
  transition: border-color 150ms, box-shadow 150ms;
}

.prompt-card:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(102,252,241,0.10), var(--shadow-lg);
}

body.light .prompt-card:focus-within {
  box-shadow: 0 0 0 3px rgba(8,145,178,0.10), var(--shadow-lg);
}

.prompt-textarea {
  width: 100%;
  min-height: 92px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 16px 18px 4px;
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
}

.prompt-textarea::placeholder {
  color: var(--fg-muted);
}

.prompt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 10px 16px;
  gap: 12px;
}

/* Pill controls inside prompt card */
.prompt-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--fg-secondary);
  font-family: var(--font-body);
  font-size: 11px;
  cursor: pointer;
  transition: all 150ms ease-out;
  white-space: nowrap;
}
.prompt-attach-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all 150ms ease-out;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.prompt-attach-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(102,252,241,0.08);
}
.prompt-attach-count {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-left: 1px;
  line-height: 1;
}
.prompt-pill:hover {
  border-color: var(--border-strong);
  color: var(--fg-primary);
  background: var(--bg-elevated);
}
.prompt-pill-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.prompt-pill-value {
  font-weight: 500;
  color: var(--fg-primary);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dropdown menu for pills */
.prompt-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 230px;
  max-width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 5px;
  z-index: 100;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.prompt-dropdown.r { left: auto; right: 0; }
.prompt-dropdown-head {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 8px 10px 6px;
}
.prompt-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--fg-primary);
  cursor: pointer;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}
.prompt-dropdown-item:hover {
  background: var(--bg-elevated);
}
.prompt-dropdown-item.active {
  background: rgba(102,252,241,0.06);
}
body.light .prompt-dropdown-item.active {
  background: rgba(8,145,178,0.06);
}
.prompt-dropdown-icon {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.prompt-dropdown-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-primary);
  line-height: 1.3;
}
.prompt-dropdown-sub {
  font-size: 10.5px;
  color: var(--fg-muted);
  line-height: 1.3;
  margin-top: 1px;
}

/* Linked source chips above the textarea */
.prompt-sources-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
}
.prompt-sources-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.prompt-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--fg-primary);
  background: var(--bg-surface-2);
}
.prompt-source-chip-x {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  cursor: pointer;
}
.prompt-source-chip-x:hover {
  background: var(--bg-elevated);
  color: var(--fg-primary);
}

/* Drag-over highlight */
.prompt-card.drag-over {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(102,252,241,0.14), var(--shadow-lg);
}

/* Attachment chips */
.prompt-attachments-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 0;
}
.prompt-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px 0 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--fg-secondary);
  max-width: 220px;
}
.prompt-attachment-thumb {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}
.prompt-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--bg-elevated);
  flex-shrink: 0;
  color: var(--fg-secondary);
}
.prompt-attachment-name {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
  color: var(--fg-primary);
  min-width: 0;
}
.prompt-attachment-size {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  flex-shrink: 0;
}
.prompt-attachment-x {
  background: transparent;
  border: none;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.prompt-attachment-x:hover {
  background: var(--bg-elevated);
  color: var(--fg-primary);
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  justify-content: center;
}

.prompt-suggestion {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all 150ms ease-out;
  font-family: var(--font-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.prompt-suggestion:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(102,252,241,0.04);
}

body.light .prompt-suggestion:hover {
  background: rgba(8,145,178,0.05);
}

.prompt-hero-title {
  text-align: center;
  margin: 8px 0 26px;
}
.prompt-hero-title .vi {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--fg-primary);
  line-height: 1.15;
}
.prompt-hero-title .accent {
  background: linear-gradient(135deg,#7B4FD4,#2E9DF7,var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.prompt-hero-title .en {
  display: block;
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 8px;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
}

/* ── Output cards ───────────────────────────────────────── */
.output-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  gap: 12px;
}

.output-head-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.output-head-title .icon-wrap {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(102,252,241,0.10);
  color: var(--accent-cyan);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
body.light .output-head-title .icon-wrap {
  background: rgba(8,145,178,0.10);
}

.output-head-title h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--fg-primary);
}

.output-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.output-body {
  padding: 18px 20px;
}

/* ── Version rail (right side) ──────────────────────────── */
.version-rail {
  border-left: 1px solid var(--border-subtle);
  background: var(--bg-base);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.version-rail-head {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.version-rail-head-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.version-rail-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.version-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 150ms ease-out;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.version-item:hover {
  border-color: var(--border-strong);
}

.version-item.active {
  border-color: var(--accent-cyan);
  background: rgba(102,252,241,0.04);
  box-shadow: 0 0 0 1px rgba(102,252,241,0.15);
}

body.light .version-item.active {
  background: rgba(8,145,178,0.04);
  box-shadow: 0 0 0 1px rgba(8,145,178,0.18);
}

.version-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.version-item-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.version-item-active-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(102,252,241,0.08);
}

.version-item-preview {
  font-size: 11.5px;
  color: var(--fg-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.version-item-time {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

/* ── Loading skeleton ───────────────────────────────────── */
.skeleton-line {
  height: 12px;
  background: linear-gradient(90deg,
    var(--bg-surface-2),
    var(--bg-elevated),
    var(--bg-surface-2));
  background-size: 200% 100%;
  border-radius: 4px;
  margin-bottom: 10px;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes badgePulse { 0%,100%{opacity:1} 50%{opacity:0.35} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform: none; } }
.fade-in { animation: fadeIn 250ms ease-out both; }

/* ── Persona cards ──────────────────────────────────────── */
.persona-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.persona-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.persona-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(102,252,241,0.05), transparent 60%);
  pointer-events: none;
}
body.light .persona-card::before {
  background: radial-gradient(circle at top right, rgba(8,145,178,0.04), transparent 60%);
}

.persona-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.persona-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7B4FD4, #2E9DF7);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

.persona-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}

.persona-tag {
  font-size: 11px;
  color: var(--fg-secondary);
  margin-top: 2px;
}

.persona-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.persona-row-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.persona-row-value {
  font-size: 12.5px;
  color: var(--fg-primary);
  line-height: 1.45;
}

.persona-pain {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.persona-pain-chip {
  background: rgba(248,113,113,0.10);
  border: 1px solid rgba(248,113,113,0.25);
  color: var(--error);
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 999px;
}

body.light .persona-pain-chip {
  background: rgba(220,38,38,0.07);
  border-color: rgba(220,38,38,0.2);
  color: #DC2626;
}

/* ── Content plan ───────────────────────────────────────── */
.content-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--bg-surface-2);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  width: fit-content;
  margin-bottom: 18px;
}
.content-tab {
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 150ms ease-out;
  background: transparent;
  border: none;
}
.content-tab.active {
  background: var(--bg-surface);
  color: var(--fg-primary);
  box-shadow: var(--shadow-sm);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.content-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.content-card-img {
  height: 140px;
  background: linear-gradient(135deg, #1a1f2e, #2a1f3d, #1a2a3d);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 11px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}
.content-card-img.var-1 { background: linear-gradient(135deg, #2A1F3D, #1A2A3D); }
.content-card-img.var-2 { background: linear-gradient(135deg, #0E1F2D, #1F2833); }
.content-card-img.var-3 { background: linear-gradient(135deg, #2D1B1F, #1F2833); }
.content-card-img.var-4 { background: linear-gradient(135deg, #1F2D24, #1F2833); }

body.light .content-card-img.var-1 { background: linear-gradient(135deg, #E0E2EE, #D6DAEF); }
body.light .content-card-img.var-2 { background: linear-gradient(135deg, #D7E6F1, #DCE3EF); }
body.light .content-card-img.var-3 { background: linear-gradient(135deg, #F0DCDC, #ECDEDB); }
body.light .content-card-img.var-4 { background: linear-gradient(135deg, #D8E6D8, #E0E5DD); }

.content-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.25));
  pointer-events: none;
}
body.light .content-card-img::after {
  background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.08));
}

.content-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.content-card-kind {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.content-card-kind-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(102,252,241,0.08);
}
body.light .content-card-kind-tag {
  background: rgba(8,145,178,0.08);
}

.content-card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--fg-primary);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.content-card-copy {
  font-size: 12px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

/* ── Ads (Meta) screen ──────────────────────────────────── */
.ads-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  margin-top: 18px;
}

.ads-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.ads-section h4 {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ads-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.ads-field-label {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--fg-secondary);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.ads-input, .ads-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--fg-primary);
  outline: none;
  transition: border-color 150ms ease-out;
}
.ads-input:focus, .ads-select:focus {
  border-color: var(--accent-cyan);
}

.ads-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ads-chip {
  background: rgba(102,252,241,0.06);
  border: 1px solid rgba(102,252,241,0.20);
  color: var(--accent-cyan);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.light .ads-chip {
  background: rgba(8,145,178,0.06);
  border-color: rgba(8,145,178,0.22);
  color: var(--accent-cyan);
}

.ads-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ads-budget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ads-stat-tile {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ads-stat-tile .label {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ads-stat-tile .val {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}
.ads-stat-tile .val .unit {
  font-size: 11px;
  color: var(--fg-muted);
  margin-left: 4px;
  font-weight: 400;
}

/* Meta ads preview */
.meta-preview {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  align-self: start;
  position: sticky;
  top: 0;
}
.meta-preview-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-2);
}
.meta-preview-head-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.meta-ad-card {
  margin: 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
}
body.light .meta-ad-card {
  background: #fff;
}

.meta-ad-page {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.meta-ad-page-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg,#7B4FD4,var(--accent-cyan));
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.meta-ad-page-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.meta-ad-page-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-primary);
}
.meta-ad-page-sub {
  font-size: 10px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-ad-copy {
  font-size: 12px;
  color: var(--fg-primary);
  line-height: 1.5;
  margin-bottom: 10px;
}

.meta-ad-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #2a1f3d, #1F2833, #1a2a3d);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  font-size: 11px;
  position: relative;
  overflow: hidden;
}
body.light .meta-ad-image {
  background: linear-gradient(135deg, #D6DAEF, #E0E5DD, #DCE3EF);
}

.meta-ad-cta {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.meta-ad-cta-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.meta-ad-cta-link {
  font-size: 10px;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.meta-ad-cta-headline {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
}
.meta-ad-cta-btn {
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-primary);
}

.meta-ad-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 18px;
}
.meta-ad-action {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--fg-secondary);
}

/* ── MAP / CANVAS screen ────────────────────────────────── */
.canvas-bg {
  background-color: var(--bg-canvas);
  background-image: radial-gradient(circle, var(--border-subtle) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  flex: 1;
  position: relative;
  overflow: hidden;
}

.map-library {
  width: 240px;
  border-right: 1px solid var(--border);
  background: var(--bg-blur);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.map-library-head {
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.map-library-head .title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-primary);
}
.map-library-head .sub {
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.map-library-section {
  padding: 12px 12px 8px;
}
.map-library-section-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 4px;
}

.map-library-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: 7px;
  margin-bottom: 6px;
  cursor: grab;
  transition: all 150ms ease-out;
}
.map-library-item:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-elevated);
}
.map-library-item:active { cursor: grabbing; }

.map-library-item-icon {
  width: 24px; height: 24px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.map-library-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.map-library-item-title {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 165px;
}
.map-library-item-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

.map-stage {
  position: relative;
  flex: 1;
  overflow: hidden;
}

/* Map controls floating */
.map-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-blur);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  z-index: 20;
  box-shadow: var(--shadow-md);
}

.map-controls button {
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  color: var(--fg-secondary);
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  cursor: pointer;
}
.map-controls button:hover {
  background: var(--bg-elevated);
  color: var(--fg-primary);
}

.map-controls .zoom-val {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-muted);
  padding: 0 8px;
  min-width: 40px;
  text-align: center;
}

/* Map run button */
.map-run {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

/* Map node */
.map-node {
  position: absolute;
  width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  cursor: grab;
  overflow: hidden;
  z-index: 1;
  transition: box-shadow 100ms;
}
.map-node:active { cursor: grabbing; }
.map-node.selected {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(102,252,241,0.30), 0 6px 26px rgba(0,0,0,0.5);
  z-index: 10;
}
body.light .map-node.selected {
  box-shadow: 0 0 0 2px rgba(8,145,178,0.30), 0 6px 26px rgba(20,22,30,0.18);
}

.map-node-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
}
.map-node-icon {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.map-node-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg-primary);
}
.map-node-pill {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}

.map-node-body {
  padding: 10px 12px;
  font-size: 11.5px;
  color: var(--fg-secondary);
  line-height: 1.45;
  min-height: 42px;
}

.map-node-foot {
  padding: 7px 12px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Ports on the map node */
.map-port {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent-teal, #45A29E);
  background: var(--bg-base);
  top: 50%;
  transform: translateY(-50%);
  cursor: crosshair;
  z-index: 5;
  transition: all 150ms ease-out;
}
.map-port.in  { left: -7px; }
.map-port.out { right: -7px; }
.map-port:hover, .map-port.armed {
  transform: translateY(-50%) scale(1.3);
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(102,252,241,0.7);
}

/* Output (result) node — wider and richer */
.map-node.result {
  width: 270px;
}
.map-node.result .map-node-head {
  background: linear-gradient(90deg, rgba(123,79,212,0.18), rgba(102,252,241,0.10));
}

.map-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}
.map-result-cell {
  background: var(--bg-surface-2);
  border-radius: 6px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.map-result-cell .label {
  font-size: 9.5px;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.map-result-cell .val {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-primary);
}
.map-result-cell .val.cyan { color: var(--accent-cyan); }
.map-result-cell .val.green { color: var(--success); }
.map-result-cell .val .unit {
  font-size: 10px;
  color: var(--fg-muted);
  font-weight: 400;
  margin-left: 2px;
}

/* Top bar in map */
.map-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}
.map-prompt-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 360px;
}
.map-prompt-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.map-prompt-bar input::placeholder { color: var(--fg-muted); }

/* Selected node panel */
.node-detail-panel {
  position: absolute;
  right: 16px;
  bottom: 56px;
  width: 280px;
  background: var(--bg-blur);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  z-index: 22;
}
.node-detail-panel h5 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 8px;
  color: var(--fg-primary);
}

/* Map empty state */
.map-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  pointer-events: none;
}
.map-empty .big {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg-secondary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.map-empty .sub {
  font-size: 12px;
  color: var(--fg-muted);
}

/* Misc */
.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--fg-secondary);
}

.section-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.run-shortcut {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}


/* ── Funnel tiers (persona) ──────────────────────────── */
.funnel-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.funnel-tier-wrap { width: 100%; transition: padding 200ms ease-out; }
.funnel-tier {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.funnel-tier::before {
  content: ''; position: absolute; inset: 0 auto 0 0;
  width: 3px; background: var(--tier-color);
}
.funnel-tier-head {
  display: grid;
  grid-template-columns: 42px 1fr 100px 90px 18px;
  align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px;
  background: transparent; border: none;
  cursor: pointer; text-align: left;
  font-family: var(--font-body); color: var(--fg-primary);
}
.funnel-tier-head:hover { background: var(--bg-elevated); }
.funnel-tier-num {
  width: 32px; height: 32px; border-radius: 8px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.funnel-tier-meta { min-width: 0; }
.funnel-tier-name {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  color: var(--fg-primary); letter-spacing: -0.01em; margin-bottom: 2px;
  display: flex; align-items: center; gap: 8px;
}
.funnel-tier-en {
  font-family: var(--font-body); font-size: 11px;
  color: var(--fg-muted); font-weight: 400; letter-spacing: 0;
}
.funnel-tier-desc { font-size: 12px; color: var(--fg-secondary); line-height: 1.4; }
.funnel-tier-size {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
}
.funnel-tier-size-val {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--fg-primary); font-weight: 500;
}
.funnel-tier-size-pct {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  letter-spacing: -0.01em;
}
.funnel-tier-bar {
  width: 90px; height: 6px; border-radius: 999px; overflow: hidden;
}
.funnel-tier-bar-fill {
  height: 100%; border-radius: 999px;
  transition: width 200ms ease-out;
}
.funnel-tier-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--border-subtle);
}
.funnel-tier-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 16px; padding: 16px 0 4px;
}
.funnel-tier-col { display: flex; flex-direction: column; gap: 5px; }
.funnel-tier-col-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-muted); letter-spacing: 0.12em; text-transform: uppercase;
}
.funnel-tier-bullets {
  margin: 0; padding: 0 0 0 16px;
  font-size: 12px; color: var(--fg-primary); line-height: 1.55;
}
.funnel-tier-bullets li { margin-bottom: 3px; }

/* ── Ads objective tiles ──────────────────────────────── */
.ads-objective-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 8px;
}
.ads-objective-tile {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 11px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 7px; cursor: pointer; text-align: left;
  font-family: var(--font-body); color: var(--fg-primary);
  position: relative; transition: all 150ms ease-out;
}
.ads-objective-tile:hover { border-color: var(--border-strong); }
.ads-objective-tile.active {
  background: rgba(102,252,241,0.06);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 1px rgba(102,252,241,0.18);
}
body.light .ads-objective-tile.active {
  background: rgba(8,145,178,0.06);
  box-shadow: 0 0 0 1px rgba(8,145,178,0.18);
}
.ads-objective-title {
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--fg-primary); line-height: 1.25;
}
.ads-objective-desc {
  font-size: 10.5px; color: var(--fg-muted);
  margin-top: 2px; line-height: 1.35;
}
.ads-objective-check {
  position: absolute; top: 8px; right: 8px;
  width: 16px; height: 16px;
  background: var(--accent-cyan); color: var(--fg-on-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── CSV upload + data table ─────────────────────────── */
.csv-upload {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}
.csv-upload-left {
  display: flex; align-items: center; gap: 14px; min-width: 0;
}
.csv-upload-icon {
  width: 42px; height: 42px; border-radius: 8px;
  background: rgba(74,222,128,0.10);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.csv-upload-name {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--fg-primary); font-weight: 500;
}
.csv-upload-sub {
  font-size: 11.5px; color: var(--fg-muted); margin-top: 2px;
}

.data-table-wrap {
  width: 100%; overflow-x: auto;
  border: 1px solid var(--border-subtle); border-radius: 8px;
}
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; user-select: text;
}
.data-table th {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--fg-muted); font-weight: 600;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left; background: var(--bg-surface-2);
  white-space: nowrap;
}
.data-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--fg-primary); white-space: nowrap;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-elevated); }
.data-table td.num {
  font-family: var(--font-mono); font-size: 11.5px;
  text-align: right; font-variant-numeric: tabular-nums;
}
.data-table tr.row-best { background: rgba(74,222,128,0.04); }
.data-table tr.row-worst { background: rgba(248,113,113,0.04); }

/* ── Map node config (per-node AI + prompt) ─────────── */
.node-detail-panel {
  width: 320px !important;
}
.node-config-field {
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.node-config-label {
  font-family: var(--font-mono); font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--fg-muted);
}
.node-config-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-family: var(--font-body);
  font-size: 11.5px;
  color: var(--fg-primary);
  outline: none;
  width: 100%;
}
.node-config-select:focus { border-color: var(--accent-cyan); }
.node-config-textarea {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
  outline: none;
  width: 100%;
  resize: vertical;
  min-height: 64px;
  line-height: 1.45;
}
body.light .node-config-textarea { color: var(--accent-cyan-dim); }
.node-config-textarea:focus { border-color: var(--accent-cyan); }
.node-config-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 4px;
}
.node-config-mini-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 10px;
  color: var(--fg-secondary);
  cursor: pointer;
}
.node-config-mini-pill.active {
  background: rgba(102,252,241,0.08);
  border-color: rgba(102,252,241,0.3);
  color: var(--accent-cyan);
}
body.light .node-config-mini-pill.active {
  background: rgba(8,145,178,0.08);
  border-color: rgba(8,145,178,0.3);
  color: var(--accent-cyan);
}

/* Show "AI" badge on node header */
.map-node-ai-badge {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(46,157,247,0.10);
  color: var(--accent-blue);
}


/* ── Settings modal ──────────────────────────────────── */
.settings-backdrop {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  animation: fadeIn 200ms ease-out;
}
.settings-modal {
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 64px);
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.settings-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-title {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-primary);
  margin: 0 0 4px;
  display: flex; align-items: center; gap: 10px;
}
.settings-subtitle {
  font-size: 12px;
  color: var(--fg-muted);
}
.settings-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.settings-close:hover { background: var(--bg-elevated); color: var(--fg-primary); }

.settings-tabs {
  display: flex; gap: 2px;
  padding: 12px 20px 0;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
}
.settings-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px 12px;
  background: transparent;
  border: none;
  color: var(--fg-secondary);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 150ms ease-out;
}
.settings-tab:hover { color: var(--fg-primary); }
.settings-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.settings-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 22px 24px;
}

.settings-section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.settings-section-head h3 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  color: var(--fg-primary);
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.settings-section-head p {
  margin: 0;
  font-size: 12px;
  color: var(--fg-secondary);
  line-height: 1.55;
  max-width: 540px;
}

.settings-list {
  display: flex; flex-direction: column;
  gap: 10px;
}

/* API key row */
.api-row {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.api-row.connected {
  border-color: var(--border);
}
.api-row-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.api-row-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.api-row-meta { flex: 1; min-width: 0; }
.api-row-name {
  font-family: var(--font-display); font-size: 13.5px;
  font-weight: 600; letter-spacing: -0.01em;
  color: var(--fg-primary);
}
.api-row-sub {
  font-size: 11px; color: var(--fg-muted);
  margin-top: 1px;
}
.api-row-body {
  padding: 12px 14px;
  display: flex; align-items: flex-end; gap: 12px;
}
.api-key-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.api-key-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.10em; text-transform: uppercase;
}
.api-key-input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.api-key-input {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 38px 8px 10px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--fg-primary);
  outline: none;
  letter-spacing: 0.02em;
}
.api-key-input:focus { border-color: var(--accent-cyan); }
.api-key-eye {
  position: absolute; right: 6px;
  background: transparent; border: none;
  color: var(--fg-muted);
  cursor: pointer;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
}
.api-key-eye:hover { background: var(--bg-elevated); color: var(--fg-primary); }
.api-row-actions { display: flex; gap: 6px; }

.settings-default-model {
  margin-top: 18px;
  padding: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px;
}

/* Style preset row */
.style-row {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.style-row-head {
  display: grid;
  grid-template-columns: 32px 1fr minmax(180px, 280px) 18px;
  align-items: center; gap: 14px; width: 100%;
  padding: 12px 14px;
  background: transparent; border: none;
  cursor: pointer; text-align: left;
  font-family: var(--font-body); color: var(--fg-primary);
}
.style-row-head:hover { background: var(--bg-elevated); }
.style-row-icon {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: rgba(123,79,212,0.10);
  display: flex; align-items: center; justify-content: center;
}
.style-row-meta { min-width: 0; }
.style-row-name {
  font-family: var(--font-display);
  font-size: 13.5px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
}
.style-row-sub {
  font-size: 11px; color: var(--fg-muted);
  margin-top: 1px;
}
.style-row-preview {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.style-row-body {
  padding: 14px 14px 14px;
  border-top: 1px solid var(--border-subtle);
}
.style-prompt-area {
  width: 100%;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--fg-primary);
  outline: none;
  resize: vertical;
  line-height: 1.55;
  min-height: 64px;
}
.style-prompt-area:focus { border-color: var(--accent-cyan); }
.style-row-actions {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.settings-info {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(46,157,247,0.06);
  border: 1px solid rgba(46,157,247,0.20);
  border-radius: 8px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 11.5px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.workspace-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px;
}

.settings-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

/* Sidebar settings button */
.pipeline-settings-btn {
  margin-top: 8px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  width: 100%;
  transition: all 150ms ease-out;
}
.pipeline-settings-btn:hover {
  background: var(--bg-elevated);
  color: var(--fg-primary);
  border-color: var(--border);
}
.pipeline-settings-btn .sub {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

/* Topbar icon button (theme/lang) */
.topbar-icon-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 150ms ease-out;
  position: relative;
}
.topbar-icon-btn:hover {
  background: var(--bg-elevated);
  color: var(--fg-primary);
  border-color: var(--border);
}

.topbar-lang-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px;
  padding: 0 11px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease-out;
  position: relative;
}
.topbar-lang-pill:hover {
  background: var(--bg-elevated);
  color: var(--fg-primary);
  border-color: var(--border);
}
.topbar-lang-pill .flag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
}

/* Dropdown for lang */
.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px); right: 0;
  min-width: 180px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 5px;
  z-index: 200;
  display: flex; flex-direction: column;
  gap: 1px;
}
.lang-dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--fg-primary);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12.5px;
  text-align: left;
}
.lang-dropdown-item:hover { background: var(--bg-elevated); }
.lang-dropdown-item.active { background: rgba(102,252,241,0.06); }
body.light .lang-dropdown-item.active { background: rgba(8,145,178,0.06); }
.lang-dropdown-flag {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  background: rgba(102,252,241,0.10);
}
body.light .lang-dropdown-flag {
  background: rgba(8,145,178,0.10);
}


/* ── Loij Flow brand: background + logo polish ───────── */
body {
  background-color: var(--bg-base);
  background-image: url('assets/bg-main.jpeg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* Soft dark overlay — kept light so the network art shows through */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center,
      rgba(11,12,16,0.05) 0%,
      rgba(11,12,16,0.25) 60%,
      rgba(11,12,16,0.45) 100%);
  pointer-events: none;
  z-index: 0;
}

body.light {
  background-image: none;
}
body.light::before { display: none; }

.app-shell { position: relative; z-index: 1; background: transparent; }

/* App-main is now mostly transparent so the bg shines through */
.app-main {
  background: rgba(11,12,16,0.08);
  backdrop-filter: none;
}
body.light .app-main { background: transparent; backdrop-filter: none; }

/* Screen sections (canvas) keep a subtle scrim so text remains crisp */
.screen-canvas {
  background: linear-gradient(180deg,
    rgba(11,12,16,0.12) 0%,
    rgba(11,12,16,0.22) 100%);
}
body.light .screen-canvas { background: transparent; }

/* Screen header gets a stronger scrim because of dense text */
.screen-head {
  background: rgba(11,12,16,0.30);
  backdrop-filter: blur(10px);
}
body.light .screen-head { background: var(--bg-base); backdrop-filter: none; }

/* Make pipeline-nav fully solid in dark mode to anchor left rail */
.pipeline-nav {
  background: rgba(13,15,20,0.90);
  backdrop-filter: blur(20px) saturate(140%);
}
body.light .pipeline-nav { background: var(--bg-blur); }

/* Version rail too — it sits over the bg */
.version-rail {
  background: rgba(11,12,16,0.35);
  backdrop-filter: blur(12px);
}
body.light .version-rail { background: var(--bg-base); backdrop-filter: none; }

/* Brand logo: bigger + golden glow */
.pipeline-brand {
  padding-bottom: 18px;
}
.pipeline-brand-logo {
  width: 38px; height: 38px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(212,175,55,0.25), 0 6px 18px rgba(212,175,55,0.18);
  background: #0B0C10;
}

/* Gold brand-name on dark gradient (matches the new logo) */
.pipeline-brand-name {
  background: linear-gradient(135deg, #D4A847 0%, #F5E89C 50%, #B8853A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
  font-size: 13px;
  font-weight: 700;
}

/* Prompt hero accent — switch from violet/cyan to brand gold */
.prompt-hero-title .accent {
  background: linear-gradient(135deg, #D4A847 0%, #F5E89C 50%, #B8853A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Footer product name accent → gold too */
.pipeline-foot-product .accent {
  background: linear-gradient(135deg, #D4A847 0%, #F5E89C 50%, #B8853A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Map canvas: lean into the network/grid art behind the dots */
.canvas-bg {
  background-color: transparent;
  background-image:
    radial-gradient(circle, rgba(102,252,241,0.18) 1.1px, transparent 1.1px),
    url('assets/bg-s2.jpeg');
  background-size: 22px 22px, cover;
  background-position: 0 0, center;
  background-blend-mode: normal, normal;
}
.canvas-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11,12,16,0.30);
  pointer-events: none;
  z-index: 0;
}

/* For light mode, drop the network overlay */
body.light .canvas-bg {
  background-image: radial-gradient(circle, var(--border-subtle) 1.1px, transparent 1.1px);
  background-color: var(--bg-canvas);
}
body.light .canvas-bg::after { display: none; }

/* Prompt-hero ambient: glow behind hero title from S3 */
.screen-canvas {
  position: relative;
}
.screen-canvas > .prompt-shell::before {
  content: '';
  position: absolute;
  top: -50px; left: 50%; transform: translateX(-50%);
  width: 820px; height: 320px;
  background-image: url('assets/bg-s3.jpeg');
  background-size: cover;
  background-position: center;
  opacity: 0.40;
  filter: blur(1px);
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  mask: radial-gradient(ellipse at center, black 25%, transparent 75%);
  -webkit-mask: radial-gradient(ellipse at center, black 25%, transparent 75%);
}
body.light .screen-canvas > .prompt-shell::before { display: none; }


/* ── Platform selector ───────────────────────────────── */
.platform-selector-wrap {
  padding: 0 14px 14px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  z-index: 5;
  margin-bottom: 10px;
}
.platform-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0 4px 6px;
}
.platform-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--fg-primary);
  text-align: left;
  transition: all 150ms ease-out;
}
.platform-selector:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}
.platform-selector.open {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(102,252,241,0.08);
}
body.light .platform-selector.open {
  box-shadow: 0 0 0 2px rgba(8,145,178,0.08);
}

.platform-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.platform-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.platform-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.platform-sub {
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-dropdown {
  position: absolute;
  left: 14px;
  right: 14px;
  top: calc(100% - 4px);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 5px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 380px;
  overflow-y: auto;
}
.platform-dropdown-head {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 8px 10px 6px;
}
.platform-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--fg-primary);
  text-align: left;
  position: relative;
}
.platform-dropdown-item:hover {
  background: var(--bg-elevated);
}
.platform-dropdown-item.active {
  background: rgba(102,252,241,0.06);
}
body.light .platform-dropdown-item.active { background: rgba(8,145,178,0.06); }
.platform-dropdown-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.platform-dropdown-item.disabled:hover {
  background: transparent;
}

.platform-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.platform-badge.beta {
  background: rgba(251,191,36,0.10);
  color: var(--warning);
  border-color: rgba(251,191,36,0.25);
}

/* tighten pipeline list because we have a platform selector now */
.pipeline-list { padding-top: 0; }
.pipeline-line { top: 4px; }
