/* IDSW 2026 deck — layered on top of the reveal.js "white" theme. */
:root {
	--r-main-font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--r-heading-font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--r-code-font: ui-monospace, 'SF Mono', Menlo, monospace;
	--r-main-font-size: 34px;
	--r-heading-text-transform: none;
	--r-heading-font-weight: 700;
	--r-heading-letter-spacing: -0.01em;
	--r-main-color: #1b1b1f;
	--r-heading-color: #111;
	--r-link-color: #0d7f78;
	--r-link-color-hover: #0a5d58;
	--accent: #0d7f78;
	--accent-soft: #e2f3f1;
	--bad: #c2410c;
	--bad-soft: #fdeee6;
	--muted: #6b6b73;
	--line: #e4e4e7;
}

.reveal-viewport {
	background: #fcfcfb;
}

.reveal h1 { font-size: 2.2em; }
.reveal h2 { font-size: 1.5em; }
.reveal h3 { font-size: 1.1em; }
.reveal p, .reveal li { line-height: 1.4; }
.reveal .muted { color: var(--muted); }
.reveal .accent { color: var(--accent); }
.reveal .bad { color: var(--bad); }
.reveal .small { font-size: 0.7em; }
.reveal .tiny { font-size: 0.5em; }
.reveal .kicker {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.5em;
	font-weight: 600;
	color: var(--accent);
	margin-bottom: 0.4em;
}
.reveal .big { font-size: 2.6em; font-weight: 800; line-height: 1.05; }
.reveal .huge { font-size: 4em; font-weight: 800; line-height: 1; }

.reveal ul, .reveal ol { display: block; text-align: left; }
.reveal .left { text-align: left; }

/* Section dividers */
.reveal section.divider h2 { font-size: 2.2em; }
.reveal section.divider .kicker { font-size: 0.6em; }

/* Two-column grid */
.reveal .cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.2em 2em;
	align-items: start;
	text-align: left;
}
.reveal .cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Cards */
.reveal .card {
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 0.6em 0.8em;
	background: #fff;
	text-align: left;
	font-size: 0.75em;
}
.reveal .card h3 { margin: 0 0 0.3em; font-size: 1.15em; }
.reveal .card p { margin: 0; }
.reveal .card.hl { border-color: var(--accent); background: var(--accent-soft); }
.reveal .card.warn { border-color: var(--bad); background: var(--bad-soft); }

/* Tables */
.reveal table { font-size: 0.6em; margin: 0 auto; border-collapse: collapse; }
.reveal table th, .reveal table td { padding: 0.35em 0.8em; border-bottom: 1px solid var(--line); text-align: left; }
.reveal table th { color: var(--muted); font-weight: 600; }
.reveal table td.num, .reveal table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Quotes */
.reveal blockquote {
	width: 85%;
	background: none;
	box-shadow: none;
	border-left: 6px solid var(--accent);
	padding: 0.2em 0.9em;
	text-align: left;
	font-style: normal;
}
.reveal blockquote cite { display: block; margin-top: 0.6em; font-size: 0.55em; color: var(--muted); font-style: normal; }

/* Placeholders for memes / images to drop in later */
.reveal .placeholder {
	border: 3px dashed #c9c9cf;
	border-radius: 16px;
	color: var(--muted);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-size: 0.6em;
	padding: 1em;
	min-height: 220px;
	background: repeating-linear-gradient(45deg, #fafafa 0 12px, #f3f3f4 12px 24px);
}

/* Rendering pipeline flow */
.reveal .flow {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35em;
	font-size: 0.68em;
	align-items: center;
}
.reveal .flow .step {
	border: 2px solid var(--accent);
	background: var(--accent-soft);
	border-radius: 10px;
	padding: 0.45em 0.7em;
	font-weight: 600;
}
.reveal .flow .arrow { color: var(--muted); font-size: 1.4em; }
.reveal .flow-desc { font-size: 0.8em; margin-top: 1.4em; min-height: 3.5em; text-align: center; }

/* Big before → after numbers */
.reveal .metric {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.5em;
	font-variant-numeric: tabular-nums;
}
.reveal .metric .from { font-size: 2.6em; font-weight: 800; color: var(--bad); }
.reveal .metric .to { font-size: 3.6em; font-weight: 800; color: var(--accent); }
.reveal .metric .arrow { font-size: 2em; color: var(--muted); }
.reveal .metric .unit { font-size: 0.8em; color: var(--muted); }

/* Diagram slides: the web component fills the slide */
.reveal section.diagram { padding: 0; }
.reveal section.diagram h2 { font-size: 0.9em; margin: 0 0 0.3em; }
.reveal section.diagram .hint { font-size: 0.4em; color: var(--muted); margin-top: 0.3em; }

.reveal img.figure { max-height: 600px; margin: 0; }
.reveal .video { width: 1100px; height: 560px; border: 0; border-radius: 12px; }

.reveal pre { width: 100%; font-size: 0.55em; box-shadow: none; border-radius: 10px; }
.reveal pre code { max-height: 560px; padding: 0.8em 1em; }

.reveal .pill {
	display: inline-block;
	border-radius: 999px;
	padding: 0.1em 0.7em;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.6em;
	font-weight: 600;
	margin: 0.15em;
}
.reveal .pill.bad { background: var(--bad-soft); color: var(--bad); }

/* Reveal centers slides using their height at layout time, which is 0 for a
   web component that hasn't laid out yet. Pin diagram slides instead. */
.reveal .slides > section.diagram {
	top: 10px !important;
	height: 700px;
}

/* Browser icons: change --icon-size to resize every icon at once */
.reveal { --icon-size: 56px; }
.reveal table td.icons { vertical-align: middle; white-space: nowrap; }
.reveal table td, .reveal table th { vertical-align: middle; }
.reveal img.icon {
	width: var(--icon-size);
	height: var(--icon-size);
	object-fit: contain;
	margin: 0 0.25em 0 0;
	vertical-align: middle;
}

/* Side-by-side screenshots with a caption above */
.reveal figure.clip { margin: 0; }
.reveal figure.clip figcaption { font-size: 0.5em; line-height: 1.3; margin-bottom: 0.5em; text-align: left; }
.reveal figure.clip img { display: block; width: 100%; height: auto; margin: 0; border-radius: 8px; }

/* Recorded clips: fill the 1280×720 slide (sized in slide px, not vh, since Reveal scales the slide) */
.reveal p.video-title { margin: 0 0 0.3em; }
.reveal video.clip-video { display: block; margin: 0 auto; width: auto; height: 640px; max-width: 100%; border-radius: 8px; }

/* Game logos: same box for every logo, whatever its shape */
.reveal { --game-logo: 220px; }
.reveal figure.game { margin: 0; text-align: center; }
.reveal figure.game img { width: var(--game-logo); height: var(--game-logo); object-fit: contain; margin: 0 auto; display: block; }
.reveal figure.game figcaption { font-size: 0.55em; margin-top: 0.4em; }

/* Bali map slide: full-bleed map, card over the empty ocean bottom-left */
.reveal section.bali { height: 100%; }
.reveal .bali-card { position: absolute; left: 0; bottom: 70px; text-align: left; background: rgba(255,255,255,0.88); padding: 0.6em 0.9em; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,0.15); }
.reveal .bali-card h2 { margin: 0.1em 0; }
.reveal .bali-card p { margin: 0; }
.reveal .bali-credit { position: absolute; right: 0; bottom: 0; margin: 0; font-size: 0.4em; color: #333; background: rgba(255,255,255,0.8); padding: 0.15em 0.5em; border-radius: 6px; }

/* Event cards (2025 / 2026 / 2027): same-size image on top of each card */
.reveal .card .event-img { display: block; width: 100%; height: 260px; object-fit: contain; margin: 0 0 0.4em; border-radius: 8px; background: rgba(0,0,0,0.04); }
.reveal .card .event-unknown { display: flex; align-items: center; justify-content: center; font-size: 3em; font-weight: 700; color: rgba(0,0,0,0.25); border: 2px dashed rgba(0,0,0,0.15); box-sizing: border-box; }

/* "Why survive?" posters: four same-size portrait posters in a row */
.reveal .cols.posters { grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: start; }
.reveal figure.poster { margin: 0; text-align: center; }
.reveal figure.poster img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: top; margin: 0; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.reveal figure.poster figcaption { font-size: 0.55em; line-height: 1.3; margin-top: 0.5em; }

/* Inline meme image above content (e.g. Krabby Patty / Chum Bucket) */
.reveal img.meme-img { display: block; height: 300px; width: auto; margin: 0.2em auto 0.4em; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); }

/* Refactor drill-downs: real before/after code, matching colors per group */
.reveal section.refactor h2 { margin: 0 0 0.35em; font-size: 1.2em; }
.reveal section.refactor h2 code { font-size: 0.95em; }
.reveal .code-cols { gap: 24px; grid-template-columns: 1fr 1fr; }
.reveal .code-label { font-size: 0.45em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.3em; }
.reveal pre.code { margin: 0; font-size: 15px; line-height: 1.45; background: #f6f6f4; border: 1px solid var(--line); border-radius: 10px; }
.reveal pre.code .src { display: block; padding: 12px 16px; white-space: pre; overflow: hidden; font-family: var(--r-code-font); color: #1b1b1f; }
.reveal pre.code .g1 { background: #dbeafe; color: #1e40af; border-radius: 3px; }
.reveal pre.code .g2 { background: #ede9fe; color: #6d28d9; border-radius: 3px; }
.reveal pre.code .g3 { background: #ffedd5; color: #c2410c; border-radius: 3px; }
.reveal pre.code .dead { color: #9a9aa2; text-decoration: line-through; }
.reveal .dead-inline { color: #9a9aa2; text-decoration: line-through; font-family: var(--r-code-font); }
.reveal section.refactor > p.small { margin-top: 0.6em; }
/* Folders slide */
.reveal .folder-cols { grid-template-columns: 1.6fr 1fr; gap: 28px; }
.reveal .file-wall { display: flex; flex-wrap: wrap; gap: 3px 5px; font-family: var(--r-code-font); font-size: 13px; line-height: 1.25; padding: 10px; background: #f6f6f4; border: 1px solid var(--line); border-radius: 10px; }
.reveal .file-wall span { background: #fff; border: 1px solid #e4e4e7; border-radius: 4px; padding: 2px 5px; color: #555; }
.reveal ul.domains { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 14px; font-family: var(--r-code-font); font-size: 15px; }
.reveal ul.domains li { display: flex; justify-content: space-between; break-inside: avoid; padding: 5px 10px; margin: 0 0 5px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.reveal ul.domains li.pipe { border-color: var(--accent); background: var(--accent-soft); }
.reveal ul.domains li b { color: var(--muted); font-weight: 600; }

/* Layout tree: class → data */
.reveal .lt-cols { gap: 20px; }
.reveal svg.lt { width: 100%; height: auto; display: block; font-family: var(--r-main-font); }
.reveal svg.lt .fence { fill: #fff8f4; stroke: var(--bad); stroke-width: 2; stroke-dasharray: 7 5; }
.reveal svg.lt .arr { fill: #f4fbfa; stroke: var(--accent); stroke-width: 2; }
.reveal svg.lt .obj { fill: var(--bad-soft); stroke: var(--bad); stroke-width: 1.5; }
.reveal svg.lt .dom { fill: #f1f1f3; stroke: #a1a1aa; stroke-width: 1.2; }
.reveal svg.lt .cell { fill: #fff; stroke: #c9c9cf; stroke-width: 1.2; }
.reveal svg.lt .kind { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.reveal svg.lt .lbl { font-size: 14px; font-weight: 600; fill: #1b1b1f; }
.reveal svg.lt .idx { font-size: 13px; fill: var(--muted); font-family: var(--r-code-font); }
.reveal svg.lt .mono { font-size: 13px; fill: #1b1b1f; font-family: var(--r-code-font); }
.reveal svg.lt .note { font-size: 13px; fill: var(--muted); }
.reveal svg.lt .note.bad { fill: var(--bad); font-weight: 600; font-family: var(--r-code-font); }
.reveal svg.lt .note.good { fill: var(--accent); font-weight: 600; font-family: var(--r-code-font); }
.reveal svg.lt .lane { font-size: 15px; font-weight: 600; fill: var(--muted); }
.reveal svg.lt .ptr { fill: none; stroke: var(--bad); stroke-width: 2; marker-start: url(#lt-ab); marker-end: url(#lt-ab); }
.reveal svg.lt .domptr { fill: none; stroke: #8a8a92; stroke-width: 1.3; stroke-dasharray: 4 4; marker-end: url(#lt-ag); }
.reveal svg.lt .link { fill: none; stroke: var(--accent); stroke-width: 2; marker-end: url(#lt-aa); }
.reveal .lt-cap { font-size: 0.45em; color: var(--muted); margin: 0.3em 0 0; text-align: left; }
.reveal .lt-cap code { font-size: 0.95em; }
.reveal .lt-bottom { margin-top: 0.25em; }
.reveal .lt-bottom .lt-cap { color: #1b1b1f; font-size: 0.5em; margin-bottom: 0.3em; }
.reveal svg.lt .win { fill: var(--accent); }
.reveal svg.lt .win-t { font-size: 17px; font-weight: 700; fill: #fff; }

/* Three rules slide */
.reveal .rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.reveal .card.rule { padding: 14px 16px; font-size: 0.5em; display: flex; flex-direction: column; gap: 8px; }
.reveal .card.rule h3 { font-size: 1.35em; margin: 0; }
.reveal .card.rule .rule-why, .reveal .card.rule .rule-gain { margin: 0; line-height: 1.35; }
.reveal .card.rule .rule-gain { color: var(--accent); font-weight: 600; margin-top: auto; }
.reveal .card.rule pre.code { font-size: 14px; width: 100%; box-shadow: none; }
.reveal .card.rule pre.code .muted { color: #9a9aa2; }
.reveal .rule-test { font-size: 0.55em; margin-top: 0.8em; text-align: left; }
.reveal .rule-src { margin-top: 0.3em; text-align: left; }

/* Two surprises slide */
.reveal .rules.rules-2 { grid-template-columns: repeat(2, 1fr); }
.reveal .card.rule .code-label { font-size: 0.8em; margin: 2px 0 -4px; }
.reveal .card.rule .rule-num { margin: 0; font-weight: 700; font-size: 1.1em; }
.reveal .card.rule .rule-num .bad { color: var(--bad); }
.reveal .card.rule .rule-num .accent { color: var(--accent); }
.reveal .rule-num .num-lbl { display: inline-block; min-width: 4.2em; font-size: 0.7em; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.reveal .card.rule .rule-why.muted { color: var(--muted); }

/* Thank-you slide: wording left, photo right */
.reveal .cols.thanks { grid-template-columns: 1.3fr 1fr; align-items: center; }
.reveal .cols.thanks h1 { margin-top: 0; }
.reveal .thanks-photo { width: 100%; max-height: 520px; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.15); margin: 0; }

/* Layout tree slide: before/after timeline */
.reveal svg.lt .frz { fill: var(--bad-soft); stroke: var(--bad); stroke-width: 1.5; }
.reveal svg.lt .lose { fill: var(--bad); }
.reveal svg.lt .sep { stroke: #d4d4d8; stroke-width: 1; stroke-dasharray: 4 4; }
.reveal svg.lt .lane.bad { fill: var(--bad); }
.reveal svg.lt .lane.good { fill: var(--accent); }
.reveal svg.lt.lt-hand { width: 96%; margin: 0 auto; }
