:root {
  --midnight: #0E1E3F;
  --midnight-2: #182A52;
  --leaf: #4FB76C;
  --leaf-soft: #6BCC85;
  --white: #FFFFFF;
  --offwhite: #EAF1F2;
  --muted: rgba(255, 255, 255, 0.62);
  --border: rgba(255, 255, 255, 0.10);
}

/* Reveal overrides */
.reveal {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  background: var(--midnight);
  -webkit-font-smoothing: antialiased;
}
.reveal .slides {
  text-align: left;
}
.reveal .slides section {
  padding: 0;
  height: 100%;
  box-sizing: border-box;
}
.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
  color: var(--white);
  text-transform: none;
  letter-spacing: -0.02em;
}
.reveal a { color: var(--leaf); }
.reveal .controls { color: var(--leaf); }
.reveal .progress { color: var(--leaf); }

/* ============ Title slide ============ */
.title-slide {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 0;
  background: var(--midnight);
}
.title-slide .topline {
  height: 4px;
  background: var(--leaf);
  width: 80px;
  margin: 56px 64px 0;
}
.title-slide .body {
  padding: 0 64px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.title-slide h1 {
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin-bottom: 16px;
}
.title-slide h1 strong { font-weight: 600; }
.title-slide h1 .accent { color: var(--leaf); font-weight: 600; }
.title-slide .subtitle {
  font-size: 17px;
  color: var(--offwhite);
  font-weight: 400;
}
.title-slide .subtitle .role { color: var(--muted); }
.title-slide .footer {
  padding: 0 64px 36px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

/* ============ Narrative slide (Style A) ============ */
.narrative-slide {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 56px 64px;
  background: var(--midnight);
}
.narrative-slide .label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leaf);
  font-weight: 500;
  margin-bottom: 16px;
}
.narrative-slide .label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--leaf);
  vertical-align: middle;
  margin-right: 10px;
}
.narrative-slide h1 {
  font-size: 38px;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 22px;
  max-width: 90%;
}
.narrative-slide h1 strong { font-weight: 600; }
.narrative-slide h1 .accent { color: var(--leaf); }
.narrative-slide .body {
  font-size: 17px;
  line-height: 1.6;
  color: var(--offwhite);
  max-width: 85%;
}
.narrative-slide .body p { margin-bottom: 10px; }
.narrative-slide .body em {
  color: var(--leaf-soft);
  font-style: normal;
  font-weight: 500;
}
.narrative-slide .body ul {
  list-style: none;
  padding: 0;
}
.narrative-slide .body ul li {
  padding: 6px 0 6px 22px;
  position: relative;
}
.narrative-slide .body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 10px;
  height: 1px;
  background: var(--leaf);
}
.narrative-slide > div:first-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.narrative-slide .footer {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-shrink: 0;
}

/* ============ Technical slide (Style A+B hybrid) ============ */
.tech-slide {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  background: var(--midnight);
}
.tech-slide .topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 36px;
  border-bottom: 1px solid var(--border);
}
.tech-slide .topbar .dot {
  width: 8px;
  height: 8px;
  background: var(--leaf);
  border-radius: 50%;
  flex-shrink: 0;
}
.tech-slide .topbar .crumb {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.tech-slide .topbar .crumb b {
  color: var(--white);
  font-weight: 500;
}
.tech-slide .body {
  padding: 28px 36px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  overflow: hidden;
}
.tech-slide .body.full {
  grid-template-columns: 1fr;
}
.tech-slide .label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--leaf);
  font-weight: 500;
  margin-bottom: 12px;
}
.tech-slide .label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--leaf);
  vertical-align: middle;
  margin-right: 10px;
}
.tech-slide h1 {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.12;
  margin-bottom: 14px;
}
.tech-slide h1 strong { font-weight: 600; }
.tech-slide .lead {
  font-size: 14px;
  color: var(--offwhite);
  line-height: 1.6;
}
.tech-slide .lead p { margin-bottom: 8px; }
.tech-slide .lead em {
  color: var(--leaf-soft);
  font-style: normal;
  font-weight: 500;
}
.tech-slide .panel {
  background: rgba(79, 183, 108, 0.06);
  border: 1px solid rgba(79, 183, 108, 0.22);
  border-radius: 6px;
  padding: 16px 18px;
  align-self: start;
}
.tech-slide .panel .ph {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--leaf);
  font-weight: 600;
  margin-bottom: 10px;
}
.tech-slide .panel ul { list-style: none; padding: 0; }
.tech-slide .panel li {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  padding: 4px 0;
  color: var(--offwhite);
  display: flex;
  gap: 12px;
}
.tech-slide .panel li span {
  color: var(--muted);
  min-width: 18px;
}
.tech-slide .panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.tech-slide .panel table th,
.tech-slide .panel table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
  color: var(--offwhite);
}
.tech-slide .panel table th {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leaf);
  font-weight: 600;
  border-bottom: 1px solid rgba(79, 183, 108, 0.3);
}
.tech-slide .footer {
  padding: 12px 36px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
}

/* ============ Demo handoff fragment ============ */
.demo-handoff {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  border: 1px solid var(--leaf);
  border-radius: 999px;
  color: var(--leaf);
  font-size: 13px;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.demo-handoff::before {
  content: '→';
  margin-right: 8px;
}

/* ============ Reveal.js specificity overrides ============ */
/*
 * Reveal applies .reveal .slides section.present { display: block }
 * (specificity 0-3-1). Our per-class rules (.title-slide etc.) only
 * reach 0-1-0 and lose. These rules match 0-3-1 and win on source-
 * order because kodecraft.css loads after reveal.css.
 */
.reveal .slides section.title-slide {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  height: 100% !important;
  box-sizing: border-box;
}
.reveal .slides section.narrative-slide {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  height: 100% !important;
  box-sizing: border-box;
}
.reveal .slides section.tech-slide {
  display: grid !important;
  grid-template-rows: auto 1fr auto;
  height: 100% !important;
  box-sizing: border-box;
}

/* ============ PDF print styles ============ */
@media print {
  .reveal { font-size: 22px; }
}
