/* Applied NLP — SDAIA Academy slide engine
   Fixed 1600x900 stage, scaled to fit the viewport by deck.js. */

:root {
  --navy: #1c355e;
  --teal: #00ae8d;
  --coral: #e96852;
  --green: #6abf4b;
  --cyan: #00c1de;
  --amber: #ffb548;      /* AI Engineering track colour */
  --purple: #625d9c;
  --ink: #101820;
  --paper: #f7f5f0;
  --paper-2: #efece4;
  --line: #d4d0c5;
  --muted: #5b6472;
  --code-bg: #0f1722;
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --stage-w: 1600px;
  --stage-h: 900px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #0b111a;
  color: var(--ink);
  font-family: var(--font);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- stage ---------- */
.deck {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--stage-w); height: var(--stage-h);
  transform-origin: center center;
}
.slide {
  position: absolute; inset: 0;
  background: var(--paper);
  padding: 92px 110px 90px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-size: 30px;
  line-height: 1.42;
}
.slide.active { display: flex; }
.slide > .body { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.slide.top > .body { justify-content: flex-start; }

/* chrome added by deck.js */
.chrome-top {
  position: absolute; left: 110px; right: 110px; top: 34px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 17px; letter-spacing: .04em; color: var(--muted);
}
.chrome-top .logo { height: 44px; color: var(--navy); display: flex; }
.chrome-top .logo svg { height: 100%; width: auto; }
.chrome-top .crumb { display: flex; gap: 14px; align-items: center; }
.chrome-top .crumb b { color: var(--navy); font-weight: 600; }
.chrome-bottom {
  position: absolute; left: 110px; right: 110px; bottom: 30px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 16px; color: var(--muted);
}
.chrome-bottom .track { display: flex; align-items: center; gap: 10px; }
.chrome-bottom .track i { width: 12px; height: 12px; border-radius: 3px; background: var(--amber); display: inline-block; }
.progress { position: absolute; left: 0; bottom: 0; height: 6px; background: var(--amber); transition: width .25s ease; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { margin: 0; color: var(--navy); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 84px; line-height: 1.05; }
h2 { font-size: 54px; line-height: 1.12; margin-bottom: 30px; }
h3 { font-size: 34px; line-height: 1.2; margin-bottom: 12px; }
h4 { font-size: 26px; margin-bottom: 8px; }
p { margin: 0 0 18px; }
.kicker {
  font-size: 20px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.lead { font-size: 36px; color: var(--muted); line-height: 1.35; }
.small { font-size: 24px; }
.xsmall { font-size: 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.ar { font-family: var(--font-ar); direction: rtl; unicode-bidi: isolate; }
b, strong { font-weight: 600; }
em { color: var(--coral); font-style: normal; font-weight: 600; }
code { font-family: var(--mono); font-size: .86em; background: rgba(28,53,94,.08); padding: 2px 8px; border-radius: 6px; color: var(--navy); }
a { color: var(--teal); }

ul.bullets, ol.bullets { margin: 0; padding-left: 0; list-style: none; }
ul.bullets > li, ol.bullets > li { position: relative; padding-left: 42px; margin-bottom: 16px; }
ul.bullets > li::before {
  content: ""; position: absolute; left: 6px; top: .52em; width: 14px; height: 14px;
  border-radius: 4px; background: var(--amber); transform: rotate(45deg);
}
ol.bullets { counter-reset: n; }
ol.bullets > li { counter-increment: n; }
ol.bullets > li::before {
  content: counter(n); position: absolute; left: 0; top: .1em; width: 30px; height: 30px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: 18px; font-weight: 600; display: grid; place-items: center;
}
ul.bullets.tight > li, ol.bullets.tight > li { margin-bottom: 8px; }
ul.bullets ul { margin: 6px 0 0; padding-left: 26px; font-size: .86em; color: var(--muted); }

/* ---------- layout ---------- */
.cols { display: grid; gap: 44px; align-items: start; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-12 { grid-template-columns: 1fr 2fr; }
.cols-21 { grid-template-columns: 2fr 1fr; }
.cols-32 { grid-template-columns: 3fr 2fr; }
.cols.gap-s { gap: 24px; }
.cols.mid { align-items: center; }
.stack > * + * { margin-top: 20px; }
.mt { margin-top: 30px; }
.mt-s { margin-top: 14px; }
.mb0 { margin-bottom: 0; }

/* ---------- cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 30px; font-size: 24px; line-height: 1.4;
  border-top: 6px solid var(--c, var(--navy));
}
.card h3, .card h4 { color: var(--c, var(--navy)); }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { margin: 6px 0 0; padding-left: 22px; }
.card ul li { margin-bottom: 4px; }
.c-teal { --c: var(--teal); }
.c-coral { --c: var(--coral); }
.c-green { --c: var(--green); }
.c-cyan { --c: var(--cyan); }
.c-amber { --c: #d98f17; }
.c-purple { --c: var(--purple); }
.c-navy { --c: var(--navy); }
.card.flat { border-top-width: 1px; border-left: 8px solid var(--c, var(--navy)); }
.card.tint { background: color-mix(in srgb, var(--c, var(--navy)) 7%, #fff); }

.pill {
  display: inline-block; font-size: 19px; font-weight: 600; padding: 5px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--c, var(--navy)) 14%, #fff); color: var(--c, var(--navy));
  border: 1px solid color-mix(in srgb, var(--c, var(--navy)) 35%, #fff); margin: 0 6px 8px 0;
}

.callout {
  border-radius: 16px; padding: 22px 28px; font-size: 25px;
  background: color-mix(in srgb, var(--c, var(--teal)) 10%, #fff);
  border-left: 8px solid var(--c, var(--teal));
}
.callout b:first-child { color: var(--c, var(--teal)); }
.callout.warn { --c: var(--coral); }
.callout.tip { --c: var(--teal); }
.callout.note { --c: var(--purple); }

/* ---------- tables ---------- */
table.t { border-collapse: collapse; width: 100%; font-size: 23px; background: #fff; border-radius: 14px; overflow: hidden; }
table.t th { background: var(--navy); color: #fff; text-align: left; font-weight: 600; padding: 13px 18px; }
table.t td { padding: 11px 18px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
table.t tr:last-child td { border-bottom: none; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t.small { font-size: 20px; }
table.t.small th, table.t.small td { padding: 9px 14px; }
table.t td.ar { text-align: left; }
table.t tr.hl td { background: color-mix(in srgb, var(--amber) 18%, #fff); font-weight: 600; }

/* ---------- code ---------- */
pre.code {
  margin: 0; background: var(--code-bg); color: #e6edf3; border-radius: 16px;
  padding: 24px 28px; font-family: var(--mono); font-size: 19px; line-height: 1.5;
  overflow: hidden; white-space: pre; position: relative; flex-shrink: 0;
}
pre.code code { background: none; padding: 0; color: inherit; font-size: inherit; }
pre.code[data-file]::before {
  content: attr(data-file); display: block; font-size: 15px; color: #8b98a9; margin: -8px 0 12px;
  letter-spacing: .05em;
}
pre.code.s { font-size: 17px; }
pre.code.l { font-size: 24px; }
.hljs { background: transparent !important; }
pre.code .cm { color: #7d8a9b; font-style: italic; }
pre.code .hl-line { background: rgba(255,181,72,.16); display: inline-block; width: 100%; }

/* ---------- token chips ---------- */
.tokens { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--mono); font-size: 26px; }
.tokens span {
  padding: 4px 10px; border-radius: 8px; background: var(--tc, #dbe7ff); color: var(--ink);
  border: 1px solid rgba(0,0,0,.06);
}
.tokens span:nth-child(5n+1) { --tc: #ffe3b3; }
.tokens span:nth-child(5n+2) { --tc: #c9efe6; }
.tokens span:nth-child(5n+3) { --tc: #ffd3cb; }
.tokens span:nth-child(5n+4) { --tc: #d7f0ff; }
.tokens span:nth-child(5n+5) { --tc: #e2def5; }
.tokens.ids span { --tc: #eef0f3 !important; color: var(--navy); }
.tokens.ar { direction: rtl; font-family: var(--font-ar); }

/* ---------- flow diagrams ---------- */
.flow { display: flex; align-items: stretch; gap: 0; }
.flow .step {
  flex: 1; background: #fff; border: 2px solid var(--c, var(--navy)); border-radius: 16px;
  padding: 18px 18px; text-align: center; font-size: 22px; line-height: 1.3;
  display: flex; flex-direction: column; justify-content: center;
}
.flow .step b { display: block; color: var(--c, var(--navy)); font-size: 25px; margin-bottom: 4px; }
.flow .arrow { width: 46px; display: grid; place-items: center; color: var(--muted); font-size: 34px; flex: 0 0 46px; }
.flow.v { flex-direction: column; }
.flow.v .arrow { width: auto; height: 34px; flex-basis: 34px; font-size: 22px; }

/* ---------- metric / big numbers ---------- */
.big { font-size: 96px; font-weight: 700; color: var(--navy); line-height: 1; letter-spacing: -.03em; }
.stat .big { font-size: 72px; }
.stat .lbl { font-size: 22px; color: var(--muted); margin-top: 8px; }

/* horizontal bars */
.bars { display: grid; gap: 12px; font-size: 22px; }
.bars .row { display: grid; grid-template-columns: 260px 1fr 90px; gap: 16px; align-items: center; }
.bars .bar { height: 26px; border-radius: 6px; background: var(--c, var(--teal)); width: var(--w); }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ---------- special slide types ---------- */
.slide.title, .slide.section, .slide.break, .slide.dark {
  background:
    radial-gradient(1200px 700px at 85% 15%, rgba(0,174,141,.22), transparent 60%),
    radial-gradient(900px 600px at 10% 100%, rgba(255,181,72,.16), transparent 60%),
    var(--navy);
  color: #fff;
}
.slide.title h1, .slide.section h1, .slide.break h1, .slide.dark h1,
.slide.title h2, .slide.section h2, .slide.dark h2, .slide.dark h3 { color: #fff; }
.slide.title .lead, .slide.section .lead, .slide.break .lead, .slide.dark .lead { color: rgba(255,255,255,.78); }
.slide.title .chrome-top .logo, .slide.section .chrome-top .logo, .slide.break .chrome-top .logo, .slide.dark .chrome-top .logo { color: #fff; }
.slide.title .chrome-top, .slide.section .chrome-top, .slide.break .chrome-top, .slide.dark .chrome-top,
.slide.title .chrome-bottom, .slide.section .chrome-bottom, .slide.break .chrome-bottom, .slide.dark .chrome-bottom { color: rgba(255,255,255,.6); }
.slide.title .chrome-top .crumb b, .slide.section .chrome-top .crumb b, .slide.dark .chrome-top .crumb b, .slide.break .chrome-top .crumb b { color: #fff; }
.slide.dark .card { color: var(--ink); }

.slide.title .kicker, .slide.section .kicker, .slide.break .kicker, .slide.dark .kicker { color: var(--amber); }
.slide.title h1 { font-size: 96px; max-width: 1250px; }
.slide.title .meta { display: flex; gap: 14px; margin-top: 46px; flex-wrap: wrap; }
.slide.title .meta span {
  font-size: 21px; padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); color: rgba(255,255,255,.88);
}
.slide.title .meta span.track { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 600; }

.slide.section .sess-no {
  font-size: 240px; font-weight: 700; line-height: .8; color: transparent;
  -webkit-text-stroke: 2px rgba(255,181,72,.75); position: absolute; right: 110px; bottom: 110px; letter-spacing: -.04em;
}
.slide.section h1 { font-size: 80px; max-width: 1100px; }
.slide.section .outcomes { margin-top: 40px; font-size: 26px; color: rgba(255,255,255,.85); max-width: 1000px; }
.slide.section .outcomes li::before { background: var(--amber); }

.slide.break .body { align-items: center; text-align: center; }
.slide.break h1 { font-size: 90px; }
.timer {
  font-family: var(--mono); font-size: 190px; font-weight: 600; color: var(--amber); letter-spacing: -.02em;
  margin: 26px 0 10px; font-variant-numeric: tabular-nums; line-height: 1;
}
.timer.done { color: var(--coral); }
.timer-btns { display: flex; gap: 14px; justify-content: center; margin-bottom: 24px; }
.timer-btns button {
  font: 600 20px var(--font); padding: 10px 26px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4);
  background: transparent; color: #fff; cursor: pointer;
}
.timer-btns button:hover { background: rgba(255,255,255,.12); }

/* lab slide */
.slide.lab { background: linear-gradient(90deg, #fff 0 52%, var(--paper) 52%); }
.lab-tag {
  display: inline-flex; align-items: center; gap: 10px; background: var(--amber); color: var(--ink);
  font-weight: 700; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; padding: 8px 18px; border-radius: 10px; margin-bottom: 18px;
}
.nb {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 21px;
  background: var(--code-bg); color: #ffd18a; padding: 10px 18px; border-radius: 10px; text-decoration: none;
}
a.nb:hover { background: #1c2a3d; }
.checklist { list-style: none; margin: 0; padding: 0; font-size: 25px; }
.checklist li { padding: 12px 0 12px 50px; position: relative; border-bottom: 1px dashed var(--line); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 26px; height: 26px; border: 2.5px solid var(--teal); border-radius: 7px;
}
.checklist li .min { float: right; color: var(--muted); font-size: 20px; font-variant-numeric: tabular-nums; }
.checklist li.stretch::before { border-color: var(--purple); border-style: dashed; }

/* agenda */
.agenda { display: grid; gap: 8px; }
.agenda .item {
  display: grid; grid-template-columns: 1fr 130px; align-items: center; gap: 24px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 26px; font-size: 26px;
}
.agenda .item .d { text-align: right; font-size: 20px; color: var(--muted); }
.agenda .item b { color: var(--navy); }
.agenda .item small { display: block; font-size: 19px; color: var(--muted); }
.agenda .item.brk { background: transparent; border-style: dashed; padding: 5px 26px; font-size: 21px; color: var(--muted); }
.agenda .item.now { border: 2px solid var(--amber); box-shadow: 0 0 0 4px rgba(255,181,72,.18); }

/* quiz */
.quiz .opts { display: grid; gap: 14px; margin-top: 24px; }
.quiz .opt {
  background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 16px 24px; font-size: 26px; cursor: pointer;
  display: flex; gap: 18px; align-items: baseline; transition: border-color .15s, background .15s;
}
.quiz .opt::before { content: attr(data-k); font-weight: 700; color: var(--navy); }
.quiz.revealed .opt[data-ok] { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, #fff); }
.quiz.revealed .opt:not([data-ok]) { opacity: .55; }
.quiz .why { display: none; margin-top: 22px; }
.quiz.revealed .why { display: block; }

/* attention / matrix visual */
.matrix { display: grid; gap: 3px; font-size: 18px; font-family: var(--mono); }
.matrix div { aspect-ratio: 1; border-radius: 4px; display: grid; place-items: center; }
.matrix .lbl { background: none; color: var(--muted); aspect-ratio: auto; }

/* vector space figure */
.figure { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.figure svg { width: 100%; height: auto; display: block; max-height: 520px; }
.caption { font-size: 19px; color: var(--muted); margin-top: 10px; }

/* ---------- notes, help, overview ---------- */
aside.notes { display: none; }
.notes-panel {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: 34vh; overflow: auto; z-index: 20;
  background: rgba(16,24,32,.96); color: #e6edf3; font: 16px/1.5 var(--font); padding: 16px 28px; display: none;
  border-top: 3px solid var(--amber);
}
.notes-panel.on { display: block; }
.notes-panel h5 { margin: 0 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }

.help {
  position: fixed; inset: 0; z-index: 30; display: none; place-items: center; background: rgba(5,10,18,.72);
  font: 17px/1.6 var(--font); color: #fff;
}
.help.on { display: grid; }
.help .box { background: #142238; border-radius: 16px; padding: 28px 36px; min-width: 420px; }
.help h5 { margin: 0 0 14px; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.help table { border-collapse: collapse; }
.help td { padding: 4px 18px 4px 0; }
.help kbd { font: 600 14px var(--mono); background: rgba(255,255,255,.12); border-radius: 6px; padding: 2px 8px; margin-right: 4px; }

body.overview { overflow: auto; }
body.overview .deck { position: static; transform: none !important; width: auto; height: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; padding: 24px; }
body.overview .slide { display: flex; position: relative; width: 1600px; height: 900px; transform: scale(.2); transform-origin: 0 0;
  margin: 0 -1280px -720px 0; cursor: pointer; outline: 6px solid transparent; }
body.overview .slide.active { outline-color: var(--amber); }

.hint {
  position: fixed; right: 16px; bottom: 14px; z-index: 10; font: 13px var(--font); color: rgba(255,255,255,.5);
  transition: opacity .6s; pointer-events: none;
}
:fullscreen .hint { opacity: 0; }

/* ---------- print: one slide per page ---------- */
@page { size: 1600px 900px; margin: 0; }
@media print {
  body { background: none; overflow: visible; }
  .deck { position: static; transform: none !important; }
  .slide { display: flex !important; position: relative; page-break-after: always; break-after: page; }
  .notes-panel, .help, .hint, .progress { display: none !important; }
}

/* break length editor (break slides) */
.timer-edit { display: flex; gap: 14px; justify-content: center; align-items: center; font-size: 20px; color: rgba(255,255,255,.75); margin-bottom: 20px; }
.timer-edit input {
  font: 600 20px var(--mono); background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px; padding: 4px 10px; margin-left: 6px; color-scheme: dark;
}
.timer-edit input.mins { width: 70px; margin-right: 6px; text-align: center; }
.timer-edit .or { opacity: .6; }
.timer-edit .back { min-width: 150px; color: var(--amber); font-weight: 600; }

/* denser card stacks for crowded slides */
.stack.dense > * + * { margin-top: 12px; }
.stack.dense .card { font-size: 21px; padding: 16px 22px; }
