/* ============================================================
   ECOMELK Pitch Deck — Modern Design System
   Scoped to .pd-* components, harmonized with portal tokens.
   ============================================================ */

/* ---- Pitch Deck Tokens ---- */
:root {
  --pd-primary: var(--setting-primary, #0f4c5c);
  --pd-accent: #1a936f;
  --pd-cyber: #06b6d4;
  --pd-violet: #7c3aed;
  --pd-amber: #e09f3e;
  --pd-rose: #e11d48;
  --pd-ink: #0f172a;
  --pd-slate: #475569;
  --pd-slate-soft: #64748b;
  --pd-line: #e2e8f0;
  --pd-line-soft: #eef2f5;
  --pd-surface: #ffffff;
  --pd-surface-soft: #f8fafc;
  --pd-surface-raise: #ffffff;
  --pd-shadow-sm: 0 2px 8px rgba(15, 76, 92, 0.05);
  --pd-shadow-md: 0 8px 24px rgba(15, 76, 92, 0.08);
  --pd-shadow-lg: 0 16px 40px rgba(15, 76, 92, 0.12);
  --pd-radius-sm: 10px;
  --pd-radius: 14px;
  --pd-radius-lg: 20px;
  --pd-radius-xl: 28px;
  --pd-grad-primary: linear-gradient(135deg, var(--pd-primary) 0%, #0b3a47 100%);
  --pd-grad-accent: linear-gradient(135deg, var(--pd-accent) 0%, #0f6b4f 100%);
  --pd-grad-cyber: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  --pd-grad-hero: radial-gradient(120% 120% at 100% 0%, rgba(6,182,212,0.18) 0%, rgba(6,182,212,0) 55%), radial-gradient(120% 120% at 0% 100%, rgba(15,76,92,0.22) 0%, rgba(15,76,92,0) 55%), linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

:root[data-theme="dark"] {
  --pd-ink: #f8fafc;
  --pd-slate: #cbd5e1;
  --pd-slate-soft: #94a3b8;
  --pd-line: #2a3548;
  --pd-line-soft: #1f2a3d;
  --pd-surface: #131a28;
  --pd-surface-soft: #0f1623;
  --pd-surface-raise: #18202e;
  --pd-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --pd-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --pd-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --pd-grad-hero: radial-gradient(120% 120% at 100% 0%, rgba(6,182,212,0.15) 0%, rgba(6,182,212,0) 55%), radial-gradient(120% 120% at 0% 100%, rgba(26,147,111,0.18) 0%, rgba(26,147,111,0) 55%), linear-gradient(135deg, #131a28 0%, #0f1623 100%);
}

/* High-contrast text */
:root[data-high-contrast="true"] .pd-page,
:root[data-high-contrast="true"] .pd-card {
  --pd-slate: var(--pd-ink);
}

/* Reduced motion */
:root[data-reduce-motion="true"] .pd-page *,
:root[data-reduce-motion="true"] .pd-page *::before,
:root[data-reduce-motion="true"] .pd-page *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

/* ---- Page frame ---- */
.pd-page {
  --pd-cat: var(--pd-primary);
  position: relative;
  color: var(--pd-ink);
  background: var(--pd-surface);
  padding: 2rem 2.25rem 2.5rem;
  border-radius: var(--pd-radius-lg);
  box-shadow: var(--pd-shadow-sm);
  margin-bottom: 1.25rem;
  scroll-margin-top: 1rem;
  animation: pdPageIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pdPageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.pd-page[data-category="challenge"]  { --pd-cat: var(--pd-rose); }
.pd-page[data-category="solution"]  { --pd-cat: var(--pd-accent); }
.pd-page[data-category="value"]     { --pd-cat: var(--pd-violet); }
.pd-page[data-category="market"]    { --pd-cat: var(--pd-cyber); }
.pd-page[data-category="tech"]      { --pd-cat: var(--pd-cyber); }
.pd-page[data-category="finance"]   { --pd-cat: var(--pd-amber); }
.pd-page[data-category="future"]    { --pd-cat: var(--pd-primary); }
.pd-page[data-category="services"]  { --pd-cat: var(--pd-accent); }
.pd-page[data-category="intro"]     { --pd-cat: var(--pd-primary); }

/* ---- Eyebrow ---- */
.pd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--pd-cat);
  text-transform: uppercase;
  background: color-mix(in srgb, var(--pd-cat) 12%, transparent);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}
.pd-eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--pd-cat);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pd-cat) 22%, transparent);
  animation: pdPulse 2.4s ease-in-out infinite;
}
@keyframes pdPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ---- Section header ---- */
.pd-section-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  border: none;
  padding: 0;
}
.pd-section-header h2 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--pd-primary);
  line-height: 1.25;
  margin: 0;
}
.pd-section-header .pd-section-meta {
  margin-inline-start: auto;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--pd-slate-soft);
  font-variant-numeric: tabular-nums;
}

/* ---- Lead text ---- */
.pd-lead {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--pd-slate);
  max-width: 70ch;
  text-align: justify;
  margin: 0 0 1.5rem;
}
.pd-lead strong { color: var(--pd-primary); font-weight: 700; }

/* ---- Hero ---- */
.pd-hero {
  position: relative;
  border-radius: var(--pd-radius-lg);
  padding: 2.5rem 2.25rem 2rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: var(--pd-grad-hero);
  border: 1px solid color-mix(in srgb, var(--pd-primary) 14%, transparent);
  box-shadow: var(--pd-shadow-md);
}
.pd-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 25%, color-mix(in srgb, var(--pd-accent) 14%, transparent) 0, transparent 42%),
    radial-gradient(circle at 82% 75%, color-mix(in srgb, var(--pd-cyber) 12%, transparent) 0, transparent 42%);
  pointer-events: none;
}
.pd-hero-content { position: relative; z-index: 1; }
.pd-hero-title {
  color: var(--pd-primary);
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 0.6rem;
}
.pd-hero-lead {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--pd-slate);
  max-width: 65ch;
  text-align: justify;
  margin: 0 0 1.4rem;
}

/* ---- Stat grid ---- */
.pd-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}
.pd-stat {
  background: color-mix(in srgb, var(--pd-surface) 90%, transparent);
  border: 1px solid color-mix(in srgb, var(--pd-primary) 12%, transparent);
  border-radius: var(--pd-radius-sm);
  padding: 0.85rem 0.6rem;
  text-align: center;
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pd-stat:hover { transform: translateY(-3px); box-shadow: var(--pd-shadow-sm); }
.pd-stat-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--pd-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.pd-stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--pd-slate-soft);
  margin-top: 0.25rem;
}
.pd-stat-num[data-count] { animation: pdCountPop 0.6s ease both; }
@keyframes pdCountPop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

/* ---- Card ---- */
.pd-card {
  position: relative;
  background: var(--pd-surface-raise);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
  padding: 1.35rem 1.45rem 1.45rem;
  box-shadow: var(--pd-shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}
.pd-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--pd-shadow-md);
  border-color: color-mix(in srgb, var(--pd-primary) 28%, transparent);
}
.pd-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: var(--pd-primary);
  transition: width 0.3s ease;
}
.pd-card:hover::before { width: 7px; }
.pd-card[data-tone="accent"]::before  { background: var(--pd-accent); }
.pd-card[data-tone="warning"]::before { background: var(--pd-amber); }
.pd-card[data-tone="danger"]::before  { background: var(--pd-rose); }
.pd-card[data-tone="cyber"]::before   { background: var(--pd-cyber); }
.pd-card[data-tone="violet"]::before  { background: var(--pd-violet); }
.pd-card[data-tone="ghost"]::before   { background: transparent; }

.pd-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}
.pd-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--pd-radius-sm);
  background: color-mix(in srgb, var(--pd-primary) 12%, transparent);
  color: var(--pd-primary);
}
.pd-card[data-tone="accent"] .pd-card-icon  { background: color-mix(in srgb, var(--pd-accent) 14%, transparent); color: var(--pd-accent); }
.pd-card[data-tone="warning"] .pd-card-icon { background: color-mix(in srgb, var(--pd-amber) 16%, transparent); color: var(--pd-amber); }
.pd-card[data-tone="danger"] .pd-card-icon  { background: color-mix(in srgb, var(--pd-rose) 14%, transparent); color: var(--pd-rose); }
.pd-card[data-tone="cyber"] .pd-card-icon   { background: color-mix(in srgb, var(--pd-cyber) 14%, transparent); color: var(--pd-cyber); }
.pd-card[data-tone="violet"] .pd-card-icon  { background: color-mix(in srgb, var(--pd-violet) 14%, transparent); color: var(--pd-violet); }
.pd-card-icon svg { width: 1.35rem; height: 1.35rem; }

.pd-card-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--pd-slate-soft);
  text-transform: uppercase;
}
.pd-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--pd-primary);
  margin: 0.1rem 0 0;
  line-height: 1.3;
}
.pd-card-body {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--pd-slate);
  text-align: justify;
}
.pd-card-body ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pd-card-body li {
  padding: 0.35rem 0;
  border-bottom: 1px dashed var(--pd-line);
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}
.pd-card-body li:last-child { border-bottom: none; }
.pd-card-body li::before {
  content: "▸";
  color: var(--pd-cat, var(--pd-accent));
  font-weight: 800;
  flex-shrink: 0;
}

/* Grids */
.pd-grid { display: grid; gap: 1rem; }
.pd-grid-2 { grid-template-columns: repeat(2, 1fr); }
.pd-grid-3 { grid-template-columns: repeat(3, 1fr); }
.pd-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 992px) {
  .pd-grid-3, .pd-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .pd-grid-2, .pd-grid-3, .pd-grid-4 { grid-template-columns: 1fr; }
}

/* ---- Pills / chips ---- */
.pd-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--pd-surface);
  border: 1px solid var(--pd-line);
  color: var(--pd-primary);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.pd-pill:hover { background: var(--pd-primary); color: #fff; border-color: var(--pd-primary); transform: translateY(-1px); }
.pd-pill[data-tone="accent"]  { color: var(--pd-accent); }
.pd-pill[data-tone="warning"] { color: var(--pd-amber); }
.pd-pill[data-tone="danger"]  { color: var(--pd-rose); }
.pd-pill[data-tone="cyber"]   { color: var(--pd-cyber); }
.pd-pill[data-tone="violet"]  { color: var(--pd-violet); }
.pd-pill.is-active {
  background: var(--pd-primary);
  color: #fff;
  border-color: var(--pd-primary);
}

.pd-chip {
  display: inline-block;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--pd-primary);
  color: #fff;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.pd-chip[data-tone="accent"]  { background: var(--pd-accent); }
.pd-chip[data-tone="warning"] { background: var(--pd-amber); color: var(--pd-ink); }
.pd-chip[data-tone="danger"]  { background: var(--pd-rose); }
.pd-chip[data-tone="cyber"]   { background: var(--pd-cyber); }
.pd-chip[data-tone="violet"]  { background: var(--pd-violet); }

/* ---- Tab bar ---- */
.pd-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.4rem;
  background: var(--pd-surface-soft);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
}
.pd-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--pd-radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pd-slate);
  cursor: pointer;
  transition: all 0.25s ease;
}
.pd-tab:hover { color: var(--pd-primary); background: color-mix(in srgb, var(--pd-primary) 6%, transparent); }
.pd-tab.is-active {
  background: var(--pd-grad-primary);
  color: #fff;
  border-color: var(--pd-primary);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--pd-primary) 28%, transparent);
}
.pd-tab .pd-tab-num {
  font-size: 0.72rem;
  font-weight: 800;
  background: color-mix(in srgb, currentColor 18%, transparent);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}
.pd-tab-panel { display: none; animation: pdFadeIn 0.35s ease; }
.pd-tab-panel.is-active { display: block; }
@keyframes pdFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Step flow (workflow) ---- */
.pd-step-flow {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  scroll-snap-type: x mandatory;
}
.pd-step {
  flex: 1 0 220px;
  scroll-snap-align: start;
  position: relative;
  background: var(--pd-surface-raise);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
  padding: 1rem 1.1rem 1.1rem;
  box-shadow: var(--pd-shadow-sm);
}
.pd-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--pd-grad-primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}
.pd-step-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--pd-primary);
  margin: 0 0 0.35rem;
}
.pd-step-desc {
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--pd-slate);
}
.pd-step::after {
  content: "←";
  position: absolute;
  top: 50%;
  left: -0.6rem;
  transform: translateY(-50%);
  color: var(--pd-cyber);
  font-weight: 800;
  font-size: 1.1rem;
  z-index: 2;
}
.pd-step:first-child::after { display: none; }

/* ---- Comparison table ---- */
.pd-comparison {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--pd-radius);
  overflow: hidden;
  border: 1px solid var(--pd-line);
  font-size: 0.88rem;
}
.pd-comparison thead th {
  background: var(--pd-grad-primary);
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1rem;
  text-align: center;
}
.pd-comparison thead th:first-child { text-align: right; }
.pd-comparison tbody td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--pd-line);
  color: var(--pd-slate);
  text-align: center;
  vertical-align: middle;
}
.pd-comparison tbody td:first-child {
  text-align: right;
  font-weight: 700;
  color: var(--pd-primary);
}
.pd-comparison tbody tr:last-child td { border-bottom: none; }
.pd-comparison tbody tr:nth-child(even) { background: var(--pd-surface-soft); }
.pd-comparison tbody tr:hover { background: color-mix(in srgb, var(--pd-primary) 6%, transparent); }
.pd-comparison .pd-yes { color: var(--pd-accent); font-weight: 800; }
.pd-comparison .pd-no  { color: var(--pd-rose); font-weight: 800; }
.pd-comparison .pd-partial { color: var(--pd-amber); font-weight: 800; }

/* ---- Callout / highlight ---- */
.pd-callout {
  background: color-mix(in srgb, var(--pd-cat, var(--pd-primary)) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--pd-cat, var(--pd-primary)) 22%, transparent);
  border-inline-start: 4px solid var(--pd-cat, var(--pd-primary));
  border-radius: var(--pd-radius-sm);
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
}
.pd-callout-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 800;
  color: var(--pd-cat, var(--pd-primary));
  margin: 0 0 0.5rem;
}
.pd-callout-body {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--pd-slate);
  text-align: justify;
  margin: 0;
}
.pd-callout-body strong { color: var(--pd-primary); }

/* ---- Progress bar (within cards) ---- */
.pd-progress {
  width: 100%;
  height: 8px;
  background: var(--pd-line);
  border-radius: 999px;
  overflow: hidden;
}
.pd-progress > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--pd-grad-primary);
  transition: width 0.6s ease;
}
.pd-progress[data-tone="accent"] > span  { background: var(--pd-grad-accent); }
.pd-progress[data-tone="warning"] > span { background: linear-gradient(135deg, var(--pd-amber), #b45309); }
.pd-progress[data-tone="danger"] > span  { background: linear-gradient(135deg, var(--pd-rose), #be123c); }
.pd-progress[data-tone="cyber"] > span   { background: var(--pd-grad-cyber); }

/* ---- Modal (problem mapping) ---- */
.pd-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  padding: 1.5rem;
}
.pd-modal.is-open { display: flex; animation: pdFadeIn 0.25s ease; }
.pd-modal-dialog {
  background: var(--pd-surface-raise);
  border-radius: var(--pd-radius-lg);
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.75rem 1.85rem;
  box-shadow: var(--pd-shadow-lg);
  position: relative;
  animation: pdModalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes pdModalIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.pd-modal-close {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  background: transparent;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--pd-slate-soft);
  display: grid;
  place-items: center;
  transition: background 0.2s;
}
.pd-modal-close:hover { background: var(--pd-surface-soft); color: var(--pd-rose); }
.pd-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pd-primary);
  margin: 0 0 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--pd-accent);
}
.pd-modal-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--pd-slate);
  text-align: justify;
}

/* ---- Expandable card ---- */
.pd-expand-card .pd-expand-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
}
.pd-expand-card.is-expanded .pd-expand-body {
  max-height: 1200px;
  opacity: 1;
  margin-top: 0.85rem;
}
.pd-expand-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--pd-surface-soft);
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--pd-primary);
  cursor: pointer;
  transition: all 0.2s;
}
.pd-expand-toggle:hover { background: var(--pd-primary); color: #fff; border-color: var(--pd-primary); }

/* ---- Feedback loop (circular) ---- */
.pd-feedback-loop {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  padding: 1.5rem 0.5rem;
}
.pd-feedback-node {
  position: relative;
  background: var(--pd-surface-raise);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
  padding: 0.85rem 0.75rem;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--pd-slate);
  box-shadow: var(--pd-shadow-sm);
  border-top: 3px solid var(--pd-cat, var(--pd-primary));
}
.pd-feedback-node strong { display: block; color: var(--pd-cat, var(--pd-primary)); font-size: 0.82rem; margin-bottom: 0.2rem; }
.pd-feedback-node::after {
  content: "↺";
  position: absolute;
  top: 50%;
  inset-inline-start: -0.65rem;
  transform: translateY(-50%);
  color: var(--pd-cyber);
  font-weight: 800;
  font-size: 1rem;
  z-index: 2;
}
.pd-feedback-node:first-child::after { display: none; }
@media (max-width: 768px) {
  .pd-feedback-loop { grid-template-columns: 1fr; }
  .pd-feedback-node::after { content: "↓"; inset-inline-start: 50%; top: -0.85rem; transform: translateX(-50%); }
}

/* ---- CTA button ---- */
.pd-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--pd-grad-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--pd-primary) 30%, transparent);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pd-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 30px color-mix(in srgb, var(--pd-primary) 38%, transparent); }
.pd-cta[data-tone="accent"] { background: var(--pd-grad-accent); box-shadow: 0 8px 22px color-mix(in srgb, var(--pd-accent) 30%, transparent); }
.pd-cta-ghost {
  background: transparent;
  color: var(--pd-primary);
  border: 1.5px solid var(--pd-primary);
  box-shadow: none;
}
.pd-cta-ghost:hover { background: var(--pd-primary); color: #fff; }

/* ---- Synapse vertical tabs (problem page) ---- */
.pd-synapse {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.pd-synapse-rail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pd-synapse-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--pd-surface-raise);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius-sm);
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  text-align: right;
  transition: all 0.25s ease;
}
.pd-synapse-tab:hover { border-color: var(--pd-primary); transform: translateX(-3px); }
.pd-synapse-tab.is-active {
  background: var(--pd-grad-primary);
  color: #fff;
  border-color: var(--pd-primary);
}
.pd-synapse-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: color-mix(in srgb, currentColor 18%, transparent);
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
}
.pd-synapse-name { font-size: 0.88rem; font-weight: 700; }
.pd-synapse-panel { display: none; animation: pdFadeIn 0.35s ease; }
.pd-synapse-panel.is-active { display: block; }
@media (max-width: 768px) {
  .pd-synapse { grid-template-columns: 1fr; }
}

/* ---- Hub graph (customers) ---- */
.pd-hub {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin: 1.5rem auto;
}
.pd-hub svg { width: 100%; height: 100%; overflow: visible; }
.pd-hub-center {
  fill: var(--pd-primary);
}
.pd-hub-node {
  cursor: pointer;
  transition: transform 0.25s ease;
  transform-origin: center;
  transform-box: fill-box;
}
.pd-hub-node:hover { transform: scale(1.08); }
.pd-hub-node circle { fill: var(--pd-surface-raise); stroke: var(--pd-line); stroke-width: 1.5; transition: all 0.25s; }
.pd-hub-node:hover circle,
.pd-hub-node.is-active circle { stroke: var(--pd-cyber); stroke-width: 2.5; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--pd-cyber) 60%, transparent)); }
.pd-hub-node text { font-size: 11px; font-weight: 700; fill: var(--pd-ink); text-anchor: middle; }
.pd-hub-edge { stroke: var(--pd-line); stroke-width: 1.2; transition: stroke 0.25s, stroke-width 0.25s; }
.pd-hub-edge.is-active { stroke: var(--pd-cyber); stroke-width: 2; }

/* ---- Timeline (roadmap) ---- */
.pd-timeline {
  position: relative;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 1rem 0 1.5rem;
  scroll-snap-type: x mandatory;
}
.pd-timeline-phase {
  flex: 1 0 260px;
  scroll-snap-align: start;
  background: var(--pd-surface-raise);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius);
  padding: 1.1rem 1.2rem;
  position: relative;
  box-shadow: var(--pd-shadow-sm);
}
.pd-timeline-phase::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 4px;
  background: var(--pd-cat, var(--pd-primary));
  border-radius: var(--pd-radius) var(--pd-radius) 0 0;
}
.pd-timeline-month {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--pd-cat, var(--pd-primary));
  background: color-mix(in srgb, var(--pd-cat, var(--pd-primary)) 12%, transparent);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}
.pd-timeline-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--pd-primary);
  margin: 0 0 0.5rem;
}
.pd-timeline-body {
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--pd-slate);
}
.pd-timeline-kpi {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ---- Accuracy ring ---- */
.pd-accuracy {
  position: relative;
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
}
.pd-accuracy svg { transform: rotate(-90deg); }
.pd-accuracy-track { fill: none; stroke: var(--pd-line); stroke-width: 6; }
.pd-accuracy-fill { fill: none; stroke: var(--pd-accent); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.pd-accuracy-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--pd-accent);
}

/* ---- Growth simulator ---- */
.pd-sim {
  background: var(--pd-surface-soft);
  border: 1px solid var(--pd-line);
  border-radius: var(--pd-radius-lg);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}
.pd-sim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pd-sim-title { font-size: 1.05rem; font-weight: 800; color: var(--pd-primary); margin: 0; }
.pd-sim-value { font-size: 1.4rem; font-weight: 800; color: var(--pd-cyber); font-variant-numeric: tabular-nums; }
.pd-sim-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--pd-line);
  border-radius: 999px;
  outline: none;
}
.pd-sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--pd-cyber);
  cursor: pointer;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--pd-cyber) 50%, transparent);
}
.pd-sim-slider::-moz-range-thumb {
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 50%;
  background: var(--pd-cyber);
  cursor: pointer;
}

/* ---- Footer note ---- */
.pd-foot-note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--pd-line);
  font-size: 0.8rem;
  color: var(--pd-slate-soft);
  text-align: center;
}

/* ---- Three-pillar diagram (solution page) ---- */
.pd-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.pd-pillar {
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: var(--pd-radius);
  background: var(--pd-surface-raise);
  border: 1px solid var(--pd-line);
  box-shadow: var(--pd-shadow-sm);
}
.pd-pillar-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--pd-grad-primary);
  color: #fff;
  font-size: 1.3rem;
}
.pd-pillar-title { font-size: 1rem; font-weight: 800; color: var(--pd-primary); margin: 0 0 0.5rem; }
.pd-pillar-list { list-style: none; padding: 0; margin: 0; text-align: right; }
.pd-pillar-list li { font-size: 0.82rem; color: var(--pd-slate); padding: 0.25rem 0; }
@media (max-width: 768px) { .pd-pillars { grid-template-columns: 1fr; } }

/* ============================================================
   Presentation Shell (overlays on pitchdeck-panel)
   ============================================================ */

/* Progress bar */
#pd-progress-bar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 50;
  width: 0;
  transition: width 0.1s linear;
  background: var(--pd-cyber);
  box-shadow: 0 0 8px color-mix(in srgb, var(--pd-cyber) 60%, transparent);
}
#pd-progress-bar.is-idle { width: 0; transition: width 0.3s ease; }

/* Controls dock */
#pd-controls {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: color-mix(in srgb, var(--pd-surface-raise) 92%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--pd-line);
  border-radius: var(--pd-radius) var(--pd-radius) 0 0;
  box-shadow: 0 -6px 20px rgba(15, 76, 92, 0.08);
  z-index: 40;
  flex-wrap: wrap;
}
#pd-controls .pd-ctrl-title {
  flex: 1;
  min-width: 180px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--pd-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-ctrl-btn {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--pd-line);
  background: var(--pd-surface-raise);
  color: var(--pd-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.pd-ctrl-btn:hover { background: var(--pd-primary); color: #fff; border-color: var(--pd-primary); transform: translateY(-2px); }
.pd-ctrl-btn.is-active { background: var(--pd-grad-cyber); color: #fff; border-color: var(--pd-cyber); }
.pd-ctrl-btn svg { width: 1.15rem; height: 1.15rem; }
.pd-ctrl-select {
  border: 1px solid var(--pd-line);
  border-radius: 999px;
  background: var(--pd-surface-raise);
  color: var(--pd-slate);
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.pd-ctrl-divider { width: 1px; height: 1.5rem; background: var(--pd-line); margin: 0 0.25rem; }

/* Slide map overlay */
#pd-slidemap {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: color-mix(in srgb, var(--pd-ink) 92%, transparent);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: pdFadeIn 0.25s ease;
}
#pd-slidemap.is-open { display: flex; }
.pd-slidemap-inner {
  width: min(1100px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  color: #e2e8f0;
}
.pd-slidemap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.pd-slidemap-title { font-size: 1.4rem; font-weight: 800; color: #fff; margin: 0; }
.pd-slidemap-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: #e2e8f0;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}
.pd-slidemap-close:hover { background: rgba(255,255,255,0.1); }
.pd-slidemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
}
.pd-slidemap-item {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--pd-radius);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border-inline-start: 3px solid var(--pd-cat, var(--pd-cyber));
}
.pd-slidemap-item:hover { background: color-mix(in srgb, var(--pd-cyber) 22%, transparent); border-color: var(--pd-cyber); transform: translateY(-3px); }
.pd-slidemap-item.is-current { background: color-mix(in srgb, var(--pd-cyber) 30%, transparent); border-color: var(--pd-cyber); }
.pd-slidemap-num { font-size: 0.72rem; font-weight: 800; color: var(--pd-slate-soft); letter-spacing: 0.06em; }
.pd-slidemap-name { font-size: 0.92rem; font-weight: 700; color: #fff; margin-top: 0.2rem; }
.pd-slidemap-cat { font-size: 0.68rem; color: var(--pd-slate-soft); margin-top: 0.35rem; }

/* Fullscreen presentation mode */
.pd-fullscreen #pitchdeck-panel {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: var(--pd-surface);
  padding: 2rem 3rem 5rem;
  overflow-y: auto;
}
.pd-fullscreen #pd-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0;
}
.pd-fullscreen .pd-page {
  max-width: 1100px;
  margin: 0 auto 1.5rem;
  padding: 2.5rem 3rem;
}

/* Hide controls when not on pitchdeck route */
#pd-controls.is-hidden,
#pd-progress-bar.is-hidden { display: none; }

@media (max-width: 768px) {
  .pd-page { padding: 1.25rem 1rem 1.5rem; }
  .pd-hero { padding: 1.75rem 1.25rem; }
  .pd-section-header h2 { font-size: 1.35rem; }
  #pd-controls { padding: 0.5rem 0.6rem; }
  .pd-ctrl-title { display: none; }
}
