/* Rogue AI: Safeguarding Your Vibe Code — ESG interest group, 90-min talk
   Palette: C4AIL deep navy + amber, Practical Cyber accent green.
   Web deck: fixed 1920x1080 stage scaled-to-fit the viewport (browser + projector).
   Fork of sme-ai-myths-2026-05-28 design system. */

:root {
  --bg: #0a1628;
  --bg-card: #142236;
  --bg-card-2: #1e3a5f;
  --border: #2a3f5f;
  --text: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #f5a623;
  --accent-soft: rgba(245, 166, 35, 0.15);
  --green: #22c55e;
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --blue: #60a5fa;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: #05080f;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* --- Scale-to-fit stage --- */
#viewport { position: fixed; inset: 0; overflow: hidden; background: #05080f; }
#stage {
  width: 1920px; height: 1080px;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: center center;
  background: var(--bg);
}

.slide {
  width: 1920px; height: 1080px;
  padding: 80px 100px;
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.slide.active { display: flex; }

/* --- Navigation chrome --- */
.brand {
  position: absolute; bottom: 36px; left: 100px;
  color: var(--text-dim); font-size: 16px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 600;
}
.brand .sep { color: var(--accent); margin: 0 12px; }
.slide-num {
  position: absolute; bottom: 36px; right: 100px;
  color: var(--text-dim); font-size: 16px; font-weight: 600; letter-spacing: 0.1em;
}
#progress {
  position: fixed; top: 0; left: 0; height: 4px;
  background: var(--accent); z-index: 50; transition: width 0.2s ease;
}
#hint {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%);
  color: #33415577; font-size: 12px; letter-spacing: 0.1em; z-index: 50;
  text-transform: uppercase; font-weight: 600; pointer-events: none;
}

/* --- Type --- */
.eyebrow {
  font-size: 20px; font-weight: 700; color: var(--accent);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 28px;
}
h1 { font-size: 88px; font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 32px; }
h1.compact { font-size: 68px; }
h2 { font-size: 48px; font-weight: 700; line-height: 1.1; margin-bottom: 20px; }
h3 { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.subhead { font-size: 36px; font-weight: 500; color: var(--text-muted); line-height: 1.3; }
.subhead.large { font-size: 44px; color: var(--text); }
.lede { font-size: 28px; font-weight: 400; color: var(--text-muted); line-height: 1.45; max-width: 1500px; }
.amber { color: var(--accent); } .dim { color: var(--text-dim); } .muted { color: var(--text-muted); }
.green { color: var(--green); } .red { color: var(--red); } .blue { color: var(--blue); } .bold { font-weight: 800; }

/* --- Cold open / title --- */
.cold-open {
  background: radial-gradient(ellipse at 30% 40%, rgba(245,166,35,0.10) 0%, transparent 55%), var(--bg);
  justify-content: center;
}
.cold-open .eyebrow { margin-bottom: 36px; }
.cold-open h1 { font-size: 116px; max-width: 1500px; }
.cold-open .tagline {
  font-size: 44px; font-weight: 600; color: var(--text); margin-top: 8px; max-width: 1400px;
}
.cold-open .tagline .accent { color: var(--accent); }
.cold-open .presenter {
  position: absolute; bottom: 96px; left: 100px; right: 100px;
  border-top: 1px solid var(--border); padding-top: 24px;
  font-size: 24px; color: var(--text-muted);
}
.cold-open .presenter strong { color: var(--text); }
.cold-open .presenter .sep { color: var(--accent); margin: 0 12px; }

.huge-num {
  font-size: 220px; font-weight: 900; line-height: 0.9; letter-spacing: -0.04em;
  color: var(--accent); text-shadow: 0 0 80px rgba(245,166,35,0.25); margin-bottom: 40px; max-width: 1320px;
}
.incident .subhead { font-size: 46px; font-weight: 600; color: var(--text); max-width: 1000px; }
.incident .caption {
  margin-top: 36px; font-size: 24px; color: var(--text-muted); max-width: 1010px; line-height: 1.4;
}
.incident .caption strong { color: var(--accent); }

/* Evidence thumbnail (bottom-right rail) — kept clear of the left text column */
.evidence-thumb {
  position: absolute; right: 90px; bottom: 150px;
  width: 560px; max-height: 640px;
  border: 2px solid var(--border); border-radius: 8px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55); background: #0b1220;
}
.evidence-thumb img { width: 100%; display: block; object-fit: cover; object-position: top center; max-height: 560px; }
.evidence-thumb .credit {
  font-size: 15px; color: var(--text-dim); padding: 10px 16px; letter-spacing: 0.04em;
  background: #0b1220; border-top: 1px solid var(--border);
}

/* --- Intro / who --- */
.intro { justify-content: center; }
.intro .name { font-size: 104px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.intro .role { font-size: 30px; color: var(--text-muted); margin-bottom: 48px; }
.intro ul { list-style: none; font-size: 29px; line-height: 1.6; }
.intro ul li { margin-bottom: 16px; padding-left: 36px; position: relative; }
.intro ul li::before { content: ''; position: absolute; left: 0; top: 18px; width: 20px; height: 4px; background: var(--accent); }
.intro ul li strong { color: var(--accent); }

/* --- Section markers --- */
.section { justify-content: center; background: radial-gradient(ellipse at 70% 60%, rgba(245,166,35,0.07) 0%, transparent 55%), var(--bg); }
.section .kicker { font-size: 40px; font-weight: 900; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 20px; }
.section h1 { font-size: 128px; }
.section .sub { font-size: 34px; color: var(--text-muted); max-width: 1500px; margin-top: 8px; }

/* --- Thesis --- */
.thesis { justify-content: center; align-items: flex-start; }
.thesis .quote { font-size: 96px; font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin-bottom: 44px; max-width: 1700px; }
.thesis .quote .accent { color: var(--accent); }
.thesis .closing { font-size: 34px; color: var(--text-muted); max-width: 1500px; line-height: 1.4; }
.thesis .closing strong { color: var(--text); }

/* --- House diagram (the stack) --- */
.house h1 { font-size: 64px; margin-bottom: 8px; }
.house .sub { font-size: 26px; color: var(--text-muted); margin-bottom: 32px; }
.house .layers { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.layer {
  display: grid; grid-template-columns: 360px 1fr 300px; align-items: center; gap: 28px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px 30px; border-left: 6px solid var(--accent);
}
.layer .room { font-size: 27px; font-weight: 800; color: var(--accent); }
.layer .what { font-size: 23px; color: var(--text); line-height: 1.35; }
.layer .what strong { color: var(--text); }
.layer .tech { font-size: 19px; color: var(--text-dim); text-align: right; font-family: 'SFMono-Regular', ui-monospace, Menlo, monospace; }
.house .foot { font-size: 24px; color: var(--text-muted); margin-top: 26px; }
.house .foot strong { color: var(--accent); }

/* --- Stack definition --- */
.stackdef { justify-content: center; }
.stackdef .term { font-size: 120px; font-weight: 900; letter-spacing: -0.03em; color: var(--accent); margin-bottom: 24px; }
.stackdef .def { font-size: 40px; line-height: 1.4; color: var(--text); max-width: 1600px; margin-bottom: 40px; }
.stackdef .example { display: flex; gap: 16px; flex-wrap: wrap; }
.stackdef .chip {
  font-size: 24px; font-weight: 700; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 999px; padding: 12px 26px; color: var(--text);
}
.stackdef .chip .k { color: var(--accent); }
.stackdef .foot { font-size: 26px; color: var(--text-muted); margin-top: 40px; }

/* --- Hole slides (where it breaks) --- */
/* NB: do NOT set `display` here — it would override .slide's hidden state
   (same specificity, later rule) and force every hole slide visible. */
.hole { flex-direction: column; }
.hole .tag {
  display: inline-flex; align-items: center; gap: 16px; margin-bottom: 22px;
}
.hole .tag .num { font-size: 22px; font-weight: 900; color: var(--red); letter-spacing: 0.14em; text-transform: uppercase; }
.hole .tag .cwe { font-size: 16px; color: var(--text-dim); font-family: ui-monospace, monospace; letter-spacing: 0.04em; }
.hole h1 { font-size: 62px; margin-bottom: 8px; }
.hole .house-line { font-size: 26px; color: var(--accent); font-weight: 700; margin-bottom: 24px; }
.hole .body { display: grid; grid-template-columns: 1fr 660px; gap: 56px; align-items: start; }
.hole.nofig .body { grid-template-columns: 1fr; }
.hole .body ul { list-style: none; font-size: 25px; line-height: 1.45; }
.hole .body ul li { margin-bottom: 16px; padding-left: 38px; position: relative; color: var(--text); }
.hole .body ul li::before { content: '▸'; position: absolute; left: 0; top: 0; color: var(--red); font-size: 24px; }
.hole .body ul li strong { color: var(--accent); }
.hole .gut {
  margin-top: 22px; padding: 20px 30px; background: var(--red-soft); border-left: 6px solid var(--red);
  border-radius: 4px; font-size: 26px; line-height: 1.35; color: var(--text); font-weight: 600; max-width: 1120px;
}
.hole .gut strong { color: var(--red); }
.hole .fig { border: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: #0b1220; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.hole .fig img { width: 100%; display: block; object-fit: contain; max-height: 540px; background: #fff; }
.hole .fig.dark img { background: #0b1220; }
.hole .fig .credit { font-size: 15px; color: var(--text-dim); padding: 10px 16px; border-top: 1px solid var(--border); }
.code { font-family: ui-monospace, Menlo, monospace; background: #0b1220; border: 1px solid var(--border); border-radius: 4px; padding: 2px 10px; color: var(--green); font-size: 0.92em; }

/* --- The pattern (4 mechanisms) --- */
.pattern h1 { font-size: 60px; margin-bottom: 10px; }
.pattern .sub { font-size: 26px; color: var(--text-muted); margin-bottom: 34px; max-width: 1600px; }
.pattern .sub strong { color: var(--text); }
.pattern .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; flex: 1; align-content: start; }
.pattern .m { background: var(--bg-card); border: 1px solid var(--border); border-top: 6px solid var(--red); border-radius: 10px; padding: 26px 30px; }
.pattern .m .h { font-size: 27px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.pattern .m .b { font-size: 22px; line-height: 1.4; color: var(--text-muted); }
.pattern .m .b strong { color: var(--accent); }
.pattern .synth { font-size: 28px; font-weight: 700; margin-top: 28px; color: var(--text); max-width: 1700px; }
.pattern .synth .accent { color: var(--accent); }

/* --- Frameworks --- */
.frameworks h1 { font-size: 60px; margin-bottom: 10px; }
.frameworks .sub { font-size: 26px; color: var(--text-muted); margin-bottom: 30px; max-width: 1600px; }
.frameworks .two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; flex: 1; }
.frameworks .fw { display: flex; flex-direction: column; }
.frameworks .fw .cap { font-size: 24px; font-weight: 800; color: var(--accent); margin-bottom: 14px; letter-spacing: 0.04em; }
.frameworks .fw .frame { border: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,0.45); height: 560px; }
.frameworks .fw .frame img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: top center; }
.frameworks .fw .credit { font-size: 15px; color: var(--text-dim); margin-top: 10px; }

/* --- Checklist --- */
.checklist h1 { font-size: 60px; margin-bottom: 8px; }
.checklist .sub { font-size: 26px; color: var(--text-muted); margin-bottom: 28px; }
.checklist .sub strong { color: var(--accent); }
.checklist ol { list-style: none; counter-reset: c; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; flex: 1; align-content: center; }
.checklist li { counter-increment: c; position: relative; padding: 30px 28px 30px 84px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; font-size: 26px; line-height: 1.35; color: var(--text); }
.checklist li::before { content: counter(c); position: absolute; left: 24px; top: 28px; width: 42px; height: 42px; background: var(--accent); color: var(--bg); font-weight: 900; font-size: 23px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.checklist li strong { color: var(--accent); }
.checklist li .hint { display: block; font-size: 18px; color: var(--text-dim); margin-top: 6px; }

/* --- 98/2 + governance --- */
.principle { justify-content: center; }
.principle .split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.principle .col { padding: 40px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); }
.principle .col.a { border-top: 8px solid var(--green); }
.principle .col.b { border-top: 8px solid var(--blue); }
.principle .col .pct { font-size: 92px; font-weight: 900; line-height: 1; margin-bottom: 14px; }
.principle .col.a .pct { color: var(--green); }
.principle .col.b .pct { color: var(--blue); }
.principle .col .lbl { font-size: 30px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.principle .col .d { font-size: 23px; color: var(--text-muted); line-height: 1.4; }
.principle .govern { font-size: 26px; color: var(--text-muted); max-width: 1600px; line-height: 1.45; }
.principle .govern strong { color: var(--accent); }

/* --- Interactive --- */
.interactive { justify-content: center; }
.interactive h1 { font-size: 88px; margin-bottom: 28px; }
.interactive .prompt { font-size: 40px; color: var(--text); max-width: 1500px; line-height: 1.4; margin-bottom: 40px; }
.interactive .prompt .accent { color: var(--accent); font-weight: 800; }
.interactive .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.interactive .step { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 26px 28px; border-left: 6px solid var(--accent); }
.interactive .step .n { font-size: 18px; font-weight: 900; color: var(--accent); letter-spacing: 0.12em; margin-bottom: 10px; }
.interactive .step .t { font-size: 23px; line-height: 1.4; color: var(--text-muted); }
.interactive .step .t strong { color: var(--text); }
.interactive .safety { font-size: 20px; color: var(--text-dim); font-style: italic; margin-top: 30px; }

/* --- Close --- */
.close { justify-content: center; background: radial-gradient(ellipse at 40% 40%, rgba(245,166,35,0.09) 0%, transparent 55%), var(--bg); }
.close .punch { font-size: 104px; font-weight: 900; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 44px; max-width: 1650px; }
.close .punch .strike { color: var(--text-dim); }
.close .punch .accent { color: var(--accent); }
.close .takeaways { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; max-width: 1650px; }
.close .takeaway { font-size: 27px; font-weight: 600; line-height: 1.4; display: flex; gap: 22px; align-items: baseline; color: var(--text); }
.close .takeaway .n { font-size: 30px; font-weight: 900; color: var(--accent); min-width: 44px; }
.close .contact { border-top: 1px solid var(--border); padding-top: 26px; font-size: 24px; color: var(--text-muted); }
.close .contact strong { color: var(--text); }
.close .contact .sep { color: var(--accent); margin: 0 12px; }
