/* IZI Board Update — brand-aligned dark theme (izi.is / support.x.izi.is) */
:root {
  --bg: #000000;
  --bg-2: #0A0A0C;
  --bg-3: #14141A;
  --card: #101015;
  --card-hover: #16161D;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text: #FFFFFF;
  --text-mute: #A0A0A8;
  --text-dim: #6D6D75;
  --lime: #B3EE33;
  --lime-soft: rgba(179,238,51,0.14);
  --lime-glow: rgba(179,238,51,0.35);
  --amber: #E8A33D;
  --amber-soft: rgba(232,163,61,0.15);
  --good: #6EDA8A;
  --bad: #FF6B6B;
  --sans: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Manrope', 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

html, body, .reveal { background: var(--bg); }
.reveal { font-family: var(--sans); color: var(--text); -webkit-font-smoothing: antialiased; }

/* Every slide sits on the page — no cardstock, full bleed dark */
.reveal .slides section {
  background: var(--bg);
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  text-align: left;
  overflow: hidden;
  top: 0 !important;
  height: 100%;
}
.reveal .slides section.present { z-index: 1; }

.slide-inner {
  padding: 44px 64px 54px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.metric-slide .slide-inner { padding: 44px 72px 54px; }

/* Kicker — pill-shaped chip like on support.x.izi.is */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.6px;
  color: var(--lime);
  text-transform: uppercase;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--lime);
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 28px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime-glow);
}

.reveal h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -1.4px;
  color: var(--text);
  margin: 0 0 26px 0;
  text-transform: none;
}
.reveal h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  color: var(--text);
  margin: 26px 0 12px 0;
  letter-spacing: -0.3px;
}
.reveal h4 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  margin: 16px 0 8px 0;
  letter-spacing: -0.1px;
}

/* Body content */
.slide-body {
  font-size: 17px;
  line-height: 1.5;
  color: var(--text-mute);
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 14px;
  scroll-behavior: smooth;
}
.slide-body::-webkit-scrollbar { width: 6px; }
.slide-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 3px; }
.slide-body::-webkit-scrollbar-thumb { background: var(--lime-soft); border-radius: 3px; }
.slide-body::-webkit-scrollbar-thumb:hover { background: var(--lime); }
.slide-body p { margin: 10px 0; }
.slide-body strong, .slide-body b { color: var(--text); font-weight: 700; }
.slide-body em, .slide-body i { color: var(--text-mute); font-style: italic; }
.slide-body a {
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px solid var(--lime-soft);
  transition: border-color 0.15s;
}
.slide-body a:hover { border-bottom-color: var(--lime); }
.slide-body code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg-3);
  color: var(--lime);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.slide-body h3 { font-size: 22px; }
.slide-body h4 { font-size: 15px; }

/* Bullets — lime dots (matching the green checkmarks on support.x.izi.is) */
.slide-body ul {
  list-style: none;
  padding-left: 4px;
  margin: 12px 0;
}
.slide-body ul li {
  margin: 8px 0;
  padding-left: 22px;
  position: relative;
}
.slide-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 6px var(--lime-glow);
}
.slide-body ol {
  padding-left: 28px;
  margin: 12px 0;
  list-style: none;
  counter-reset: item;
}
.slide-body ol li {
  margin: 8px 0;
  padding-left: 4px;
  counter-increment: item;
  position: relative;
}
.slide-body ol li::before {
  content: counter(item);
  position: absolute;
  left: -28px;
  top: 0;
  color: var(--lime);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Tables */
.slide-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 14.5px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.slide-body thead th {
  background: var(--bg-3);
  color: var(--lime);
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.slide-body tbody td {
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-mute);
}
.slide-body tbody td:first-child, .slide-body tbody td strong, .slide-body tbody td b {
  color: var(--text);
}
.slide-body tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* METRIC SLIDE — two-column layout so everything fits in one screen */
.metric-layout {
  display: grid;
  grid-template-columns: minmax(320px, 400px) 1fr;
  gap: 48px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.metric-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 20px;
}
.metric-right {
  min-height: 0;
  overflow-y: auto;
  padding-right: 14px;
  scroll-behavior: smooth;
  position: relative;
  /* Fade indicator at bottom when content is scrollable */
  mask-image: linear-gradient(to bottom, black calc(100% - 40px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 40px), transparent 100%);
}
.metric-right.scrolled-to-bottom {
  mask-image: none;
  -webkit-mask-image: none;
}
.metric-right::-webkit-scrollbar { width: 6px; }
.metric-right::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); border-radius: 3px; }
.metric-right::-webkit-scrollbar-thumb { background: var(--lime-soft); border-radius: 3px; }
.metric-right::-webkit-scrollbar-thumb:hover { background: var(--lime); }

.big-number {
  font-family: var(--display);
  font-weight: 800;
  font-size: 172px;
  line-height: 0.92;
  color: var(--text);
  letter-spacing: -7px;
  margin: 0;
}
.big-caption {
  font-size: 17px;
  color: var(--text-mute);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 20px;
}

/* Big headline (when big-number slot is a full sentence) */
.big-headline {
  font-family: var(--display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -1.8px;
  margin: 0 0 14px 0;
  max-width: 96%;
}
.big-headline-sub {
  font-size: 20px;
  color: var(--text-mute);
  line-height: 1.45;
  max-width: 920px;
  margin-bottom: 22px;
  font-weight: 500;
}

/* ============ TITLE SLIDE ============ */
.title-slide { background: var(--bg) !important; }
.title-inner {
  padding: 90px 100px 120px;
  height: 100%;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.title-inner::before {
  content: "";
  position: absolute;
  top: 20%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--lime-glow) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.title-inner > * { position: relative; z-index: 1; }
.title-slide .brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 200px;
  line-height: 0.9;
  color: var(--text);
  letter-spacing: -10px;
}
.title-slide .title-sub {
  font-size: 32px;
  color: var(--text-mute);
  margin-top: 24px;
  font-weight: 500;
  letter-spacing: -0.4px;
}
.title-slide .title-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
  font-size: 13px;
  margin-top: 42px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--lime);
  border-radius: 999px;
  align-self: flex-start;
}
.title-slide .title-meta::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime-glow);
}
.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding-top: 40px;
}
.stat-strip .stat-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 46px;
  line-height: 1;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -1.5px;
}
.stat-strip .stat-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.4px;
  line-height: 1.4;
  font-weight: 500;
}

/* ============ TOC SLIDE ============ */
ol.toc {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  columns: 2;
  column-gap: 60px;
  font-size: 17px;
  line-height: 1.55;
  counter-reset: none;
}
ol.toc li {
  break-inside: avoid;
  padding: 7px 0;
  color: var(--text-mute);
  padding-left: 0;
  counter-increment: none;
}
ol.toc li::before { content: none; }
.toc-num {
  color: var(--lime);
  font-weight: 700;
  margin-right: 12px;
  display: inline-block;
  width: 32px;
  font-variant-numeric: tabular-nums;
}

/* ============ METHODOLOGY ============ */
.methodology-slide .method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin-top: 8px;
  font-size: 15px;
}
.methodology-slide .method-grid > div {
  padding: 22px 26px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
}
.methodology-slide h3 {
  font-size: 19px;
  margin: 0 0 10px 0;
  color: var(--text);
}
.methodology-slide p { color: var(--text-mute); margin: 6px 0; }
.methodology-slide ul { padding-left: 4px; }
.methodology-slide ul li { color: var(--text-mute); }
.methodology-slide code { font-size: 13px; }

/* ============ ARTEFACTS ============ */
.artefacts-slide .artefacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin-top: 8px;
}
.artefacts-slide .artefact {
  padding: 24px 26px;
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.artefacts-slide .artefact:hover { border-color: var(--lime); }
.artefacts-slide .a-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.artefacts-slide .a-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-mute);
}
.artefacts-slide .a-body code {
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--lime);
}

/* Reveal controls, progress */
.reveal .progress { color: var(--lime); height: 3px; }
.reveal .progress span { background: var(--lime); box-shadow: 0 0 6px var(--lime-glow); }
.reveal .controls { color: var(--lime); }
.reveal .slide-number {
  background: rgba(255,255,255,0.06);
  color: var(--text-mute);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  right: 24px;
  bottom: 22px;
}
/* Reveal built-in arrow controls — hidden globally */
.reveal .controls { display: none !important; }

/* Scroll hint on scrollable slide body */
.scroll-hint {
  position: absolute;
  right: 100px;
  bottom: 22px;
  color: var(--lime);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: bob 2s ease-in-out infinite;
  z-index: 50;
  opacity: 0.85;
}
.scroll-hint::before { content: "прокрути ↓"; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* Persistent brand mark bottom-left of the deck */
.brand-mark {
  position: fixed;
  bottom: 22px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  z-index: 100;
  text-transform: uppercase;
  pointer-events: none;
  font-weight: 700;
}
.brand-mark::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--lime);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--lime-glow);
}

/* Blockquote (used for footnotes) */
.slide-body blockquote {
  border-left: 3px solid var(--amber);
  background: var(--amber-soft);
  padding: 14px 20px;
  margin: 14px 0;
  border-radius: 0 12px 12px 0;
  color: var(--text-mute);
  font-size: 15px;
}
.slide-body blockquote p { margin: 4px 0; }

/* Print / PDF */
@media print {
  .deck-footer { display: none; }
}

/* ============ CARDS GRID (from Sub-cards sections) ============ */
.cards-section {
  margin: 14px 0 16px;
}
.cards-title {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}
.cards-grid {
  display: grid;
  gap: 12px;
}
.cards-grid.cards-1 { grid-template-columns: 1fr; }
.cards-grid.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-grid.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid.cards-4 { grid-template-columns: repeat(2, 1fr); }
.cards-grid.cards-5 { grid-template-columns: repeat(2, 1fr); }
/* On metric slides (right column narrower), always 2-up */
.metric-right .cards-grid.cards-4,
.metric-right .cards-grid.cards-5 { grid-template-columns: repeat(2, 1fr); }
.metric-right .cards-grid.cards-3 { grid-template-columns: repeat(3, 1fr); }

.mcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.mcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 22px;
  background: var(--lime);
  border-radius: 0 0 3px 0;
  box-shadow: 0 0 8px var(--lime-glow);
}
.mcard-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  color: var(--text);
  letter-spacing: -1px;
  margin-bottom: 6px;
}
.mcard-lbl {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.4;
  font-weight: 500;
}

/* ============ CHARTS ============ */
.chart-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px 12px;
  margin: 10px 0 12px;
  height: 220px;
  position: relative;
}
.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-table {
  margin: 4px 0 12px;
  font-size: 12px;
  color: var(--text-dim);
}
.chart-table summary {
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-block;
  color: var(--text-mute);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.chart-table summary:hover { border-color: var(--lime); color: var(--lime); }
.chart-table[open] summary { margin-bottom: 10px; }
.chart-table table { font-size: 13px; }

/* Callout styling for key insight paragraphs */
.slide-body p:has(> strong:first-child) {
  /* leave default styling for now */
}
