/* ============================================================
   V2 Design System — Components
   ~15 reusable component classes + slide shell structure.
   Depends on: tokens.css, typography.css
   All colors reference tokens — no hardcoded values in components.
   (Slide-02 Telegram UI uses inline colors for a unique widget.)
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Screen-reader only ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   SLIDE SHELL — structural layout shared by every slide
   ============================================================ */

/* Viewport centering */
.slide-wrapper {
  display: flex;
  justify-content: center;
  padding: 20px 0 0;
}

/* 16:9 presentation canvas */
.slide-frame {
  width: var(--slide-w);
  min-height: var(--slide-h);
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-frame);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  zoom: var(--s, 1);
  animation: slideFrameIn 0.5s ease-out both;
}

/* ── Progress bar ── */
.slide-nav__progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--progress-track);
  z-index: var(--z-progress);
}
.slide-nav__progress > div {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  border-radius: 0 2px 2px 0;
  transition: width 0.3s var(--ease);
}

/* ── Slide header ── */
.slide-header {
  display: flex;
  align-items: center;
  padding: 20px var(--sp-xl) 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.slide-header::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent-color, var(--blue));
}
.slide-header__block {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-left: 12px;
}
.slide-header__sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 var(--sp-md);
  flex-shrink: 0;
}
.slide-header__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.slide-header__num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 1px;
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg3);
}

/* ── Theme toggle switch ── */
.slide-header__theme-toggle {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg4);
  cursor: pointer;
  padding: 0;
  margin-left: var(--sp-sm);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
}
/* Sun indicator (left) */
.slide-header__theme-toggle::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 4px var(--gold-glow);
  transition: opacity 0.3s var(--ease);
}
/* Moon indicator (right) */
.slide-header__theme-toggle::after {
  content: '';
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 4px var(--blue-glow);
  transition: opacity 0.3s var(--ease);
}
/* Sliding thumb */
.slide-header__theme-toggle > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--slate);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), width 0.15s var(--ease);
  z-index: 1;
}
/* Light mode state */
.slide-header__theme-toggle[data-mode="light"] {
  background: var(--blue-lt);
  border-color: var(--blue);
  box-shadow: 0 0 8px var(--blue-glow);
}
.slide-header__theme-toggle[data-mode="light"] > span {
  transform: translateX(18px);
  background: #fff;
}
/* Hover */
.slide-header__theme-toggle:hover {
  border-color: var(--accent-color, var(--blue));
  box-shadow: 0 0 6px var(--blue-glow);
}
/* Pressed — thumb stretches toward target */
.slide-header__theme-toggle:active > span {
  width: 20px;
}

/* ── Index page theme toggle ── */
.index__theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 28px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg4);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  z-index: 100;
  -webkit-appearance: none;
  appearance: none;
  font-size: 0;
  line-height: 0;
  color: transparent;
}
.index__theme-toggle::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 5px var(--gold-glow);
  transition: opacity 0.3s var(--ease);
}
.index__theme-toggle::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 5px var(--blue-glow);
  transition: opacity 0.3s var(--ease);
}
.index__theme-toggle > span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--slate);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), width 0.15s var(--ease);
  z-index: 1;
}
.index__theme-toggle[data-mode="light"] {
  background: var(--blue-lt);
  border-color: var(--blue);
  box-shadow: 0 0 10px var(--blue-glow);
}
.index__theme-toggle[data-mode="light"] > span {
  transform: translateX(20px);
  background: #fff;
}
.index__theme-toggle:hover {
  border-color: var(--blue);
  box-shadow: 0 0 8px var(--blue-glow);
}
.index__theme-toggle:active > span {
  width: 20px;
}

/* ── Slide body ── */
.slide-body {
  flex: 1;
  padding: var(--sp-lg) var(--sp-xl) var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  min-height: 0;
  animation: fadeUp 0.4s ease-out 0.2s both;
}

/* ── Slide navigation bar ── */
.slide-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px var(--sp-xl);
  background: var(--bg3);
  border-top: 1px solid var(--border);
  flex-wrap: nowrap;
  overflow-x: auto;
}
.slide-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  transition: all 0.15s var(--ease);
  white-space: nowrap;
}
.slide-nav a:hover {
  border-color: var(--accent-color, var(--blue));
  color: var(--accent-color, var(--blue));
  background: var(--blue-lt);
}
.slide-nav a.active {
  border-color: var(--accent-color, var(--blue));
  color: var(--bg2);
  background: var(--accent-color, var(--blue));
  font-weight: 600;
}
.slide-nav__prev,
.slide-nav__next {
  min-width: 38px;
  height: 32px;
  font-size: 13px;
  font-weight: 600;
}
.slide-nav__spacer {
  flex: 1;
  min-width: 12px;
}
.slide-nav__logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.slide-nav__logo:hover { opacity: 0.9; }

/* ── Slide footer ── */
.slide-footer {
  padding: 10px var(--sp-xl);
  border-top: 1px solid var(--border);
  background: var(--bg3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.6;
  transition: transform 0.2s var(--ease);
}
.badge--ready {
  background: var(--green-lt);
  color: var(--green);
  border: 1px solid var(--green);
}
.badge--wip {
  background: var(--orange-lt);
  color: var(--orange);
  border: 1px solid var(--orange);
}

/* ============================================================
   LAYOUT COMPONENTS
   ============================================================ */

/* ── .two-col — 50/50 split ── */
.two-col {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.two-col > * { flex: 1; }
.two-col--narrow-left > :first-child { flex: 0.65; }
.two-col--narrow-right > :last-child  { flex: 0.65; }

/* ── .three-col — equal 3-way split ── */
.three-col {
  display: flex;
  gap: var(--sp-sm);
  flex: 1;
  min-height: 0;
}
.three-col > * { flex: 1; }

/* ── .card-grid — auto-fill responsive grid ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm);
  flex: 1;
  min-height: 0;
}
.card-grid--2col { grid-template-columns: repeat(2, 1fr); }
.card-grid--4col { grid-template-columns: repeat(4, 1fr); }

/* ── .stack — vertical stacked items ── */
.stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
}

/* ============================================================
   CONTENT COMPONENTS
   ============================================================ */

/* ── .card — generic bordered card ── */
.card {
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.card__icon {
  font-size: 22px;
  flex-shrink: 0;
}
.card__title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.card__desc {
  font-size: 10px;
  line-height: 1.35;
  color: var(--text-sec);
  flex: 1;
}

/* Accent-colored card variants */
.card--red    { background: var(--red-lt);    border-color: var(--red); }
.card--blue   { background: var(--blue-lt);   border-color: var(--blue); }
.card--green  { background: var(--green-lt);  border-color: var(--green); }
.card--orange { background: var(--orange-lt); border-color: var(--orange); }
.card--slate  { background: var(--slate-lt);  border-color: var(--slate); }
.card--violet { background: var(--violet-lt); border-color: var(--violet); }
.card--gold   { background: var(--gold-lt);   border-color: var(--gold); }

/* ── .metric — big number + label ── */
.metric {
  flex-shrink: 0;
  width: 150px;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-sm);
  padding: var(--sp-sm) 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  align-self: center;
  border: 1px solid var(--border);
}
.metric__value {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 2px;
}

/* ── .callout — colored left-border info box ── */
.callout {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-sec);
}
.callout b { font-weight: 700; }

.callout--info {
  background: var(--green-lt);
  border: 1px solid var(--green);
  border-left: 4px solid var(--green);
}
.callout--info b { color: var(--green); }

.callout--red,
.callout--danger {
  background: linear-gradient(135deg, var(--red-lt) 0%, var(--red-glow) 100%);
  border: 1px solid var(--red-glow);
  border-left: 3px solid var(--red);
  color: var(--text);
}
.callout--red b,
.callout--danger b { color: var(--gold); }

.callout--green,
.callout--success {
  background: var(--green-lt);
  border: 1px solid var(--green);
  border-left: 4px solid var(--green);
}
.callout--green b,
.callout--success b { color: var(--green); }

.callout--orange,
.callout--warning {
  background: var(--orange-lt);
  border: 1px solid var(--orange);
  border-left: 4px solid var(--orange);
}
.callout--orange b,
.callout--warning b { color: var(--orange); }

/* Summary / neutral variant (matches original unite-bar: bg3 + subtle border, no color tint) */
.callout--summary {
  background: var(--bg3);
  border: 1px solid var(--border);
}
.callout--summary b { color: var(--green); }

/* Blue-tinted variant (matches original parallel-bar / key-message) */
.callout--blue {
  background: var(--blue-lt);
  border: 1px solid var(--blue);
  border-left: 4px solid var(--blue);
}
.callout--blue b { color: var(--blue); }

/* ── .band — horizontal strip with icon + content + stat ── */
.band {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border: 1px solid;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.band:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}
.band__icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}
.band__content { flex: 1; }
.band__header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.band__lec {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.band__title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
}
.band__text {
  font-size: var(--fs-slide-body);
  line-height: 1.5;
  color: var(--text-sec);
}

/* Accent via data-accent attribute */
.band[data-accent="red"]    { background: var(--red-lt);    border-color: var(--red); }
.band[data-accent="blue"]   { background: var(--blue-lt);   border-color: var(--blue); }
.band[data-accent="green"]  { background: var(--green-lt);  border-color: var(--green); }
.band[data-accent="orange"] { background: var(--orange-lt); border-color: var(--orange); }
.band[data-accent="slate"]  { background: var(--slate-lt);  border-color: var(--slate); }
.band[data-accent="violet"] { background: var(--violet-lt); border-color: var(--violet); }
.band[data-accent="gold"]   { background: var(--gold-lt);   border-color: var(--gold); }
.band[data-accent="red"]    .band__lec,
.band[data-accent="red"]    .band__title { color: var(--red); }
.band[data-accent="blue"]   .band__lec,
.band[data-accent="blue"]   .band__title { color: var(--blue); }
.band[data-accent="green"]  .band__lec,
.band[data-accent="green"]  .band__title { color: var(--green); }
.band[data-accent="orange"] .band__lec,
.band[data-accent="orange"] .band__title { color: var(--orange); }
.band[data-accent="slate"]  .band__lec,
.band[data-accent="slate"]  .band__title { color: var(--slate); }
.band[data-accent="violet"] .band__lec,
.band[data-accent="violet"] .band__title { color: var(--violet); }
.band[data-accent="gold"]   .band__lec,
.band[data-accent="gold"]   .band__title { color: var(--gold); }
.band[data-accent="red"]    .metric { color: var(--red); }
.band[data-accent="blue"]   .metric { color: var(--blue); }
.band[data-accent="green"]  .metric { color: var(--green); }
.band[data-accent="orange"] .metric { color: var(--orange); }
.band[data-accent="slate"]  .metric { color: var(--slate); }
.band[data-accent="violet"] .metric { color: var(--violet); }
.band[data-accent="gold"]   .metric { color: var(--gold); }

/* ── .timeline — phased vertical list (T+0, T+5, T+15…) ── */
.timeline {
  display: flex;
  gap: var(--sp-sm);
  flex: 1;
  min-height: 0;
}
.timeline > * { flex: 1; }

.phase {
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.phase__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-on-accent);
  align-self: flex-start;
}
.phase__title {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}
.phase__content {
  font-size: 10px;
  line-height: 1.4;
  flex: 1;
}

/* ── .matrix — 2D data table ── */
.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}
.matrix th,
.matrix td {
  padding: 4px 5px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.3;
}
.matrix th {
  font-weight: 700;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--bg3);
}
.matrix .tag-partial {
  background: var(--orange-lt);
  color: var(--orange);
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 8px;
  font-weight: 700;
}
.matrix .tag-no {
  background: var(--red-lt);
  color: var(--red);
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 8px;
  font-weight: 700;
}

/* ── .checklist — ordered/unordered checklist ── */
.checklist {
  columns: 2;
  column-gap: 10px;
}
.checklist-item {
  display: flex;
  gap: 4px;
  margin-bottom: 3px;
  font-size: 9.5px;
  line-height: 1.3;
  break-inside: avoid;
}
.checklist-icon {
  flex-shrink: 0;
}

/* ── .kpi-row — horizontal KPI strip ── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.kpi-row__item {
  padding: var(--sp-md) 18px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.kpi-row__item:last-child { border-right: none; }
.kpi-row__label {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kpi-row__value {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* ── .funnel — escalation/attack funnel ── */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-height: 0;
}
.funnel__step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  line-height: 1.35;
  transition: transform 0.2s var(--ease);
}
.funnel__step:hover {
  transform: translateX(3px);
}
.funnel__num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-on-accent);
  flex-shrink: 0;
}

/* ── .comparison — side-by-side comparison ── */
.comparison {
  display: flex;
  gap: 8px;
}
.comparison > * { flex: 1; }
.comparison__box {
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.comparison__label {
  font-size: 9.5px;
  font-weight: 700;
  margin-bottom: 3px;
}
.comparison--wrong .comparison__box {
  background: var(--red-lt);
  border: 1px solid var(--red);
}
.comparison--wrong .comparison__label { color: var(--red); }
.comparison--right .comparison__box {
  background: var(--green-lt);
  border: 1px solid var(--green);
}
.comparison--right .comparison__label { color: var(--green); }

/* ── .quote — styled blockquote / question bar ── */
.quote {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
}
.quote--accent {
  border-color: var(--accent-color, var(--blue));
  background: linear-gradient(135deg, var(--green-lt) 0%, var(--blue-lt) 100%);
}
.quote--question {
  background: var(--bg3);
  border: 2px solid var(--accent-color, var(--red));
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-color, var(--red));
  text-align: center;
  box-shadow: 0 0 20px var(--red-glow);
}

/* ── .legend — color swatch legend row ── */
.legend {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.legend__title {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: var(--sp-sm);
}
.legend__item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-sec);
  letter-spacing: 0.5px;
}
.legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ── .insight-bar — bottom highlight bar ── */
.insight-bar {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px var(--sp-lg);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  transition: transform var(--ease), box-shadow var(--ease);
}
.insight-bar:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   RESPONSIVE VIEWPORT SCALING
   ============================================================ */
@media (min-width: 1600px) {
  .slide-wrapper { padding-bottom: 60px; }
  .slide-frame { --s: 1.35; }
}
@media (min-width: 1340px) and (max-width: 1599px) {
  .slide-wrapper { padding-bottom: 40px; }
  .slide-frame { --s: 1.15; }
}
@media (max-width: 1024px) {
  .slide-frame { --s: 0.75; }
  .slide-nav { flex-wrap: wrap; gap: 4px; }
}
@media (max-width: 768px) {
  .slide-frame { --s: 0.58; }
  .slide-nav { flex-wrap: wrap; gap: 3px; }
  .slide-nav a { min-width: 30px; height: 28px; padding: 0 8px; font-size: 11px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .two-col { flex-direction: column; }
  .three-col { flex-direction: column; }
  .timeline { flex-direction: column; }
}
@media (max-width: 480px) {
  .slide-frame { --s: 0.44; }
  .slide-nav { gap: 2px; padding: 8px 12px; }
  .slide-nav a { min-width: 26px; height: 24px; padding: 0 6px; font-size: 10px; }
  .card-grid { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes slideFrameIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseHub {
  0%, 100% { box-shadow: 0 0 0 0 var(--slate-glow); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}

/* ============================================================
   COLOR VARIANT HELPER CLASSES
   For phase, funnel-step, insight-bar when inline styles
   would otherwise be needed.
   Usage: phase--green, funnel__step--red, insight-bar--orange
   ============================================================ */

/* Phase variants */
.phase--red    { background: var(--red-lt);    border: 1px solid var(--red); }
.phase--red    .phase__badge   { background: var(--red); }
.phase--red    .phase__title   { color: var(--red); }
.phase--blue   { background: var(--blue-lt);   border: 1px solid var(--blue); }
.phase--blue   .phase__badge   { background: var(--blue); }
.phase--blue   .phase__title   { color: var(--blue); }
.phase--green  { background: var(--green-lt);  border: 1px solid var(--green); }
.phase--green  .phase__badge   { background: var(--green); }
.phase--green  .phase__title   { color: var(--green); }
.phase--orange { background: var(--orange-lt); border: 1px solid var(--orange); }
.phase--orange .phase__badge   { background: var(--orange); }
.phase--orange .phase__title   { color: var(--orange); }
.phase--gold   { background: var(--gold-lt);   border: 1px solid var(--gold); }
.phase--gold   .phase__badge   { background: var(--gold); }
.phase--gold   .phase__title   { color: var(--gold); }
.phase--violet { background: var(--violet-lt); border: 1px solid var(--violet); }
.phase--violet .phase__badge   { background: var(--violet); }
.phase--violet .phase__title   { color: var(--violet); }

/* Funnel step variants */
.funnel__step--red    { background: var(--red-lt);    border: 1px solid var(--red); }
.funnel__step--red    .funnel__num { background: var(--red); }
.funnel__step--blue   { background: var(--blue-lt);   border: 1px solid var(--blue); }
.funnel__step--blue   .funnel__num { background: var(--blue); }
.funnel__step--green  { background: var(--green-lt);  border: 1px solid var(--green); }
.funnel__step--green  .funnel__num { background: var(--green); }
.funnel__step--orange { background: var(--orange-lt); border: 1px solid var(--orange); }
.funnel__step--orange .funnel__num { background: var(--orange); }
.funnel__step--violet { background: var(--violet-lt); border: 1px solid var(--violet); }
.funnel__step--violet .funnel__num { background: var(--violet); }

/* Insight-bar variants */
.insight-bar--red    { background: var(--red-lt);    border-color: var(--red); }
.insight-bar--green  { background: var(--green-lt);  border-color: var(--green); }
.insight-bar--blue   { background: var(--blue-lt);   border-color: var(--blue); }
.insight-bar--orange { background: var(--orange-lt); border-color: var(--orange); }
.insight-bar--violet { background: var(--violet-lt); border-color: var(--violet); }

/* ── Focus-visible ── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
