/* The dashboard's original styles, moved out of index.html unchanged on
 * 2026-09-28. The Today section's styles are in today.css. */
/* ─── RESET & BASE ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #08090d;
  --bg-panel:    #0e1018;
  --bg-card:     #13161f;
  --bg-hover:    #181c27;
  --border:      #1e2330;
  --border-glow: #2dcea840;

  --teal:        #2dcea8;
  --teal-dim:    #1a7c65;
  --teal-glow:   #2dcea820;
  --gold:        #e6b84a;
  --gold-dim:    #7a5e1a;
  --gold-glow:   #e6b84a18;
  --red:         #e85c5c;
  --slate:       #3d4558;
  --slate-dim:   #252b3a;
  --green:       #4cde89;
  --green-dim:   #1a5437;
  --green-glow:  #4cde8918;

  --text-primary:   #e8eaf2;
  --text-secondary: #8892aa;
  --text-muted:     #4a5268;
  --text-accent:    #2dcea8;

  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --shadow-card: 0 2px 12px #00000060, 0 0 0 1px var(--border);
  --shadow-glow-teal: 0 0 20px var(--teal-glow), 0 0 0 1px var(--teal-dim);
  --shadow-glow-gold: 0 0 20px var(--gold-glow), 0 0 0 1px var(--gold-dim);
  --shadow-glow-green: 0 0 20px var(--green-glow), 0 0 0 1px var(--green-dim);

  --transition: 200ms ease;
}

html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── SCANLINE TEXTURE (header) ────────────────────────────────────────── */
.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    #ffffff04 3px,
    #ffffff04 4px
  );
  pointer-events: none;
}

/* ─── LAYOUT ────────────────────────────────────────────────────────────── */
.app-header {
  position: relative;
  background: linear-gradient(135deg, #0d1121 0%, #0a0e18 50%, #0e1420 100%);
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.app-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, #2dcea812 0%, transparent 70%);
  pointer-events: none;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--teal-dim), var(--teal));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 16px var(--teal-glow);
  flex-shrink: 0;
}

.header-logo svg { width: 22px; height: 22px; fill: #fff; }

.header-wordmark { line-height: 1; }
.header-wordmark .name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  text-transform: uppercase;
}
.header-wordmark .sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.header-meta {
  display: flex; align-items: center; gap: 24px;
}

.live-indicator {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-green 2.5s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--green-glow); }
  50% { opacity: 0.7; box-shadow: 0 0 0 5px transparent; }
}

.header-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── TAB BAR ───────────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 40px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color var(--transition);
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active { color: var(--teal); }
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--teal);
  border-radius: 2px 2px 0 0;
}

.tab-icon {
  width: 16px; height: 16px;
  opacity: 0.7;
}
.tab-btn.active .tab-icon { opacity: 1; }

.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  background: var(--slate-dim);
  border-radius: 9px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}
.tab-btn.active .tab-badge {
  background: var(--teal-glow);
  color: var(--teal);
}

/* ─── MAIN CONTENT ──────────────────────────────────────────────────────── */
.tab-content {
  display: none;
  padding: 40px;
}
.tab-content.active { display: block; }

/* ─── SECTION HEADER ────────────────────────────────────────────────────── */
.section-header {
  margin-bottom: 32px;
}
.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── AGENT TREE ────────────────────────────────────────────────────────── */
.agent-tree {
  display: block;
  overflow-x: auto;
  padding-bottom: 10px;
}

/* A node = a card plus (optionally) its trunk + branch row of children.
   Recursive: any node can itself be a parent, so the tree nests to any depth. */
.tree-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
}
.tree-root-node { margin: 0 auto; }

/* Connector trunk (vertical line from a card down to its children's bar) */
.tree-trunk {
  width: 2px;
  height: 34px;
  background: linear-gradient(to bottom, var(--teal-dim), var(--border));
  flex-shrink: 0;
}

/* Horizontal branch row holding one node's direct children */
.tree-branch-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  width: max-content;
}

/* Horizontal connector bar — JS sets exact left/width from the children's centers.
   Defaults to zero width so nothing flashes before JS measures the layout. */
.tree-branch-bar {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--border);
}

/* Each child column: vertical stem + the child's own (possibly nested) subtree */
.tree-child-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 14px;
}

.tree-child-stem {
  width: 2px;
  height: 30px;
  background: var(--border);
  flex-shrink: 0;
}

/* ─── AGENT CARD ────────────────────────────────────────────────────────── */
.agent-card {
  width: 300px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.agent-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px #00000070, 0 0 0 1px var(--border-glow);
}

/* Compact sub-level cards — PARS's build crew (SpecMan · Designer · Builder · Verifier) */
.agent-card.lvl-2 {
  width: 226px;
  padding: 16px 18px;
}

/* Accent bar on left edge */
.agent-card::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.agent-card.status-active::before  { background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.agent-card.status-building::before { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.agent-card.status-idle::before    { background: var(--slate); }
.agent-card.status-new::before     { background: var(--teal-dim); }

/* Glow for active root */
.agent-card.is-root {
  border-color: var(--teal-dim);
  box-shadow: var(--shadow-glow-teal);
  width: 340px;
}
.agent-card.is-root::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, #2dcea808 0%, transparent 60%);
  pointer-events: none;
}

/* ─── MARKETING TAB ─────────────────────────────────────────────────────── */
.mk-note {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 26px;
}
.mk-note strong { color: var(--gold); font-weight: 600; }

.mk-section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 14px 2px;
}
.mk-section-label + .mk-section-label,
.platform-grid + .mk-section-label,
.kpi-grid + .mk-section-label { margin-top: 34px; }
.mk-section-label.spaced { margin-top: 34px; }

/* KPI grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
}
.kpi-card.tone-teal::before { background: var(--teal); }
.kpi-card.tone-gold::before { background: var(--gold); }
.kpi-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}
.kpi-card.tone-gold .kpi-value { color: var(--gold); }
.kpi-value.empty { color: var(--text-muted); }
.kpi-value .kpi-unit { font-size: 15px; color: var(--text-muted); margin-left: 4px; }
.kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 10px; line-height: 1.45; }

/* Platform grid */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.platform-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.platform-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }
.platform-stat { display: flex; justify-content: space-between; font-size: 12px; padding: 4px 0; }
.platform-stat .ps-label { color: var(--text-muted); }
.platform-stat .ps-val { color: var(--text-secondary); font-family: var(--font-mono); }

/* Content queue */
.content-queue { display: flex; flex-direction: column; gap: 10px; }
.queue-row {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr 1.1fr 1fr auto;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}
.queue-row.queue-head {
  background: transparent;
  border: none;
  padding: 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.q-title { color: var(--text-primary); font-weight: 600; font-size: 14px; }
.q-sub { color: var(--text-muted); font-size: 12px; }
.q-platforms { display: flex; gap: 6px; flex-wrap: wrap; }
.q-chip {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}
.q-status {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 20px;
  white-space: nowrap;
  text-align: center;
}
.q-status.awaiting-batch { background: var(--slate-dim); color: var(--text-secondary); border: 1px solid var(--slate); }
.q-status.draft          { background: var(--slate-dim); color: var(--text-secondary); border: 1px solid var(--slate); }
.q-status.needs-approval { background: var(--gold-glow); color: var(--gold); border: 1px solid var(--gold-dim); }
.q-status.approved       { background: var(--teal-glow); color: var(--teal); border: 1px solid var(--teal-dim); }
.q-status.scheduled      { background: var(--teal-glow); color: var(--teal); border: 1px solid var(--teal-dim); }
.q-status.published      { background: var(--green-glow); color: var(--green); border: 1px solid var(--green-dim); }

@media (max-width: 720px) {
  .queue-row { grid-template-columns: 1fr 1fr; }
  .queue-row.queue-head { display: none; }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.agent-card.is-root .card-name { font-size: 18px; color: var(--teal); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.status-pill .pill-dot {
  width: 5px; height: 5px; border-radius: 50%;
}

.status-pill.active {
  background: #2dcea812;
  color: var(--teal);
  border: 1px solid var(--teal-dim);
}
.status-pill.active .pill-dot {
  background: var(--teal);
  animation: pulse-teal 2s ease-in-out infinite;
}
@keyframes pulse-teal {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-pill.building {
  background: #e6b84a10;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}
.status-pill.building .pill-dot {
  background: var(--gold);
  animation: pulse-gold 1.8s ease-in-out infinite;
}
@keyframes pulse-gold {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.status-pill.idle {
  background: #3d455814;
  color: var(--slate);
  border: 1px solid #2a3040;
}
.status-pill.idle .pill-dot { background: var(--slate); }

.status-pill.in-build {
  background: #e6b84a10;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}
.status-pill.in-build .pill-dot {
  background: var(--gold);
  animation: pulse-gold 1.8s ease-in-out infinite;
}

.card-role {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  width: 52px;
  flex-shrink: 0;
}

.meta-value {
  color: var(--text-secondary);
}
.meta-value.highlight { color: var(--text-primary); }
.meta-value.teal { color: var(--teal); }
.meta-value.gold { color: var(--gold); }

.model-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}

/* ─── ROADMAP ───────────────────────────────────────────────────────────── */
.roadmap-wrapper {
  overflow-x: auto;
  padding-bottom: 16px;
}

.roadmap-swim {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-width: 900px;
  position: relative;
  padding: 20px 0 10px;
}

/* Continuous horizontal baseline through connector dots */
.roadmap-swim::before {
  content: '';
  position: absolute;
  top: 42px; /* aligns with center of connector dots */
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(to right, var(--teal-dim), var(--border) 25%, var(--border) 75%, var(--border));
}

.ms-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 160px;
  position: relative;
}

/* Small circle on the baseline */
.ms-node {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.ms-node.done      { background: var(--green); border-color: var(--green); box-shadow: 0 0 10px var(--green-glow); }
.ms-node.in-progress { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px var(--gold-glow); animation: pulse-node 2s ease-in-out infinite; }
.ms-node.upcoming  { background: var(--slate-dim); border-color: var(--slate); }

@keyframes pulse-node {
  0%, 100% { box-shadow: 0 0 8px var(--gold-glow); }
  50% { box-shadow: 0 0 18px #e6b84a40; }
}

.ms-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  width: calc(100% - 24px);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.ms-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px #00000060, 0 0 0 1px var(--border-glow);
}

.ms-card.done {
  border-color: var(--green-dim);
  background: linear-gradient(135deg, #13161f 0%, #111a17 100%);
}
.ms-card.done::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, #4cde8910 0%, transparent 60%);
  pointer-events: none;
}

.ms-card.in-progress {
  border-color: var(--gold-dim);
  background: linear-gradient(135deg, #13161f 0%, #1a1610 100%);
}
.ms-card.in-progress::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, #e6b84a0e 0%, transparent 60%);
  pointer-events: none;
}

.ms-card.upcoming {
  opacity: 0.72;
}
.ms-card.upcoming:hover { opacity: 1; }

.ms-phase {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ms-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.ms-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.ms-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ms-status-pill.done {
  background: #4cde8912;
  color: var(--green);
  border: 1px solid var(--green-dim);
}
.ms-status-pill.in-progress {
  background: #e6b84a10;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  animation: glow-pill 2.5s ease-in-out infinite;
}
@keyframes glow-pill {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 10px #e6b84a30; }
}
.ms-status-pill.upcoming {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid #2a3040;
}

.checkmark { margin-right: 2px; }

/* ─── NORTH STAR PANEL ──────────────────────────────────────────────────── */
.northstar {
  position: relative;
  background: linear-gradient(135deg, #1b1710 0%, #13161f 60%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 28px;
  overflow: hidden;
}
.northstar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, #e6b84a16 0%, transparent 62%);
  pointer-events: none;
}
.northstar::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
}
.northstar-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.northstar-goal {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.01em;
}
.northstar-goal .ns-unit {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 8px;
}
.northstar-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
  max-width: 640px;
}

/* ─── CONNECTOR (between ms-cols, horizontal arrows) ────────────────────── */
.ms-connector {
  display: flex;
  align-items: center;
  padding-top: 34px; /* centers vertically with the node row */
  flex-shrink: 0;
  width: 0; /* zero width — the baseline line does the visual work */
}

/* ─── FOOTER ────────────────────────────────────────────────────────────── */
.app-footer {
  border-top: 1px solid var(--border);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.footer-right {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── EMPTY / LOADING ───────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ─── SCROLLBAR ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--slate); }

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */
/* Tree needs horizontal space — only collapse below 700px (phones) */
@media (max-width: 699px) {
  .app-header { padding: 16px 20px; }
  .tab-bar    { padding: 0 20px; }
  .tab-content { padding: 24px 20px; }
  .app-footer  { padding: 14px 20px; }
  .header-date { display: none; }

  .tree-branch-row { flex-direction: column; align-items: center; gap: 0; }
  .tree-branch-bar  { display: none; }
  .tree-child-col  { max-width: 100%; width: 100%; padding: 0; }
  .tree-child-stem { height: 20px; }
}

/* Mid-range: tighten padding but keep tree horizontal */
@media (max-width: 900px) and (min-width: 700px) {
  .app-header  { padding: 16px 20px; }
  .tab-bar     { padding: 0 20px; }
  .tab-content { padding: 24px 16px; }
  .app-footer  { padding: 14px 20px; }
  .header-date { display: none; }
  .tree-child-col { padding: 0 8px; }
}
