@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: #fbf6ee;
  --bg-alt: #f3e8d6;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-tint: rgba(248, 232, 210, 0.85);
  --line: rgba(120, 84, 48, 0.18);
  --line-strong: rgba(120, 84, 48, 0.34);
  --ink: #241a12;
  --muted: #6b5c4d;
  --accent: #d6553f;
  --accent-2: #1f8a7c;
  --accent-3: #c98a2b;
  --accent-4: #6d5bd0;
  --success: #1f8a4c;
  --warning: #b8650f;
  --danger: #b3261e;
  --code-bg: #241a12;
  --code-ink: #f3e8d6;
  --code-muted: #b8a48d;
  --shadow: 0 30px 80px rgba(90, 54, 27, 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(214, 85, 63, 0.13), transparent 30%),
    radial-gradient(circle at 92% 6%, rgba(31, 138, 124, 0.12), transparent 26%),
    radial-gradient(circle at 12% 96%, rgba(201, 138, 43, 0.12), transparent 26%),
    linear-gradient(180deg, #fdfaf4 0%, #f6ecdc 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(214, 85, 63, 0.06), transparent 26%),
    radial-gradient(circle at 88% 10%, rgba(31, 138, 124, 0.1), transparent 20%),
    radial-gradient(circle at 6% 100%, rgba(201, 138, 43, 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(214, 85, 63, 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(214, 85, 63, 0.13), rgba(255, 255, 255, 0.94));
}
.accent-card.teal {
  background: linear-gradient(180deg, rgba(31, 138, 124, 0.13), rgba(255, 255, 255, 0.94));
}
.accent-card.gold {
  background: linear-gradient(180deg, rgba(201, 138, 43, 0.15), rgba(255, 255, 255, 0.95));
}
.accent-card.violet {
  background: linear-gradient(180deg, rgba(109, 91, 208, 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(179, 38, 30, 0.12), rgba(255, 255, 255, 0.95));
  border-color: rgba(179, 38, 30, 0.32);
}
.quad-cell.warn {
  background: linear-gradient(180deg, rgba(184, 101, 15, 0.12), rgba(255, 255, 255, 0.95));
  border-color: rgba(184, 101, 15, 0.32);
}
.quad-cell.ok {
  background: linear-gradient(180deg, rgba(31, 138, 76, 0.1), rgba(255, 255, 255, 0.95));
  border-color: rgba(31, 138, 76, 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(179, 38, 30, 0.12);
}
.severity.high {
  color: #a4460b;
  background: rgba(184, 101, 15, 0.14);
}
.severity.med {
  color: var(--accent-3);
  background: rgba(201, 138, 43, 0.14);
}
.severity.low {
  color: var(--success);
  background: rgba(31, 138, 76, 0.12);
}
.severity.info {
  color: var(--accent-2);
  background: rgba(31, 138, 124, 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: #8d9a8a;
}
.code-panel .k {
  color: #f0a26b;
}
.code-panel .s {
  color: #8fd3c0;
}
.code-panel .v {
  color: #e8b7a4;
}
.code-panel .bad {
  color: #ff9a8f;
}
.code-panel .good {
  color: #8fe0a8;
}

/* --- 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(214, 85, 63, 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(107, 92, 77, 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), #e07a56);
  color: white;
  border-color: transparent;
}

.nav-btn:focus-visible {
  outline: 3px solid rgba(214, 85, 63, 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(214, 85, 63, 0.28);
  outline-offset: 2px;
}

.slide-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(36, 26, 18, 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(36, 26, 18, 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(214, 85, 63, 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(214, 85, 63, 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(31, 138, 124, 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;
  }
}
