/* Demo overlays only.
   The dashboard look comes from dashboard-css/{theme,layout,components}.css —
   identical copies of the real dashboard's stylesheets. This file adds:
     1. The slim DEMO MODE banner above the nav
     2. The DEMO chip inside the brand block
     3. A no-op pulse animation for clicks that don't navigate
     4. A handful of legibility tweaks for the demo-only context
*/

/* The real dashboard hides .view by default and toggles .active. The
   demo pages have a single static view per page, so just always show. */
.view { display: block !important; }

/* ── DEMO BANNER (sticky, restrained) ─────────────────────────────── */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mantle);
  color: var(--subtext);
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.demo-banner strong {
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: var(--peach);
  border: 1px solid var(--peach);
  padding: 1px 7px;
  border-radius: 3px;
}
.demo-banner a { color: var(--text); text-decoration: underline; }

/* ── DEMO chip inside the nav brand ───────────────────────────────── */
.demo-badge {
  background: var(--peach);
  color: var(--crust);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 10px;
}

/* nav-brand became <a> — strip default link styling */
a.nav-brand { text-decoration: none; cursor: pointer; }
a.nav-brand:hover { text-decoration: none; }

/* nav-tab was originally <button>; we use <a>. Strip link defaults. */
a.nav-tab { text-decoration: none; }
a.nav-tab:hover { text-decoration: none; }
a.nav-icon-btn { text-decoration: none; }
a.nav-icon-btn:hover { text-decoration: none; }

/* ── Click pulse (no-op feedback) ─────────────────────────────────── */
@keyframes demoPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.demo-pulse { animation: demoPulse 250ms ease-out; }

/* ── Demo-only metric cards (Analytics view) ──────────────────────── */
/* The real dashboard's analytics view uses a Vega-lite chart we can't
   easily replicate statically; substitute static metric cards. */
.demo-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.demo-metric {
  background: var(--mantle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.demo-metric-label { font-size: 11px; color: var(--subtext0); text-transform: uppercase; letter-spacing: 0.06em; }
.demo-metric-value { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1; }
.demo-metric-trend { font-size: 11px; color: var(--subtext0); }

.demo-funnel { display: flex; flex-direction: column; gap: 8px; }
.demo-funnel-row { display: flex; align-items: center; gap: 12px; }
.demo-funnel-label { width: 110px; font-size: 12px; color: var(--subtext); }
.demo-funnel-bar { flex: 1; height: 24px; background: var(--surface0); border-radius: 4px; overflow: hidden; }
.demo-funnel-fill {
  height: 100%; background: var(--mauve); color: var(--crust);
  display: flex; align-items: center; justify-content: flex-end;
  padding: 0 8px; font-size: 11px; font-weight: 600; min-width: 22px;
}

.demo-hist {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: end; gap: 6px; height: 140px;
}
.demo-hist-bar { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.demo-hist-fill { width: 100%; background: var(--mauve); border-radius: 3px 3px 0 0; min-height: 2px; }
.demo-hist-fill.poor { background: var(--score-poor); }
.demo-hist-fill.low { background: var(--score-low); }
.demo-hist-fill.decent { background: var(--score-decent); }
.demo-hist-fill.good { background: var(--score-good); }
.demo-hist-fill.excellent { background: var(--score-excellent); }
.demo-hist-bar span { font-size: 10px; color: var(--subtext0); }

/* ── Profile summary cards (light styling on top of dashboard tokens) ─ */
.demo-profile-card {
  background: var(--mantle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}
.demo-profile-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.demo-profile-card-head h3 { margin: 0; color: var(--text); font-size: 16px; }
.demo-profile-card-head .demo-profile-sub { font-size: 12px; color: var(--subtext0); margin: 4px 0 0 0; }
.demo-profile-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px 16px;
  margin: 0;
}
.demo-profile-list > div { display: contents; }
.demo-profile-list dt { color: var(--subtext0); font-size: 12px; }
.demo-profile-list dd { color: var(--text); font-size: 13px; margin: 0; }

.demo-archetype { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 14px; }
.demo-archetype:last-child { margin-bottom: 0; }
.demo-archetype strong { color: var(--text); font-size: 14px; }
.demo-archetype p { color: var(--subtext); font-size: 12px; line-height: 1.5; margin: 0; grid-column: 1 / -1; }
.demo-archetype-fit {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; align-self: start;
}
.demo-archetype-fit.primary { background: rgba(166, 227, 161, 0.15); color: var(--green); }
.demo-archetype-fit.secondary { background: var(--surface0); color: var(--subtext); }
