@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #f5f8ff;
  --bg-alt: #e8effc;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-tint: rgba(220, 232, 252, 0.85);
  --line: rgba(50, 80, 140, 0.18);
  --line-strong: rgba(50, 80, 140, 0.34);
  --ink: #10203a;
  --muted: #52627d;
  --accent: #326ce5;
  --accent-2: #12a58a;
  --accent-3: #f29d0c;
  --accent-4: #8a5cf0;
  --success: #12915b;
  --warning: #c27803;
  --danger: #d6334a;
  --code-bg: #0e1a33;
  --code-ink: #e8effc;
  --code-muted: #8fa2c7;
  --shadow: 0 30px 80px rgba(30, 60, 120, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 8% 8%, rgba(50, 108, 229, 0.13), transparent 30%),
    radial-gradient(circle at 92% 6%, rgba(18, 165, 138, 0.12), transparent 26%),
    radial-gradient(circle at 12% 96%, rgba(242, 157, 12, 0.12), transparent 26%),
    linear-gradient(180deg, #fafcff 0%, #e9f0fd 100%);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.slide-shell {
  width: 1600px;
  height: 900px;
  flex: none;
  padding: 40px;
  transform-origin: center center;
}

.frame {
  position: relative;
  overflow: hidden;
  height: 820px;
  padding: 28px 36px 26px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.97)), var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
}

.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(50, 108, 229, 0.06), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(18, 165, 138, 0.1), transparent 20%),
    radial-gradient(circle at 6% 100%, rgba(242, 157, 12, 0.08), transparent 24%);
}

.topbar,
.bottombar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.meta-chip,
.page-chip,
.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow,
.page-chip,
.mini-label {
  color: var(--muted);
}

.eyebrow::before,
.mini-label::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
}

.chip-row,
.pill-row,
.topbar-right,
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.meta-chip,
.page-chip,
.pill,
.brand {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.meta-chip {
  color: var(--accent);
}

.pill {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

/* --- layout grids --- */
.hero-grid,
.grid-2,
.grid-3,
.grid-4,
.grid-5,
.chart,
.flow,
.timeline,
.ladder,
.arch-grid,
.risk-map,
.quadrant,
.kpi-strip,
.stack-lg,
.stack-md,
.stack-sm,
.tool-grid {
  display: grid;
}

.hero-grid,
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-4,
.kpi-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stack-lg {
  gap: 16px;
}

.stack-md {
  gap: 16px;
}

.stack-sm {
  gap: 10px;
}

.flow {
  grid-template-columns: repeat(var(--flow-cols, 4), minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.ladder {
  grid-template-columns: repeat(var(--ladder-cols, 4), minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.timeline {
  grid-template-columns: repeat(var(--timeline-cols, 5), minmax(0, 1fr));
  gap: 14px;
}

.arch-grid {
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.quadrant {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.risk-map {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.chart {
  grid-template-columns: repeat(var(--chart-cols, 4), minmax(0, 1fr));
  gap: 16px;
  align-items: end;
  min-height: 200px;
}

.section-head,
.split-head {
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.split-head {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: end;
}

/* --- typography --- */
.hero-title,
.title,
.metric-value,
.big-number {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-title {
  font-size: 68px;
  line-height: 0.98;
}

.title {
  font-size: 45px;
  line-height: 1.03;
}

.metric-value {
  font-size: 38px;
  line-height: 1;
}

.big-number {
  font-size: 88px;
  line-height: 0.92;
  color: var(--accent);
}

.accent-text {
  color: var(--accent);
}

.accent2-text {
  color: var(--accent-2);
}

.accent3-text {
  color: var(--accent-3);
}

.danger-text {
  color: var(--danger);
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.38;
}

.body-copy {
  margin: 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.4;
}

.micro-copy {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.4;
}

.takeaway {
  margin: 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(50, 108, 229, 0.09), rgba(255, 255, 255, 0.92));
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}

/* --- card family --- */
.card,
.stat,
.accent-card,
.note-card,
.diagram-card,
.timeline-card,
.matrix-card,
.flow-step,
.timeline-step,
.arch-col,
.ladder-card,
.kpi,
.risk-cell,
.quad-cell,
.signal,
.callout,
.tool-pill,
.lane-step {
  position: relative;
  z-index: 1;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.card,
.stat,
.accent-card,
.note-card,
.diagram-card,
.timeline-card,
.matrix-card,
.flow-step,
.timeline-step,
.arch-col,
.ladder-card,
.kpi,
.risk-cell,
.quad-cell,
.signal,
.callout,
.lane-step {
  padding: 15px;
}

.tool-pill {
  padding: 12px 14px;
}

.accent-card.coral {
  background: linear-gradient(180deg, rgba(50, 108, 229, 0.13), rgba(255, 255, 255, 0.94));
}
.accent-card.teal {
  background: linear-gradient(180deg, rgba(18, 165, 138, 0.13), rgba(255, 255, 255, 0.94));
}
.accent-card.gold {
  background: linear-gradient(180deg, rgba(242, 157, 12, 0.15), rgba(255, 255, 255, 0.95));
}
.accent-card.violet {
  background: linear-gradient(180deg, rgba(138, 92, 240, 0.13), rgba(255, 255, 255, 0.94));
}
.accent-card.cream {
  background: linear-gradient(180deg, rgba(243, 232, 214, 0.7), rgba(255, 255, 255, 0.95));
}

.card-label,
.stat-label {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 17.5px;
  color: var(--muted);
}

.flow-step,
.timeline-step,
.signal {
  min-height: 96px;
}

.flow-step strong,
.timeline-step strong {
  display: block;
  font-size: 16.5px;
  margin-bottom: 6px;
}

.arch-col {
  display: grid;
  gap: 12px;
}

.risk-cell,
.quad-cell {
  background: var(--bg-alt);
}

.quad-cell.crit {
  background: linear-gradient(180deg, rgba(214, 51, 74, 0.12), rgba(255, 255, 255, 0.95));
  border-color: rgba(214, 51, 74, 0.32);
}
.quad-cell.warn {
  background: linear-gradient(180deg, rgba(194, 120, 3, 0.12), rgba(255, 255, 255, 0.95));
  border-color: rgba(194, 120, 3, 0.32);
}
.quad-cell.ok {
  background: linear-gradient(180deg, rgba(18, 145, 91, 0.1), rgba(255, 255, 255, 0.95));
  border-color: rgba(18, 145, 91, 0.3);
}
.quad-cell.muted {
  background: var(--bg-alt);
}

.quad-axis {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- severity badges --- */
.severity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.severity::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.severity.crit {
  color: var(--danger);
  background: rgba(214, 51, 74, 0.12);
}
.severity.high {
  color: #a4460b;
  background: rgba(194, 120, 3, 0.14);
}
.severity.med {
  color: var(--accent-3);
  background: rgba(242, 157, 12, 0.14);
}
.severity.low {
  color: var(--success);
  background: rgba(18, 145, 91, 0.12);
}
.severity.info {
  color: var(--accent-2);
  background: rgba(18, 165, 138, 0.12);
}

/* --- code / terminal panel --- */
.code-panel {
  border-radius: 20px;
  background: var(--code-bg);
  border: 1px solid rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.code-panel .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--code-muted);
}

.code-panel .dots {
  display: flex;
  gap: 6px;
}

.code-panel .dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.code-panel pre {
  margin: 0;
  padding: 13px 18px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1.46;
  color: var(--code-ink);
  overflow-x: auto;
  white-space: pre;
}

.code-panel .c {
  color: #7f93b8;
}
.code-panel .k {
  color: #ffb86b;
}
.code-panel .s {
  color: #7fe0c8;
}
.code-panel .v {
  color: #b9c8ff;
}
.code-panel .bad {
  color: #ff8aa0;
}
.code-panel .good {
  color: #86e6b4;
}

/* --- pipeline / layer stack --- */
.pipeline {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.pipe-step {
  flex: 1;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  text-align: center;
}

.pipe-step .num {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  margin-bottom: 8px;
}

.pipe-arrow {
  align-self: center;
  color: var(--muted);
  font-size: 18px;
}

.layer-stack {
  display: grid;
  gap: 10px;
}

.layer {
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.layer strong {
  font-size: 16.5px;
}

/* --- sequence lane (attacker/defender or step-by-step runbook) --- */
.sequence-lane {
  display: grid;
  gap: 6px;
}

.lane-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
  padding: 9px 12px;
}

.lane-step .n {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-4));
}

.lane-step strong {
  display: block;
  font-size: 16.5px;
  margin-bottom: 3px;
}

/* --- comparison matrix --- */
.matrix-row {
  display: grid;
  grid-template-columns: var(--matrix-cols, 1.1fr repeat(2, 1fr));
  gap: 12px;
  align-items: start;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}

.matrix-row.header {
  background: linear-gradient(180deg, rgba(50, 108, 229, 0.1), rgba(255, 255, 255, 0.95));
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- checklist --- */
.checklist {
  display: grid;
  gap: 8px;
}

.check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
}

.check-item .mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 13px;
  font-weight: 800;
  background: var(--success);
}

.check-item span {
  font-size: 16.5px;
  line-height: 1.36;
}

/* --- ladder rank / bars --- */
.ladder-card .rank {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
}

.bar {
  height: var(--bar-height);
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 35%, white));
}

.progress {
  width: 260px;
  height: 8px;
  border-radius: 999px;
  background: rgba(82, 98, 125, 0.18);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
}

/* --- nav --- */
.deck-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
}

.nav-btn.primary {
  background: linear-gradient(135deg, var(--accent), #5b8def);
  color: white;
  border-color: transparent;
}

.nav-btn:focus-visible {
  outline: 3px solid rgba(50, 108, 229, 0.28);
  outline-offset: 2px;
}

/* --- slide navigator: floating toggle + collapsible thumbnail panel --- */
.panel-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.panel-toggle:focus-visible {
  outline: 3px solid rgba(50, 108, 229, 0.28);
  outline-offset: 2px;
}

.slide-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(16, 32, 58, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.slide-panel-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  width: 360px;
  max-width: 88vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface-strong);
  border-left: 1px solid var(--line-strong);
  box-shadow: -24px 0 60px rgba(16, 32, 58, 0.18);
  transform: translateX(100%);
  transition: transform 260ms ease;
}

.slide-panel.open {
  transform: translateX(0);
}

.slide-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  font-size: 15px;
}

.slide-panel-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.slide-panel-close {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.slide-panel-close:hover {
  color: var(--ink);
}

.slide-panel-list {
  overflow-y: auto;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.slide-panel-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ink);
}

.slide-panel-item:hover {
  background: var(--bg-alt);
}

.slide-panel-item.active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(50, 108, 229, 0.1), rgba(255, 255, 255, 0.9));
}

.thumb {
  position: relative;
  display: block;
  width: 120px;
  height: 67.5px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  flex-shrink: 0;
}

.thumb iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1600px;
  height: 900px;
  border: 0;
  transform: scale(0.075);
  transform-origin: top left;
  pointer-events: none;
}

.slide-panel-item .meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.slide-panel-item .n {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.slide-panel-item .t {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.32;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

@media (prefers-reduced-motion: reduce) {
  .slide-panel,
  .slide-panel-backdrop {
    transition: none;
  }
}

.callout {
  background: linear-gradient(180deg, rgba(50, 108, 229, 0.09), rgba(255, 255, 255, 0.95));
  font-size: 16px;
  line-height: 1.22;
  font-weight: 600;
}

.callout.teal {
  background: linear-gradient(180deg, rgba(18, 165, 138, 0.11), rgba(255, 255, 255, 0.95));
}

.quote {
  font-size: 27px;
  line-height: 1.28;
  font-weight: 700;
}

.full-height {
  height: 100%;
}

.centered {
  align-content: center;
}

@media (prefers-reduced-motion: no-preference) {
  .frame {
    animation: deck-rise 420ms ease-out;
  }

  .progress span {
    transition: width 300ms ease;
  }

  .bar {
    animation: bar-grow 620ms ease-out;
  }
}

@keyframes deck-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bar-grow {
  from {
    transform: scaleY(0);
    transform-origin: bottom;
  }
  to {
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

/* =====================================================================
   Kubernetes Foundations: deck-specific additions
   Theme: Ivory & Cobalt (Kubernetes-blue accent, teal/amber/violet supporting)
   ===================================================================== */

/* --- thematic motif: faint hexagon (helm-wheel / honeycomb) grid --- */
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'><path d='M28 2 54 17v30L28 62 2 47V17z M28 62v33 M2 47 28 62 54 47' fill='none' stroke='%23326ce5' stroke-opacity='0.07' stroke-width='1.2'/></svg>");
  background-size: 56px 97px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 80%, transparent 100%);
  z-index: 0;
}

.topbar, .bottombar, main { position: relative; z-index: 1; }
main { min-height: 0; }
.frame { gap: 16px; grid-template-rows: auto minmax(0, 1fr) auto; padding: 24px 34px 22px; }
.stack-lg { gap: 12px; }
.section-head { gap: 6px; }
main.stack-lg { display: flex; flex-direction: column; }
main.stack-lg > .section-head, main.stack-lg > .takeaway, main.stack-lg > .callout { flex: none; }
main.stack-lg > .diagram-card, main.stack-lg > .grid-2, main.stack-lg > .grid-3, main.stack-lg > .grid-4, main.stack-lg > .grid-5,
main.stack-lg > .row, main.stack-lg > .hero-grid, main.stack-lg > .quiz-grid, main.stack-lg > .arch-grid { flex: 1 1 auto; min-height: 0; }
.stack-md { gap: 12px; }
.title { font-size: 42px; }
.lead { font-size: 19px; }
.takeaway { font-size: 17px; padding: 12px 16px; }
.hero-title { font-size: 66px; }
code { font-family: "JetBrains Mono", monospace; font-size: 0.88em; background: rgba(50,108,229,0.09); padding: 1px 6px; border-radius: 6px; color: #1f4fb8; }

/* --- icons --- */
.ico { width: 40px; height: 40px; object-fit: contain; flex: none; }
.ico.sm { width: 28px; height: 28px; }
.ico.xs { width: 22px; height: 22px; }
.ico.lg { width: 56px; height: 56px; }
.ico.xl { width: 76px; height: 76px; }
.ico-row { display: flex; align-items: center; gap: 12px; }
.ico-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 14px;
}
.ico-chip .ico { width: 24px; height: 24px; }
.ico-tile {
  display: grid; justify-items: center; gap: 6px; padding: 12px 8px 10px; text-align: center;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
}
.ico-tile b { font-size: 14.5px; }
.ico-tile span { font-size: 12.5px; color: var(--muted); line-height: 1.3; }

/* --- misc components --- */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.tag.blue { background: rgba(50,108,229,.12); color: #1f4fb8; }
.tag.teal { background: rgba(18,165,138,.13); color: #0b7a66; }
.tag.amber { background: rgba(242,157,12,.16); color: #9a5f00; }
.tag.red { background: rgba(214,51,74,.12); color: #b0203a; }
.tag.violet { background: rgba(138,92,240,.13); color: #5f35c4; }
.tag.green { background: rgba(18,145,91,.13); color: #0c7348; }
.accent-card.blue { background: linear-gradient(180deg, rgba(50,108,229,.12), rgba(255,255,255,.95)); }
.accent-card.red { background: linear-gradient(180deg, rgba(214,51,74,.1), rgba(255,255,255,.95)); }
.accent-card.green { background: linear-gradient(180deg, rgba(18,145,91,.11), rgba(255,255,255,.95)); }
.accent-card h3, .diagram-card h3 { margin: 0 0 6px; font-family: "Manrope", sans-serif; font-size: 20px; letter-spacing: -.01em; }
.accent-card p, .diagram-card p { margin: 0; }
.big-stat { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 56px; line-height: .95; letter-spacing: -.03em; }
.row { display: flex; gap: 14px; align-items: stretch; }
.row > * { flex: 1; min-width: 0; }
.center { text-align: center; }
.small { font-size: 14px; }
.mono { font-family: "JetBrains Mono", monospace; }
.vs { align-self: center; font-family: "Manrope", sans-serif; font-weight: 800; color: var(--muted); font-size: 18px; flex: none !important; }
.bullets { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.bullets li { position: relative; padding-left: 20px; font-size: 16.5px; line-height: 1.38; color: var(--ink); }
.bullets li::before { content: ""; position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border-radius: 3px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.bullets li span { color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15.5px; align-items: baseline; }
.kv dt { font-family: "JetBrains Mono", monospace; font-weight: 600; color: #1f4fb8; font-size: 14px; }
.kv dd { margin: 0; color: var(--muted); }
.table { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 15px; }
.table th { text-align: left; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 12px; }
.table td { background: var(--bg-alt); padding: 8px 12px; vertical-align: top; line-height: 1.3; }
.table td:first-child { border-radius: 12px 0 0 12px; font-weight: 700; }
.table td:last-child { border-radius: 0 12px 12px 0; }

/* --- SVG diagram base --- */
svg.diagram { width: 100%; height: 100%; display: block; font-family: "Inter", sans-serif; }
svg.diagram text { fill: var(--ink); font-size: 15px; }
svg.diagram .t-muted { fill: var(--muted); font-size: 13.5px; }
svg.diagram .t-b { font-weight: 700; }
svg.diagram .t-h { font-weight: 800; font-size: 16.5px; font-family: "Manrope", sans-serif; }
svg.diagram .box { fill: #fff; stroke: rgba(50,80,140,.3); stroke-width: 1.4; }
svg.diagram .box-blue { fill: rgba(50,108,229,.1); stroke: #326ce5; stroke-width: 1.5; }
svg.diagram .box-teal { fill: rgba(18,165,138,.1); stroke: #12a58a; stroke-width: 1.5; }
svg.diagram .box-amber { fill: rgba(242,157,12,.12); stroke: #f29d0c; stroke-width: 1.5; }
svg.diagram .box-violet { fill: rgba(138,92,240,.1); stroke: #8a5cf0; stroke-width: 1.5; }
svg.diagram .box-red { fill: rgba(214,51,74,.1); stroke: #d6334a; stroke-width: 1.5; }
svg.diagram .box-green { fill: rgba(18,145,91,.1); stroke: #12915b; stroke-width: 1.5; }
svg.diagram .zone { fill: rgba(50,108,229,.04); stroke: rgba(50,108,229,.45); stroke-width: 1.4; stroke-dasharray: 6 5; }
svg.diagram .wire { fill: none; stroke: rgba(50,80,140,.55); stroke-width: 2; }
svg.diagram .wire-blue { fill: none; stroke: #326ce5; stroke-width: 2.4; }
svg.diagram .wire-teal { fill: none; stroke: #12a58a; stroke-width: 2.4; }
svg.diagram .wire-amber { fill: none; stroke: #f29d0c; stroke-width: 2.4; }
svg.diagram .wire-red { fill: none; stroke: #d6334a; stroke-width: 2.4; }
svg.diagram .pkt { fill: #326ce5; }
svg.diagram .pkt-teal { fill: #12a58a; }
svg.diagram .pkt-amber { fill: #f29d0c; }
svg.diagram .pkt-red { fill: #d6334a; }
svg.diagram .badge { fill: #326ce5; }
svg.diagram .badge-t { fill: #fff; font-weight: 800; font-size: 13px; text-anchor: middle; }

/* --- reveal steps --- */
[data-step] { transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1), filter .45s ease; }
html.steps-on [data-step]:not(.step-shown) { opacity: 0; transform: translateY(10px) scale(.985); pointer-events: none; filter: blur(2px); }
svg [data-step] { transform: none !important; filter: none !important; }
html.steps-on svg [data-step]:not(.step-shown) { opacity: 0; }
.step-hud {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6;
  display: none; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 999px;
  background: #10203a; color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 10px 30px rgba(16,32,58,.3);
}
html.steps-on .step-hud { display: inline-flex; }
.step-hud .dots { display: flex; gap: 5px; }
.step-hud .dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.28); transition: background .3s, transform .3s; }
.step-hud .dots i.on { background: #7fb0ff; transform: scale(1.25); }
.step-hud button { border: 0; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; background: #326ce5; color: #fff; cursor: pointer; }
.step-hud button.ghost { background: rgba(255,255,255,.14); }
html.thumb .step-hud, html.thumb .panel-toggle { display: none !important; }

/* --- slide transitions (cross-document View Transitions, Chrome 126+) --- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .38s cubic-bezier(.4,0,.2,1) both; }
  ::view-transition-new(root) { animation: vt-in .46s cubic-bezier(.2,.8,.2,1) both; }
  html[data-dir="back"]::view-transition-old(root) { animation-name: vt-out-back; }
  html[data-dir="back"]::view-transition-new(root) { animation-name: vt-in-back; }
  html[data-dir="module"]::view-transition-old(root) { animation-name: vt-zoom-out; }
  html[data-dir="module"]::view-transition-new(root) { animation-name: vt-zoom-in; }
  .frame { animation: none; }
  .frame > .topbar { animation: rise-in .5s .05s both ease-out; }
  .frame main > * { animation: rise-in .55s both cubic-bezier(.2,.8,.2,1); }
  .frame main > *:nth-child(2) { animation-delay: .08s; }
  .frame main > *:nth-child(3) { animation-delay: .16s; }
  .frame main > *:nth-child(4) { animation-delay: .24s; }
  .flow-path { stroke-dasharray: 6 5; animation: flow-dash 1.1s linear infinite; }
  .stagger > * { opacity: 0; transform: translateY(8px); animation: stagger-in .5s ease-out forwards; }
  .stagger > *:nth-child(1) { animation-delay: .05s; } .stagger > *:nth-child(2) { animation-delay: .15s; }
  .stagger > *:nth-child(3) { animation-delay: .25s; } .stagger > *:nth-child(4) { animation-delay: .35s; }
  .stagger > *:nth-child(5) { animation-delay: .45s; } .stagger > *:nth-child(6) { animation-delay: .55s; }
  .pulse-step { animation: pulse-step 1.8s ease-in-out infinite; }
  .float { animation: floaty 4s ease-in-out infinite; }
  .spin-slow { animation: spin 18s linear infinite; transform-origin: center; transform-box: fill-box; }
  .loop-pulse { animation: loop-pulse 2.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
}
html.thumb *, html.thumb *::before, html.thumb *::after { animation: none !important; transition: none !important; }
html.thumb .stagger > * { opacity: 1 !important; transform: none !important; }
@keyframes vt-out { to { opacity: 0; transform: translateX(-60px) scale(.97); filter: blur(4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateX(70px) scale(.97); filter: blur(4px); } }
@keyframes vt-out-back { to { opacity: 0; transform: translateX(60px) scale(.97); filter: blur(4px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-70px) scale(.97); filter: blur(4px); } }
@keyframes vt-zoom-out { to { opacity: 0; transform: scale(1.08); filter: blur(8px); } }
@keyframes vt-zoom-in { from { opacity: 0; transform: scale(.92); filter: blur(8px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes flow-dash { to { stroke-dashoffset: -22; } }
@keyframes stagger-in { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-step { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loop-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* --- terminal / console mockup --- */
.term { border-radius: 18px; background: #0e1a33; border: 1px solid rgba(0,0,0,.25); overflow: hidden; box-shadow: 0 14px 40px rgba(16,32,58,.18); }
.term-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #162648; color: #8fa2c7; font: 600 12px "JetBrains Mono", monospace; letter-spacing: .04em; }
.term-head i { width: 10px; height: 10px; border-radius: 99px; background: #ff6b6b; }
.term-head i:nth-child(2) { background: #ffd166; }
.term-head i:nth-child(3) { background: #4cd1a0; }
.term-head span { margin-left: 8px; }
.term pre { margin: 0; padding: 12px 16px 14px; font: 500 13.5px/1.5 "JetBrains Mono", monospace; color: #e6eeff; white-space: pre; overflow: hidden; }
.term .p { color: #7fb0ff; } .term .o { color: #8fa2c7; } .term .g { color: #86e6b4; } .term .y { color: #ffd166; } .term .r { color: #ff8aa0; } .term .h { color: #b9c8ff; font-weight: 700; }
.code-panel pre { font-size: 13.5px; }

/* --- quiz --- */
.quiz-grid { display: grid; gap: 12px; }
.q-card { border: 1px solid var(--line); border-radius: 18px; background: #fff; padding: 12px 16px 12px; display: grid; gap: 8px; }
.q-card.right { border-color: rgba(18,145,91,.55); background: linear-gradient(180deg, rgba(18,145,91,.08), #fff); }
.q-card.wrong { border-color: rgba(214,51,74,.5); background: linear-gradient(180deg, rgba(214,51,74,.07), #fff); }
.q-head { display: flex; gap: 10px; align-items: flex-start; }
.q-n { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-4)); color: #fff; font-weight: 800; font-size: 13px; }
.q-text { font-weight: 700; font-size: 16px; line-height: 1.3; }
.q-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.q-opt { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-alt); cursor: pointer; font-size: 14px; line-height: 1.28; text-align: left; font-family: inherit; color: var(--ink); transition: border-color .2s, background .2s, transform .15s; }
.q-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.q-opt .k { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: 11.5px; background: #fff; border: 1px solid var(--line-strong); }
.q-opt.sel { border-color: var(--accent); background: rgba(50,108,229,.1); }
.q-opt.sel .k { background: var(--accent); color: #fff; border-color: var(--accent); }
.q-opt.ok { border-color: var(--success); background: rgba(18,145,91,.14); }
.q-opt.ok .k { background: var(--success); color: #fff; border-color: var(--success); }
.q-opt.no { border-color: var(--danger); background: rgba(214,51,74,.1); }
.q-opt.no .k { background: var(--danger); color: #fff; border-color: var(--danger); }
.q-opt:disabled { cursor: default; transform: none; }
.q-bar { display: flex; align-items: center; gap: 10px; }
.q-check { border: 0; border-radius: 10px; padding: 6px 14px; font: 700 13px "Inter", sans-serif; background: var(--accent); color: #fff; cursor: pointer; }
.q-check:disabled { background: #b8c4dc; cursor: not-allowed; }
.q-verdict { font-weight: 800; font-size: 14px; }
.q-verdict.ok { color: var(--success); } .q-verdict.no { color: var(--danger); }
.q-expl { display: none; font-size: 14px; line-height: 1.38; color: var(--ink); padding: 8px 12px; border-radius: 12px; background: rgba(50,108,229,.07); border-left: 3px solid var(--accent); }
.q-card.done .q-expl { display: block; animation: rise-in .35s ease-out; }
.q-score { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #10203a; color: #fff; font-weight: 800; font-size: 13.5px; }
.score-ring { width: 150px; height: 150px; }
/* --- collapsible Study notes panel (a written tutorial for every slide) --- */
.study { position: absolute; top: 0; right: 0; bottom: 0; z-index: 8; pointer-events: none; }
.study > * { pointer-events: auto; }
.study-tab {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 9px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #326ce5, #2757c0); color: #fff; font: 800 13px "Inter", sans-serif; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer; box-shadow: -8px 10px 30px rgba(16,32,58,.22);
}
.study-tab .tx { writing-mode: vertical-rl; transform: rotate(180deg); }
.study-tab .ic { font-size: 15px; }
.study-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: 640px; display: flex; flex-direction: column;
  background: rgba(255,255,255,.985); border-left: 1px solid var(--line-strong); box-shadow: -30px 0 70px rgba(16,32,58,.22);
  transform: translateX(104%); transition: transform .38s cubic-bezier(.2,.8,.2,1);
}
.study.open .study-sheet { transform: translateX(0); }
.study.open .study-tab { opacity: 0; pointer-events: none; }
.study-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 14px; border-bottom: 1px solid var(--line);
  font: 800 13px "Inter", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); background: linear-gradient(180deg, rgba(50,108,229,.08), transparent); }
.study-close { border: 0; background: var(--bg-alt); width: 30px; height: 30px; border-radius: 10px; cursor: pointer; color: var(--muted); font-size: 14px; }
.study-body { overflow-y: auto; padding: 18px 26px 40px; font-size: 17px; line-height: 1.55; color: var(--ink); }
.study-body h2 { margin: 0 0 12px; font-family: "Manrope", sans-serif; font-size: 25px; line-height: 1.15; letter-spacing: -.02em; }
.study-body h3 { margin: 18px 0 6px; font-family: "Manrope", sans-serif; font-size: 18.5px; color: #1f4fb8; }
.study-body p { margin: 0 0 12px; }
.study-body ul, .study-body ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 5px; }
.study-body pre { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: #0e1a33; color: #e6eeff; font: 500 13.5px/1.5 "JetBrains Mono", monospace; overflow-x: auto; }
.study-body table { width: 100%; border-collapse: collapse; margin: 0 0 12px; font-size: 15px; }
.study-body th, .study-body td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.study-body th { background: var(--bg-alt); }
html.thumb .study { display: none; }
@media (prefers-reduced-motion: reduce) { .study-sheet { transition: none; } }

/* --- module opener and infographic slides --- */
.mod-num { font: 800 15px "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.mod-num::before { content: ""; display: inline-block; width: 38px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); margin-right: 12px; vertical-align: middle; }
.map { display: grid; gap: 7px; }
.map-row { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; font-size: 15.5px; line-height: 1.25; padding: 6px 10px; border-radius: 12px; background: var(--bg-alt); }
.map-row .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-4)); color: #fff; font-weight: 800; font-size: 12.5px; }
.info-fig { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-height: 0; }
.info-fig img { width: 100%; height: 100%; object-fit: contain; border-radius: 18px; border: 1px solid var(--line-strong); background: #fff; box-shadow: 0 16px 40px rgba(16,32,58,.14); cursor: zoom-in; min-height: 0; }
.info-fig figcaption { font-size: 12.5px; color: var(--muted); text-align: center; }
.legend { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.legend li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 15.5px; line-height: 1.3; }
.legend .lg-n { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; }
.zoom-overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(16,32,58,.82); backdrop-filter: blur(4px); cursor: zoom-out; padding: 20px; }
.zoom-overlay img { max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.4); background: #fff; }
html.thumb .zoom-overlay { display: none; }

/* tighter defaults so dense slides fit the fixed canvas */
.code-panel pre { font-size: 13px; line-height: 1.42; padding: 11px 16px 12px; }
.accent-card, .diagram-card, .callout { padding: 13px 14px; }
.row { gap: 12px; }

/* --- pod chips for rollout and replica diagrams --- */
.pchip { display: inline-grid; place-items: center; width: 52px; height: 46px; border-radius: 12px; font: 800 13px "Inter", sans-serif; color: #fff; box-shadow: 0 6px 14px rgba(16,32,58,.14); }
.pchip.v1 { background: linear-gradient(135deg, #326ce5, #5b8def); }
.pchip.v2 { background: linear-gradient(135deg, #12a58a, #3ccaa9); }
.pchip.off { background: #dde5f4; color: #7c8aa8; box-shadow: none; }
.pchip.bad { background: linear-gradient(135deg, #d6334a, #f0647a); }
.pchip.warm { background: linear-gradient(135deg, #f29d0c, #ffbf4d); }
.pchip.vio { background: linear-gradient(135deg, #8a5cf0, #b08cff); }
.pods { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* cards that get stretched by the grid centre their content vertically instead of leaving a void below it */
.accent-card, .diagram-card { display: flex; flex-direction: column; justify-content: center; }
.accent-card > *, .diagram-card > * { flex: none; }
.diagram-card > svg.diagram { flex: 1 1 auto; min-height: 0; }

svg.diagram .wire-green { fill: none; stroke: #12915b; stroke-width: 2.4; }
svg.diagram .wire-violet { fill: none; stroke: #8a5cf0; stroke-width: 2.4; }
