/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --page-bg: #0f0f10;
  --card-bg: #18181b;
  --accent: #00e5cc;
  --accent-light: #80f5ea;
  --accent-dark: #00bfad;
  --text: #e4e4e7;
  --muted: #71717a;
  --border: #27272a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f0f10 0%, #071a19 50%, #0f0f10 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.project-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e4e4e7 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.tagline {
  font-size: 15px;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.7;
}

.tagline code {
  background: rgba(66, 181, 172, 0.12);
  border: 1px solid rgba(66, 181, 172, 0.25);
  color: var(--accent-light);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tech-stack span {
  background: rgba(66, 181, 172, 0.1);
  border: 1px solid rgba(66, 181, 172, 0.22);
  color: var(--accent-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* ── Demo section ─────────────────────────────────────── */
.demo-section {
  padding: 64px 24px;
  border-bottom: 1px solid var(--border);
}

.demo-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Step nav ─────────────────────────────────────────── */
.step-nav {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 4px;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.step-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.step-btn.active {
  background: rgba(66, 181, 172, 0.12);
  border-color: var(--accent);
  color: var(--accent-light);
}

.step-num {
  width: 20px;
  height: 20px;
  background: var(--border);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-btn.active .step-num {
  background: var(--accent);
  color: #000;
}

.step-connector {
  height: 1px;
  width: 16px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Demo step transitions ────────────────────────────── */
.demo-step { display: block; }
.demo-step.hidden { display: none; }

/* ── Glow animation on Next/tip buttons ──────────────── */
.tip-next-btn {
  animation: prepGlow 1.6s ease-in-out infinite;
}

.tip-next-btn:disabled {
  animation: none;
}

@keyframes prepGlow {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(66, 181, 172, 0.5), 0 0 20px 4px rgba(66, 181, 172, 0.2); }
  50%       { box-shadow: 0 0 16px 4px rgba(136, 212, 207, 0.6), 0 0 32px 8px rgba(66, 181, 172, 0.25); }
}

/* ── Restart wrap ─────────────────────────────────────── */
.restart-wrap {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.next-btn {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.next-btn:hover { background: var(--accent-dark); }

.restart-btn {
  background: #374151;
  color: var(--text);
}

.restart-btn:hover { background: #4b5563; }

/* ── Walkthrough highlight blocks ───────────────────── */
.hl-block {
  transition: opacity 0.3s;
  margin-bottom: 4px;
}

.hl-block.hl-hidden { display: none; }

.hl-block.dimmed { max-height: 36px; overflow: hidden; opacity: 0.35; pointer-events: none; }

@keyframes hlReveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hl-block.revealed {
  animation: hlReveal 0.3s ease forwards;
}

.hl-content {
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.hl-block.revealed .hl-content {
  border-color: rgba(66, 181, 172, 0.35);
  background: rgba(66, 181, 172, 0.04);
}

.hl-block.dimmed .hl-content {
  border-color: transparent;
  background: transparent;
}

/* ── Spotlight tip card ──────────────────────────────── */
.spotlight-tip {
  display: none;
  align-items: flex-start;
  gap: 12px;
  background: rgba(66, 181, 172, 0.08);
  border: 1px solid rgba(66, 181, 172, 0.28);
  border-radius: 8px;
  padding: 11px 14px;
  margin-top: 10px;
}

.spotlight-tip.active { display: flex; }

.tip-text {
  font-size: 13px;
  color: var(--accent-light);
  line-height: 1.55;
  flex: 1;
}

.tip-text code {
  background: rgba(66, 181, 172, 0.12);
  color: var(--accent-light);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
}

.tip-next-btn {
  background: #00e5cc;
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
  font-family: inherit;
}

.tip-next-btn:hover { background: #00bfad; }

.tip-next-btn:disabled {
  background: #4a5568;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── PREPARiscope content step container ─────────────── */
.prep-step.hidden { display: none; }

/* ── App frame ────────────────────────────────────────── */
.prep-app-frame {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}


/* ── Two-column layout ────────────────────────────────── */
.prep-layout {
  display: flex;
  height: 520px;
}

.prep-left-panel {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: #16161a;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
  overflow-y: auto;
}

.prep-right-panel {
  flex: 1;
  overflow-y: auto;
  background: var(--card-bg);
  position: relative;
}

/* ── Month calendar widget ────────────────────────────── */
.prep-month-widget {
  padding: 12px 8px 8px;
  border-bottom: 1px solid var(--border);
}

.prep-month-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.prep-month-name {
  flex: 1;
  text-align: center;
  font-weight: 500;
  font-size: 13px;
  color: var(--text);
}

.prep-month-nav-btn, .prep-today-btn, .prep-day-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 3px;
}

.prep-month-nav-btn:hover, .prep-today-btn:hover, .prep-day-nav-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.prep-today-btn {
  font-size: 11px;
  border: 1px solid var(--border);
  padding: 1px 6px;
}

.prep-cal-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.prep-cal-table th {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  padding: 2px 0;
}

.prep-cal-table td {
  text-align: center;
  padding: 3px 0;
  font-size: 11px;
  cursor: default;
  border-radius: 50%;
  width: 29px;
  height: 29px;
  line-height: 23px;
  color: var(--text);
}

.prep-cal-table td:hover {
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.prep-day-today {
  position: relative;
  isolation: isolate;
  font-weight: 600;
}

.prep-cal-table td.prep-day-today {
  color: #000;
}

.prep-day-today::before {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
}

/* ── Agenda section ───────────────────────────────────── */
.prep-agenda-section {
  padding: 0;
  flex: 1;
}

.prep-agenda-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

.prep-agenda-date {
  font-size: 13px;
  color: var(--text);
}

.prep-agenda-list {
  padding: 6px;
}

.prep-booking {
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 4px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.prep-booking:hover {
  background: rgba(66, 181, 172, 0.08);
  border-color: rgba(66, 181, 172, 0.3);
}

.prep-booking--selected {
  background: rgba(66, 181, 172, 0.12) !important;
  border-color: rgba(66, 181, 172, 0.45) !important;
}

.prep-booking--upcoming {
  opacity: 0.55;
}

.prep-bk-time {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
  font-weight: 400;
}

.prep-bk-title {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 2px;
}

.prep-bk-meta {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}

.prep-bk-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.prep-sf-badge, .prep-call-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.prep-sf-badge {
  background: #e8f0fb;
  color: #0070d2;
}

.prep-call-badge {
  background: #1a6ef5;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
}

.prep-call-badge:hover {
  background: #1558cc;
}

/* ── Empty state (step 0) ─────────────────────────────── */
.prep-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 40px 24px;
  color: var(--muted);
}

.prep-empty-icon {
  color: var(--muted);
  margin-bottom: 16px;
}

.prep-empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}

.prep-empty-sub {
  font-size: 12px;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.5;
}

/* ── Dashboard toolbar ────────────────────────────────── */
.pd-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pd-toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #16161a;
}

.pd-toolbar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.pd-toolbar-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pd-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  color: var(--muted);
}

.pd-filter-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 2px;
}

.pd-filter-pill strong {
  color: var(--text);
}

/* ── KPI cards ────────────────────────────────────────── */
.pd-kpi-row {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  flex-wrap: wrap;
}

.pd-kpi-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  min-width: 90px;
  text-align: center;
}

.pd-kpi-card--hot {
  border-color: rgba(66, 181, 172, 0.35);
  background: rgba(66, 181, 172, 0.06);
}

.pd-kpi-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 4px;
}

.pd-kpi-neutral {
  color: var(--muted) !important;
}

.pd-kpi-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.pd-kpi-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Sparkline chart ──────────────────────────────────── */
.pd-sparkline-section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.pd-sparkline-title {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  font-weight: 500;
}

.pd-sparkline-wrap {
  position: relative;
}

.pd-sparkline {
  width: 100%;
  height: 60px;
  display: block;
}

.pd-spark-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  padding-top: 4px;
}

.pd-spark-axis span:last-child {
  color: #00e5cc;
  font-weight: 600;
}

/* ── Win score section ────────────────────────────────── */
.pd-score-section {
  display: flex;
  gap: 24px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.pd-score-main {
  flex-shrink: 0;
}

.pd-score-heading {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 10px;
}

.pd-score-big {
  font-size: 52px;
  font-weight: 700;
  color: #00e5cc;
  line-height: 1;
  display: inline-flex;
  align-items: flex-start;
}

.pd-score-pct {
  font-size: 22px;
  font-weight: 400;
  margin-top: 8px;
  color: #80f5ea;
}

.pd-score-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-top: 10px;
  width: 140px;
  overflow: hidden;
}

.pd-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #00e5cc, #80f5ea);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.pd-score-caption {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}

.pd-score-factors {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.pd-factor {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.pd-factor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e5cc;
  flex-shrink: 0;
}

.pd-factor-dot--neutral {
  background: var(--border);
}

.pd-factor--positive .pd-factor-dot {
  background: #00e5cc;
}

/* ── Comparison bar chart ─────────────────────────────── */
.pd-comparison-section {
  padding: 16px;
}

.pd-comp-heading {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: 12px;
}

.pd-bar-chart-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.pd-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.pd-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 110px;
  padding-right: 8px;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}

.pd-bars {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.pd-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pd-bar-col--acme .pd-bar-label {
  font-weight: 600;
  color: #00e5cc;
}

.pd-bar-inner {
  width: 52px;
  height: 110px;
  display: flex;
  align-items: flex-end;
}

.pd-bar {
  width: 52px;
  border-radius: 4px 4px 0 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 20px;
}

.pd-bar-won {
  background: linear-gradient(180deg, #00e5cc 0%, #00bfad 100%);
}

.pd-bar-acme {
  background: linear-gradient(180deg, #33ffe8 0%, #00e5cc 100%);
  border: 2px solid #00e5cc;
  box-shadow: 0 0 12px rgba(66, 181, 172, 0.35);
}

.pd-bar-lost {
  background: linear-gradient(180deg, #f08080 0%, #d96060 100%);
}

.pd-bar-num {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  padding-top: 4px;
}

.pd-bar-won .pd-bar-num,
.pd-bar-acme .pd-bar-num {
  color: #000;
}

.pd-bar-label {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

.pd-bar-this {
  font-size: 9px;
  color: #00e5cc;
  font-weight: 400;
}

.pd-comp-insight {
  background: rgba(66, 181, 172, 0.06);
  border: 1px solid rgba(66, 181, 172, 0.22);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.pd-insight-dot {
  flex-shrink: 0;
}

/* ── Dashboard loading skeleton ─────────────────────────── */
#dash-loading {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skel {
  background: linear-gradient(90deg, #252527 25%, #2a2a2c 50%, #252527 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}

.pd-skel-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.skel-title       { height: 18px; width: 90px; }
.skel-pill        { height: 26px; width: 130px; border-radius: 4px; }
.skel-pill--wide  { width: 180px; }

.pd-skel-kpis {
  display: flex;
  gap: 10px;
  padding: 4px 0;
}

.skel-kpi  { height: 72px; flex: 1; border-radius: 6px; }
.skel-chart { height: 78px; width: 100%; margin-top: 4px; }

/* ── Footer ───────────────────────────────────────────── */
.project-footer {
  padding: 40px 24px;
  text-align: center;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent-light); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 48px 16px 40px; }
  .demo-section { padding: 32px 12px; }

  .step-label { display: none; }
  .step-connector { width: 8px; }

  .prep-layout { flex-direction: column; height: auto; }
  .prep-left-panel { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .prep-month-widget { display: none; }
  .prep-right-panel { min-height: 280px; }

  .pd-kpi-row { gap: 8px; }
  .pd-kpi-card { min-width: 76px; padding: 8px 10px; }
  .pd-kpi-val { font-size: 20px; }

  .pd-score-section { flex-direction: column; gap: 16px; }
  .pd-score-big { font-size: 42px; }

  .pd-bar-chart-wrap { overflow-x: auto; }
}

/* ── Back button ────────────────────────────────────────── */
.back-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.back-btn:hover {
  background: rgba(14,165,233,0.15);
  color: var(--accent);
  border-color: var(--accent);
}
