/* =========================================================
   PMP DIGITAL — DESIGN SYSTEM v2
   Dual theme (dark + light) · 3 fonts · Real PMP symbol
   Inspirations: Nixtio motion, ClickUp clarity, F1 performance
   ========================================================= */

/* ---------- BASE BRAND TOKENS ---------- */
:root {
  /* Brand purples */
  --pmp-purple:   #A959FF;
  --pmp-purple-2: #8345C5;
  --pmp-purple-3: #48266D;
  --pmp-purple-soft: #BC78FF;
  --pmp-purple-pink: #FF6BD0;  /* accent for gradient highlights */

  /* Neutral scale — full grayscale */
  --white:    #FFFFFF;
  --gray-50:  #FAFAFB;
  --gray-100: #F4F4F4;   /* PMP off-white */
  --gray-200: #ECECEE;
  --gray-300: #DEDFE2;
  --gray-400: #C2C3C8;
  --gray-500: #92939A;
  --gray-600: #6C6D74;
  --gray-700: #44454B;
  --gray-800: #2A2B2C;   /* PMP graphite */
  --gray-900: #18191B;
  --gray-950: #0B0B0C;

  /* Status colors */
  --green: #4ade80;
  --green-deep: #16a34a;
  --red: #ff6b6b;
  --amber: #fbbf24;

  /* Type families */
  --font-display:  'Overpass', system-ui, sans-serif;
  --font-body:     'Overpass', system-ui, sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, monospace;
  --font-editorial:'Newsreader', Georgia, serif;

  /* Spacing scale (8-point) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Radii */
  --r-0: 0; --r-1: 4px; --r-2: 8px; --r-3: 14px; --r-pill: 999px;

  /* Easing */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-power: cubic-bezier(0.7, 0, 0.2, 1);
  --ease-snap:  cubic-bezier(0.65, 0, 0.35, 1);

  /* Gradients (theme-independent) */
  --grad-purple: linear-gradient(135deg, #A959FF 0%, #8345C5 55%, #48266D 100%);
  --grad-purple-pink: linear-gradient(90deg, #A959FF 0%, #BC78FF 45%, #FF6BD0 100%);
}

/* ---------- DARK THEME (default) ---------- */
:root, [data-theme="dark"] {
  --bg-0: var(--gray-950);
  --bg-1: #111113;
  --bg-2: #16171A;
  --bg-3: #1D1E22;
  --line: rgba(244,244,244,0.08);
  --line-strong: rgba(244,244,244,0.16);

  --fg: var(--gray-100);
  --fg-muted: rgba(244,244,244,0.62);
  --fg-faint: rgba(244,244,244,0.36);

  --glow: 0 0 60px rgba(169,89,255,0.35);
  --glow-soft: 0 0 30px rgba(169,89,255,0.18);

  --grad-text: linear-gradient(180deg, #F4F4F4 0%, rgba(244,244,244,0.55) 100%);
  --grad-purple-soft: radial-gradient(60% 80% at 30% 20%, rgba(169,89,255,0.18) 0%, rgba(169,89,255,0) 70%);
}

/* ---------- LIGHT THEME ---------- */
[data-theme="light"] {
  --bg-0: var(--white);
  --bg-1: var(--gray-50);
  --bg-2: var(--white);
  --bg-3: var(--gray-100);
  --line: rgba(42,43,44,0.10);
  --line-strong: rgba(42,43,44,0.20);

  --fg: var(--gray-800);
  --fg-muted: var(--gray-600);
  --fg-faint: var(--gray-500);

  --glow: 0 8px 40px rgba(169,89,255,0.18);
  --glow-soft: 0 4px 24px rgba(169,89,255,0.10);

  --grad-text: linear-gradient(180deg, #2A2B2C 0%, rgba(42,43,44,0.55) 100%);
  --grad-purple-soft: radial-gradient(60% 80% at 30% 20%, rgba(169,89,255,0.10) 0%, rgba(169,89,255,0) 70%);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-1);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--pmp-purple); color: #0B0B0C; }

/* ---------- TYPOGRAPHY UTILITIES ---------- */
.t-display {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: clamp(56px, 9vw, 156px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  padding-bottom: 0.08em;
}
.t-h1 {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  padding-bottom: 0.08em;
}
.t-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  padding-bottom: 0.06em;
}
.t-h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px; line-height: 1.25;
  letter-spacing: -0.01em;
}
.t-h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px; line-height: 1.3;
}
.t-bold-l { font-weight: 700; font-size: 20px; line-height: 1.4; }
.t-bold-m { font-weight: 700; font-size: 16px; line-height: 1.45; }
.t-bold-s { font-weight: 700; font-size: 14px; line-height: 1.5; }

.t-para   { font-weight: 400; font-size: 18px; line-height: 1.55; color: var(--fg-muted); }
.t-reg-l  { font-weight: 400; font-size: 18px; line-height: 1.55; }
.t-reg-m  { font-weight: 400; font-size: 16px; line-height: 1.55; }
.t-reg-s  { font-weight: 400; font-size: 14px; line-height: 1.5; color: var(--fg-muted); }

.t-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--fg-faint);
}
.t-mono-sm {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.t-editorial {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 500;
  font-size: 1.04em;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 72;
  padding-right: 0.08em;
}
.t-grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t-grad-purple {
  background: var(--grad-purple-pink);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.06em;
}

/* ---------- LAYOUT PRIMITIVES ---------- */
.container { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 32px; }
.section {
  padding: var(--s-10) 0;
  position: relative;
  overflow: hidden;
  background: var(--bg-1);
  color: var(--fg);
  transition: background 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 32px; margin-bottom: 64px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 16px 0 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 12px; }
.eyebrow::before {
  content: ""; display: block;
  width: 28px; height: 2px;
  background: var(--pmp-purple);
  border-radius: 2px;
}
.eyebrow .label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pmp-purple);
  font-weight: 600;
}

/* Mouse-following glow for dark sections */
.section[data-theme="dark"] .glow-cursor,
[data-theme="dark"] .glow-cursor {
  position: absolute;
  pointer-events: none;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169,89,255,0.22) 0%, rgba(169,89,255,0) 65%);
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.section.has-glow:hover .glow-cursor { opacity: 1; }
.section > .container { position: relative; z-index: 2; }

/* ---------- NAV — Floating pill, glass, modern ---------- */
.nav {
  position: fixed; top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: calc(100% - 32px);
  max-width: 1280px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 10px 12px 10px 22px;
  background: rgba(11,11,12,0.55);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(244,244,244,0.10);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 8px 40px rgba(0,0,0,0.45),
    0 0 0 1px rgba(169,89,255,0.04);
  transition: background 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-out);
}
.nav.is-light {
  background: rgba(255,255,255,0.62);
  border-color: rgba(42,43,44,0.12);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 8px 40px rgba(42,43,44,0.10),
    0 0 0 1px rgba(169,89,255,0.06);
  color: var(--gray-800);
}
.nav.is-scrolled {
  top: 12px;
  transform: translateX(-50%) scale(0.985);
}

.nav-logo {
  display: inline-flex; align-items: center; gap: 0;
  height: 36px;
  padding: 0 12px 0 4px;
}
.nav-logo img {
  height: 26px;
  width: auto;
  display: block;
  transition: opacity 0.3s;
}
.nav-logo .logo-light { display: block; }
.nav-logo .logo-dark  { display: none; }
.nav.is-light .nav-logo .logo-light { display: none; }
.nav.is-light .nav-logo .logo-dark  { display: block; }

.nav-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px;
  background: rgba(244,244,244,0.04);
  border: 1px solid rgba(244,244,244,0.06);
  border-radius: 999px;
  justify-self: center;
}
.nav.is-light .nav-links {
  background: rgba(42,43,44,0.04);
  border-color: rgba(42,43,44,0.08);
}
.nav-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  color: rgba(244,244,244,0.65);
  font-weight: 500;
  transition: color 0.25s var(--ease-out), background 0.25s var(--ease-out);
  position: relative;
  white-space: nowrap;
}
.nav-links a .num {
  color: var(--pmp-purple);
  font-weight: 600;
  opacity: 0.7;
  transition: opacity 0.25s;
}
.nav-links a:hover { color: var(--gray-100); background: rgba(244,244,244,0.06); }
.nav-links a:hover .num { opacity: 1; }
.nav-links a.is-active {
  color: #0B0B0C;
  background: var(--gray-100);
}
.nav-links a.is-active .num { color: var(--pmp-purple-2); opacity: 1; }
.nav.is-light .nav-links a { color: var(--gray-600); }
.nav.is-light .nav-links a:hover { color: var(--gray-800); background: rgba(42,43,44,0.05); }
.nav.is-light .nav-links a.is-active {
  color: var(--gray-100);
  background: var(--gray-800);
}

.nav-meta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(244,244,244,0.55);
  padding-right: 4px;
}
.nav.is-light .nav-meta { color: var(--gray-500); }
.nav-meta .clock {
  display: none;
}
.nav-meta .live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.6s infinite var(--ease-out);
}
.nav-meta .ver {
  padding: 4px 10px;
  border: 1px solid rgba(244,244,244,0.12);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}
.nav.is-light .nav-meta .ver { border-color: rgba(42,43,44,0.14); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Theme toggle pill — pill inside the nav pill */
.theme-toggle {
  display: inline-flex; align-items: center;
  background: rgba(244,244,244,0.06);
  border: 1px solid rgba(244,244,244,0.08);
  border-radius: 999px;
  padding: 3px;
  gap: 0;
}
.nav.is-light .theme-toggle {
  background: rgba(42,43,44,0.05);
  border-color: rgba(42,43,44,0.10);
}
.theme-toggle button {
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(244,244,244,0.55);
  transition: all 0.3s;
  font-weight: 500;
}
.nav.is-light .theme-toggle button { color: var(--gray-500); }
.theme-toggle button.active {
  background: var(--pmp-purple); color: #0B0B0C;
  font-weight: 700;
}

/* Push hero down to clear floating nav */
.hero { padding-top: 160px; }

/* ---------- HERO (Nixtio-style) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--gray-950);
  color: var(--gray-100);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 80% at 30% 20%, rgba(169,89,255,0.18) 0%, rgba(169,89,255,0) 70%),
    radial-gradient(40% 60% at 80% 80%, rgba(131,69,197,0.18) 0%, rgba(0,0,0,0) 60%);
  pointer-events: none;
  z-index: 1;
}

/* Nixtio-style drifting BIG background text */
.hero-bg-text {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.hero-bg-text .row {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: clamp(120px, 18vw, 280px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgba(244,244,244,0.04);
  white-space: nowrap;
  display: flex; align-items: center; gap: 80px;
  width: max-content;
  animation: drift 60s linear infinite;
}
.hero-bg-text .row.r2 { animation-duration: 80s; animation-direction: reverse; }
.hero-bg-text .row .bg-sym {
  display: inline-flex;
  width: 0.7em; height: 0.62em;
  color: rgba(169,89,255,0.10);
  flex-shrink: 0;
}
.hero-bg-text .row .bg-sym svg { width: 100%; height: 100%; }
@keyframes drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Grain texture overlay */
.hero-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 2;
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(244,244,244,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244,244,244,0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(80% 60% at 50% 50%, #000 0%, transparent 90%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 50%, #000 0%, transparent 90%);
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative; z-index: 3;
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(244,244,244,0.16);
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(244,244,244,0.62);
  margin-bottom: 32px;
  background: rgba(244,244,244,0.02);
}
.hero-eyebrow .bracket { color: var(--pmp-purple); font-weight: 700; }
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pmp-purple); box-shadow: 0 0 10px var(--pmp-purple);
}

.hero-title { margin: 0 0 28px; color: var(--gray-100); font-size: clamp(48px, 7vw, 116px); line-height: 1.02; letter-spacing: -0.03em; }
.hero-title .reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.05em 0.06em 0.22em;
  margin: -0.05em -0.06em -0.22em;
}
.hero-title .reveal > span { display: inline-block; animation: rise 1.1s var(--ease-out) both; }
.hero-title .l2 .reveal > span { animation-delay: 0.10s; }
.hero-title .l3 .reveal > span { animation-delay: 0.20s; }
.hero-title .l4 .reveal > span { animation-delay: 0.30s; }
@keyframes rise {
  from { transform: translateY(105%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.hero-title .line { display: block; }
.hero-title .editorial {
  font-family: var(--font-editorial);
  font-style: italic;
  font-weight: 500;
  background: var(--grad-purple-pink);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
}
.hero-sub {
  max-width: 540px; color: rgba(244,244,244,0.7);
  font-size: 19px; line-height: 1.55;
  margin: 0 0 40px;
  animation: fadeUp 1s 0.4s both var(--ease-out);
}
@keyframes fadeUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.hero-cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  animation: fadeUp 1s 0.55s both var(--ease-out);
}

/* Hero right: 3D brand image + telemetry frame */
.hero-motif {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  animation: fadeUp 1.2s 0.3s both var(--ease-out);
}
.hero-motif .frame {
  position: absolute; inset: 0;
  border: 1px solid rgba(244,244,244,0.08);
  border-radius: var(--r-3);
  background:
    radial-gradient(80% 80% at 50% 50%, rgba(169,89,255,0.10) 0%, transparent 70%),
    #16171A;
  overflow: hidden;
}
.hero-motif .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0.95;
  filter: saturate(1.1);
}
.hero-motif .corner {
  position: absolute;
  width: 18px; height: 18px;
  color: var(--pmp-purple); z-index: 3;
}
.hero-motif .corner.tl { top: 12px; left: 12px; border-left: 1px solid; border-top: 1px solid; }
.hero-motif .corner.tr { top: 12px; right: 12px; border-right: 1px solid; border-top: 1px solid; }
.hero-motif .corner.bl { bottom: 12px; left: 12px; border-left: 1px solid; border-bottom: 1px solid; }
.hero-motif .corner.br { bottom: 12px; right: 12px; border-right: 1px solid; border-bottom: 1px solid; }
.hero-motif .telemetry {
  position: absolute; z-index: 3;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(244,244,244,0.45);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.hero-motif .telemetry.t-tl { top: 36px; left: 36px; }
.hero-motif .telemetry.t-tr { top: 36px; right: 36px; text-align: right; }
.hero-motif .telemetry.t-bl { bottom: 36px; left: 36px; }
.hero-motif .telemetry.t-br { bottom: 36px; right: 36px; text-align: right; color: var(--pmp-purple); }
.hero-motif .telemetry .val { color: var(--gray-100); font-weight: 700; font-size: 13px; display: block; margin-top: 2px; }
.hero-motif .telemetry.t-br .val { color: var(--pmp-purple); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 700;
  font-size: 14px; letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn .ico { display: inline-flex; transition: transform 0.4s var(--ease-power); }
.btn:hover .ico { transform: translateX(4px); }

.btn-primary { background: var(--pmp-purple); color: #0B0B0C; }
.btn-primary:hover {
  background: var(--pmp-purple-soft);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  background: var(--bg-3); color: var(--fg-faint);
  cursor: not-allowed; box-shadow: none; transform: none;
}

.btn-secondary {
  background: transparent; color: var(--fg);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: rgba(127,127,127,0.08);
  border-color: var(--fg);
  transform: translateY(-2px);
}

.btn-ghost { background: transparent; color: var(--fg-muted); padding: 10px 14px; }
.btn-ghost:hover { color: var(--fg); background: rgba(127,127,127,0.06); }

.btn-icon {
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-grid; place-items: center;
  color: var(--fg);
}
.btn-icon:hover { background: rgba(127,127,127,0.08); transform: rotate(-15deg); }

/* ---------- INPUTS ---------- */
.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-muted);
}
.input {
  width: 100%; padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  transition: all 0.25s var(--ease-out);
}
.input::placeholder { color: var(--fg-faint); }
.input:hover { border-color: var(--line-strong); }
.input:focus {
  outline: none;
  border-color: var(--pmp-purple);
  background: var(--bg-3);
  box-shadow: 0 0 0 4px rgba(169,89,255,0.12);
}
.input.error { border-color: var(--red); box-shadow: 0 0 0 4px rgba(255,107,107,0.12); }
.input:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- CARDS ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 28px;
  transition: transform 0.4s var(--ease-out), border-color 0.3s, box-shadow 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}
.card.card-accent::before {
  content: ""; position: absolute; inset: 0;
  background: var(--grad-purple-soft);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.card.card-accent:hover::before { opacity: 1; }
.card.card-accent:hover { box-shadow: var(--glow-soft); }
.card > * { position: relative; z-index: 1; }

.card-kpi { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.card-kpi .kpi-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg-faint);
  display: flex; align-items: center; gap: 8px;
}
.card-kpi .kpi-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pmp-purple);
}
.card-kpi .kpi-value {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: 56px; line-height: 1;
  letter-spacing: -0.025em;
  color: var(--fg);
}
.card-kpi .kpi-delta {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--green);
  display: flex; align-items: center; gap: 6px;
}
.card-kpi .kpi-delta.neg { color: var(--red); }

/* ---------- TAGS ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-muted);
  transition: all 0.25s var(--ease-out);
}
.tag:hover { color: var(--fg); border-color: var(--fg); }
.tag.tag-solid { background: var(--pmp-purple); color: #0B0B0C; border-color: var(--pmp-purple); }
.tag.tag-ghost { border-style: dashed; }

/* ---------- SWATCHES ---------- */
.swatch {
  border-radius: var(--r-3); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  transition: transform 0.3s var(--ease-out);
}
.swatch:hover { transform: translateY(-4px); }
.swatch .chip { height: 140px; position: relative; }
.swatch .chip .role {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.swatch .chip.dark .role { color: rgba(244,244,244,0.78); }
.swatch .chip.light .role { color: rgba(0,0,0,0.65); }
.swatch .meta { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.swatch .meta .name { font-weight: 700; font-size: 15px; }
.swatch .meta .hex {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: 0.04em;
}

/* ---------- ICONS ---------- */
.icon {
  width: 24px; height: 24px;
  stroke: currentColor; stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- TYPE SPEC TABLE ---------- */
.type-spec { display: flex; flex-direction: column; }
.type-row {
  display: grid;
  grid-template-columns: 160px 1fr 180px;
  align-items: center; gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  transition: background 0.3s var(--ease-out);
}
.type-row:hover { background: rgba(127,127,127,0.03); }
.type-row:last-child { border-bottom: 1px solid var(--line); }
.type-row .label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-muted);
}
.type-row .preview { min-width: 0; }
.type-row .spec {
  text-align: right;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
}

/* ---------- LAYOUT GALLERY ---------- */
.layout-demo {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 32px;
}
.layout-demo .caption {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 16px;
  display: flex; justify-content: space-between;
}
.layout-demo .caption .right { color: var(--pmp-purple); }
.layout-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px;
}
.layout-grid .cell {
  height: 60px;
  background: rgba(169,89,255,0.08);
  border: 1px dashed rgba(169,89,255,0.35);
  border-radius: var(--r-1);
}
.layout-split { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.layout-split .block {
  background: var(--bg-3);
  border-radius: var(--r-2);
  height: 140px;
  display: grid; place-items: center;
  color: var(--fg-faint);
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
}

/* ---------- MOTION GALLERY ---------- */
.motion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.motion-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color 0.3s;
}
.motion-card:hover { border-color: var(--line-strong); }
.motion-card .stage {
  height: 200px;
  display: grid; place-items: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(50% 80% at 50% 50%, rgba(169,89,255,0.08) 0%, transparent 70%);
}
.motion-card .meta {
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.motion-card .meta .name { font-weight: 700; font-size: 14px; }
.motion-card .meta .timing {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-faint);
}

.demo-lift {
  width: 80px; height: 80px;
  background: var(--pmp-purple);
  border-radius: var(--r-2);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.motion-card:hover .demo-lift {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(169,89,255,0.35);
}
.demo-glow {
  width: 80px; height: 80px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  transition: box-shadow 0.5s var(--ease-out), border-color 0.5s;
}
.motion-card:hover .demo-glow {
  box-shadow: 0 0 60px rgba(169,89,255,0.5);
  border-color: var(--pmp-purple);
}
.demo-rotate svg { transition: transform 1s var(--ease-power); }
.motion-card:hover .demo-rotate svg { transform: rotate(360deg); }

.demo-stagger { display: flex; gap: 6px; }
.demo-stagger .bar {
  width: 12px; height: 60px;
  background: var(--pmp-purple);
  border-radius: 2px;
  transform-origin: bottom;
  animation: bar 1.8s var(--ease-out) infinite;
}
.demo-stagger .bar:nth-child(2) { animation-delay: 0.1s; }
.demo-stagger .bar:nth-child(3) { animation-delay: 0.2s; }
.demo-stagger .bar:nth-child(4) { animation-delay: 0.3s; }
.demo-stagger .bar:nth-child(5) { animation-delay: 0.4s; }
@keyframes bar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.demo-reveal {
  width: 110px; height: 100px;
  display: inline-flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
  color: var(--pmp-purple);
}
.demo-reveal .pmp-symbol {
  width: 100%; height: 100%;
  display: block;
  animation: reveal 1.8s var(--ease-out) infinite;
  transform-origin: center;
}
.demo-reveal .pmp-symbol svg { width: 100%; height: 100%; display: block; }
@keyframes reveal {
  0%   { transform: translateY(100%); opacity: 0; }
  20%  { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(0);    opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}

.demo-scan {
  width: 120px; height: 4px;
  background: var(--line); border-radius: var(--r-pill);
  position: relative; overflow: hidden;
}
.demo-scan::after {
  content: ""; position: absolute;
  top: 0; left: 0; bottom: 0; width: 40%;
  background: var(--grad-purple);
  border-radius: var(--r-pill);
  animation: scan 2s var(--ease-power) infinite;
}
@keyframes scan {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  background: var(--bg-0);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 48px;
  align-items: center;
  animation: marquee 70s linear infinite;
  width: max-content;
}
.marquee-item {
  display: inline-flex; align-items: center;
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: 44px;
  letter-spacing: -0.025em;
  white-space: nowrap;
  color: var(--fg);
  line-height: 1;
}
.marquee-item.is-sep {
  color: var(--pmp-purple);
  opacity: 0.85;
  transition: transform 14s linear, opacity 0.3s;
}
.marquee-item.is-sep .pmp-symbol {
  width: 36px; height: 32px;
  display: block;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- DASHBOARD — storytelling layout ---------- */
.dash {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.dash > * { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-3); padding: 24px; }
.dash-tile-1 { grid-column: span 3; }
.dash-tile-2 { grid-column: span 6; }
.dash-tile-3 { grid-column: span 3; }
.dash-tile-wide { grid-column: span 8; }
.dash-tile-side { grid-column: span 4; }
.dash-tile-half { grid-column: span 6; }
.dash-tile-full { grid-column: span 12; }

.dash-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.dash-head .title {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-muted);
  display: flex; align-items: center; gap: 8px;
}
.dash-head .title::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pmp-purple);
}
.dash-head .right { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); }

/* ---------- KPI TILES — hero metric, sparkline, comparison ---------- */
.kpi-tile {
  display: flex; flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.kpi-tile.is-primary {
  background: linear-gradient(155deg, rgba(169,89,255,0.16) 0%, transparent 55%), var(--bg-2);
  border-color: rgba(169,89,255,0.22);
}
.kpi-tile .top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.kpi-tile .label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-muted);
  display: flex; align-items: center; gap: 8px;
  line-height: 1.3;
}
.kpi-tile .label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pmp-purple);
  flex-shrink: 0;
}
.kpi-tile .status {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.kpi-tile .status.healthy { color: var(--green); background: rgba(74,222,128,0.10); border: 1px solid rgba(74,222,128,0.18); }
.kpi-tile .status.warning { color: var(--amber); background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.18); }
.kpi-tile .status.critical { color: var(--red); background: rgba(255,107,107,0.10); border: 1px solid rgba(255,107,107,0.18); }
.kpi-tile .status.new { color: var(--pmp-purple); background: rgba(169,89,255,0.10); border: 1px solid rgba(169,89,255,0.22); }

.kpi-tile .value {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: 56px; line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--fg);
  display: flex; align-items: baseline; gap: 4px;
}
.kpi-tile .value .unit {
  font-size: 22px;
  font-style: italic;
  font-weight: 700;
  color: var(--pmp-purple);
  letter-spacing: -0.01em;
}
.kpi-tile .value .secondary {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-muted);
  letter-spacing: -0.01em;
}
.kpi-tile .delta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}
.kpi-tile .delta.up { color: var(--green); background: rgba(74,222,128,0.10); }
.kpi-tile .delta.down-good { color: var(--green); background: rgba(74,222,128,0.10); }
.kpi-tile .delta.down-bad { color: var(--red); background: rgba(255,107,107,0.10); }

.kpi-tile .spark {
  height: 36px;
  margin: 0 -2px -2px -2px;
}
.kpi-tile .spark svg { width: 100%; height: 100%; display: block; }
.kpi-tile .meta-row {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-faint);
  letter-spacing: 0.08em; text-transform: uppercase;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.kpi-tile .meta-row .target { color: var(--fg-muted); }
.kpi-tile .meta-row .target b { color: var(--fg); font-weight: 600; }

/* legacy still used in components KPI showcase */
.dash-big {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 48px; line-height: 1; letter-spacing: -0.025em;
  margin: 8px 0 4px;
}
.dash-delta {
  font-family: var(--font-mono); font-size: 12px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.dash-delta.up { color: var(--green); background: rgba(74,222,128,0.10); }
.dash-delta.down { color: var(--red); background: rgba(255,107,107,0.10); }

/* ---------- INSIGHT BANNER — natural language pull quote ---------- */
.insight {
  grid-column: span 12;
  background: linear-gradient(120deg, rgba(169,89,255,0.10) 0%, rgba(255,107,208,0.06) 50%, transparent 100%);
  border: 1px solid rgba(169,89,255,0.22);
  border-radius: var(--r-3);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
}
.insight .icon-wrap {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(169,89,255,0.16);
  border: 1px solid rgba(169,89,255,0.32);
  display: grid; place-items: center;
  color: var(--pmp-purple);
  flex-shrink: 0;
}
.insight .icon-wrap .pmp-symbol { width: 24px; height: 22px; }
.insight .content { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.insight .tag-mono {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--pmp-purple); font-weight: 600;
}
.insight .headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--fg);
}
.insight .headline em {
  font-family: var(--font-editorial);
  font-weight: 500;
  font-style: italic;
  color: var(--pmp-purple);
  font-size: 1.06em;
}
.insight .cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--pmp-purple);
  color: #0B0B0C;
  font-family: var(--font-display); font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: all 0.3s var(--ease-out);
}
.insight .cta:hover { background: var(--pmp-purple-soft); transform: translateX(-2px); box-shadow: var(--glow-soft); }
.insight .cta svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* ---------- CHART AREAS ---------- */
.chart-bars {
  display: flex; align-items: flex-end; gap: 6px;
  height: 160px;
  padding-top: 16px;
}
.chart-bars .bar {
  flex: 1;
  background: linear-gradient(180deg, var(--pmp-purple) 0%, rgba(169,89,255,0.3) 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: opacity 0.2s, transform 0.2s;
  cursor: pointer;
}
.chart-bars .bar:hover { opacity: 0.85; transform: translateY(-2px); }
.chart-bars .bar.dim { background: linear-gradient(180deg, var(--gray-600) 0%, rgba(108,109,116,0.3) 100%); }
.chart-bars .bar.peak { background: linear-gradient(180deg, #FF6BD0 0%, var(--pmp-purple) 60%); box-shadow: 0 0 24px rgba(255,107,208,0.3); }
[data-theme="light"] .chart-bars .bar.dim { background: linear-gradient(180deg, var(--gray-400) 0%, rgba(194,195,200,0.3) 100%); }

.chart-line { width: 100%; height: 160px; }
.chart-axis {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- FUNNEL — visual journey of the money ---------- */
.funnel {
  display: flex; flex-direction: column;
  gap: 4px;
}
.funnel-step {
  display: grid;
  grid-template-columns: 180px 1fr 140px;
  align-items: center;
  gap: 24px;
  padding: 18px 0;
  position: relative;
}
.funnel-step + .funnel-step::before {
  content: "";
  position: absolute;
  top: -2px; left: 20px;
  width: 1px; height: 8px;
  background: var(--line);
}
.funnel-step .stage {
  display: flex; flex-direction: column; gap: 4px;
}
.funnel-step .stage .idx {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--pmp-purple); letter-spacing: 0.14em;
  font-weight: 600;
}
.funnel-step .stage .name {
  font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
}
.funnel-step .stage .sub {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-faint); letter-spacing: 0.06em; text-transform: uppercase;
}
.funnel-bar {
  height: 56px;
  border-radius: var(--r-2);
  background: var(--bg-3);
  position: relative;
  overflow: hidden;
  display: flex; align-items: center;
  padding-left: 18px;
}
.funnel-bar .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: var(--r-2);
  transform-origin: left center;
  transition: width 1s var(--ease-power);
}
.funnel-bar .num {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: 26px; line-height: 1; letter-spacing: -0.02em;
  color: var(--fg);
}
.funnel-step .end {
  text-align: right;
  display: flex; flex-direction: column; gap: 2px;
  align-items: flex-end;
}
.funnel-step .end .pct {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 18px; color: var(--fg);
  letter-spacing: -0.01em;
}
.funnel-step .end .conv {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-faint); letter-spacing: 0.08em; text-transform: uppercase;
}
.funnel-step .end .conv b { color: var(--pmp-purple); font-weight: 600; }

/* ---------- ROW LISTS (top campaigns / posts) ---------- */
.dash-row {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
.dash-row:last-child { border-bottom: none; }
.dash-row .left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.dash-row .rank {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-faint);
  letter-spacing: 0.1em;
  width: 18px;
}
.dash-row .avatar {
  width: 40px; height: 40px;
  border-radius: var(--r-2);
  background: var(--grad-purple);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 13px; color: #fff; font-weight: 700;
  flex-shrink: 0;
}
.dash-row .info { min-width: 0; }
.dash-row .info .label {
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 280px;
}
.dash-row .info .sub { font-family: var(--font-mono); font-size: 10px; color: var(--fg-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.dash-row .value {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 22px; letter-spacing: -0.02em;
  white-space: nowrap;
}

.donut {
  position: relative; width: 160px; height: 160px;
  margin: 0 auto;
  flex-shrink: 0;
}
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut .center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.donut .center .big {
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 30px; letter-spacing: -0.02em; line-height: 1;
}
.donut .center .small {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--fg-faint); letter-spacing: 0.14em; text-transform: uppercase;
  margin-top: 4px;
}

/* Channel breakdown row */
.channel-row {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.channel-row:last-child { border-bottom: none; }
.channel-row .dot { width: 10px; height: 10px; border-radius: 2px; }
.channel-row .name { font-weight: 700; font-size: 14px; letter-spacing: -0.005em; }
.channel-row .bar {
  width: 80px; height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.channel-row .bar .fill { height: 100%; border-radius: 2px; }
.channel-row .pct {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  color: var(--fg-muted);
  min-width: 36px; text-align: right;
}

/* Score / Health gauge */
.health-gauge {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 8px 0;
}
.health-gauge .ring {
  width: 160px; height: 100px;
  position: relative;
}
.health-gauge .ring svg { width: 100%; height: 100%; }
.health-gauge .ring .num {
  position: absolute; bottom: 0; left: 0; right: 0;
  text-align: center;
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  font-size: 36px; letter-spacing: -0.02em; line-height: 1;
}
.health-gauge .scale {
  display: flex; justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono); font-size: 9px;
  color: var(--fg-faint); letter-spacing: 0.1em;
  margin-top: -4px;
}

/* Dashboard part header */
.dash-part-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.dash-part-head .ix {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--pmp-purple); letter-spacing: 0.14em;
  font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.dash-part-head .ix::before { content: ""; width: 24px; height: 2px; background: var(--pmp-purple); border-radius: 2px; }
.dash-part-head .ctx {
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-faint); letter-spacing: 0.08em; text-transform: uppercase;
}
.dash-part-head .ctx .live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: pulse 1.6s infinite var(--ease-out);
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  background: var(--bg-0);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer .col h4 {
  font-family: var(--font-mono);
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--fg-faint);
  margin: 0 0 16px; font-weight: 500;
}
.footer .col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer .col a { color: var(--fg-muted); transition: color 0.2s; }
.footer .col a:hover { color: var(--fg); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px; color: var(--fg-faint);
  letter-spacing: 0.06em; text-transform: uppercase;
}

.footer-logo {
  height: 56px; width: auto; display: block;
  margin-bottom: 16px;
}
.footer .logo-light { display: block; }
.footer .logo-dark  { display: none; }
[data-theme="light"] .footer .logo-light { display: none; }
[data-theme="light"] .footer .logo-dark  { display: block; }

/* ---------- LIGHT-MODE OVERRIDES for hardcoded dark colors ---------- */
[data-theme="light"] .chart-bars .bar.dim {
  background: linear-gradient(180deg, var(--gray-400) 0%, rgba(194,195,200,0.3) 100%);
}
[data-theme="light"] .chart-line line {
  stroke: rgba(42,43,44,0.08) !important;
}
[data-theme="light"] .chart-line path[stroke^="rgba(244"] {
  stroke: rgba(42,43,44,0.25) !important;
}
[data-theme="light"] .donut svg circle[stroke^="rgba(244"] {
  stroke: rgba(42,43,44,0.10) !important;
}
[data-theme="light"] .funnel-bar {
  background: var(--gray-100);
}
[data-theme="light"] .insight {
  background: linear-gradient(120deg, rgba(169,89,255,0.10) 0%, rgba(255,107,208,0.06) 50%, transparent 100%);
  border-color: rgba(169,89,255,0.22);
}
[data-theme="light"] .insight .icon-wrap {
  background: rgba(169,89,255,0.10);
  border-color: rgba(169,89,255,0.30);
}
[data-theme="light"] .kpi-tile.is-primary {
  background: linear-gradient(155deg, rgba(169,89,255,0.10) 0%, transparent 55%), var(--bg-2);
  border-color: rgba(169,89,255,0.22);
}
/* Inline-style overrides in dashboard items (rgba whites) */
[data-theme="light"] .dash [style*="rgba(244,244,244,0.18)"],
[data-theme="light"] .dash [style*="rgba(244,244,244,0.20)"],
[data-theme="light"] .dash [style*="rgba(244,244,244,0.08)"] {
  background: var(--gray-200) !important;
}
[data-theme="light"] .dash [style*="background:var(--bg-3)"] {
  background: var(--gray-100) !important;
}

/* Cards stay readable in light */
[data-theme="light"] .card {
  background: var(--white);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(42,43,44,0.02);
}
[data-theme="light"] .swatch { background: var(--white); }
[data-theme="light"] .layout-demo { background: var(--white); }
[data-theme="light"] .motion-card { background: var(--white); }
[data-theme="light"] .input { background: var(--white); }

/* Section has-glow looks awkward in light \u2014 dim the cursor glow */
[data-theme="light"].has-glow .glow-cursor,
[data-theme="light"] .has-glow .glow-cursor {
  background: radial-gradient(circle, rgba(169,89,255,0.10) 0%, rgba(169,89,255,0) 65%);
}

/* Hero bg text contrast in light global mode (hero itself stays dark, no change needed) */

/* ---------- UTILS ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-5 { gap: 24px; } .gap-6 { gap: 32px; }
.items-center { align-items: center; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 32px; }
.text-muted { color: var(--fg-muted); } .text-faint { color: var(--fg-faint); }
.text-purple { color: var(--pmp-purple); }

/* Scroll reveal */
.reveal-up { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.reveal-up.is-in { opacity: 1; transform: translateY(0); }

/* PMP symbol mark utility */
.pmp-symbol {
  display: inline-flex;
  width: 36px; height: 32px;
  color: var(--pmp-purple);
}
.pmp-symbol svg { width: 100%; height: 100%; }
.pmp-symbol.lg { width: 72px; height: 64px; }
.pmp-symbol.xl { width: 120px; height: 108px; }

/* Responsive */
@media (max-width: 1100px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .nav-links { gap: 0; padding: 3px; }
  .nav-links a { padding: 7px 10px; font-size: 10px; }
  .nav-meta .ver { display: none; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-motif { max-width: 360px; margin: 0 auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .type-row { grid-template-columns: 100px 1fr; }
  .type-row .spec { grid-column: 1 / -1; text-align: left; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .layout-split { grid-template-columns: 1fr; }
  .dash-tile-1, .dash-tile-2, .dash-tile-3, .dash-tile-wide, .dash-tile-side, .dash-tile-half, .dash-tile-full { grid-column: span 12; }
  .nav-links { display: none; }
  .nav { grid-template-columns: auto auto; justify-content: space-between; }
  .insight { grid-template-columns: 1fr; gap: 16px; }
  .funnel-step { grid-template-columns: 1fr; gap: 8px; }
  .funnel-step .end { align-items: flex-start; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .marquee-item { font-size: 28px; }
}
