/* GPU Kernel Optimization 101 — shared rules. Palette: paper #FAF8F2 / #F0ECE1, ink #1A2333, body #454F5E,
   muted #5C6676, blue #1F5FA8, orange #C9631A, hairline #DDD7C9. Scale: 96 / 56 / 36 / 28 / 24. */
body { font-family: 'IBM Plex Sans', Arial, sans-serif; color: #454F5E; }
section { background: #FAF8F2; padding: 128px 128px 160px; display: flex; flex-direction: column; counter-increment: page; font-size: 28px; line-height: 1.4; color: #454F5E; }
section.c::after { content: counter(page); position: absolute; right: 128px; bottom: 64px; font-size: 24px; line-height: 1.2; color: #5C6676; }

/* type */
h1 { font-family: 'Source Serif 4', Georgia, serif; font-size: 96px; font-weight: 600; line-height: 1.06; letter-spacing: -1.5px; color: #1A2333; }
h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 56px; font-weight: 600; line-height: 1.1; letter-spacing: -0.5px; color: #1A2333; }
h3 { font-family: 'IBM Plex Sans', Arial, sans-serif; font-size: 28px; font-weight: 600; line-height: 1.25; color: #1A2333; }
p { font-size: 28px; }
.eyebrow { font-size: 24px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: #1F5FA8; line-height: 1.3; }
.head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; }
.lead { font-family: 'Source Serif 4', Georgia, serif; font-size: 36px; line-height: 1.3; color: #1A2333; }
.sm { font-size: 24px; line-height: 1.4; }
.mute { color: #5C6676; }
.ink { color: #1A2333; }
.blue { color: #1F5FA8; }
.orange { color: #A8480F; }
.b6 { font-weight: 600; }
.center { text-align: center; }
ul, ol { font-size: 28px; line-height: 1.4; padding-left: 36px; }
li { margin-top: 10px; margin-bottom: 10px; }
ul.sm, ol.sm { font-size: 24px; }
.source { position: absolute; left: 128px; bottom: 64px; width: 1500px; font-size: 24px; line-height: 1.2; color: #5C6676; white-space: nowrap; }

/* layout */
.row { display: flex; gap: 48px; }
.col { display: flex; flex-direction: column; gap: 24px; }
.f1 { flex: 1; }
.f2 { flex: 2; }
.f3 { flex: 3; }
.fill { flex: 1; min-height: 0; }
.mid { align-items: center; }
.end { align-items: flex-end; }
.g12 { gap: 12px; }
.g16 { gap: 16px; }
.g24 { gap: 24px; }
.g32 { gap: 32px; }
.g64 { gap: 64px; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.host { position: relative; flex-shrink: 0; }

/* surfaces */
.card { background: #FFFEFB; border: 1px solid #DDD7C9; border-radius: 12px; padding: 28px 32px; display: flex; flex-direction: column; gap: 12px; }
.card.tight { padding: 20px 24px; gap: 8px; }
.panel { background: #F0ECE1; border-radius: 12px; padding: 28px 32px; display: flex; flex-direction: column; gap: 12px; }
.note { background: #EAF1F9; border: 1px solid #C3D5EA; border-radius: 12px; padding: 24px 32px; display: flex; flex-direction: column; gap: 8px; }
.note .t, .warn .t { color: #1A2333; }
.warn { background: #FBEEE3; border: 1px solid #EBCDB2; border-radius: 12px; padding: 24px 32px; display: flex; flex-direction: column; gap: 8px; }
.code { font-family: 'JetBrains Mono', 'Courier New', monospace; font-size: 24px; line-height: 1.5; background: #F0ECE1; border: 1px solid #DDD7C9; border-radius: 10px; padding: 24px 28px; color: #1A2333; white-space: nowrap; }
.code .k { color: #1F5FA8; font-weight: 700; }
.code .m { color: #5C6676; }
.code .o { color: #A8480F; font-weight: 700; }
.mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }
.pill { display: inline-block; align-self: flex-start; font-size: 24px; font-weight: 600; line-height: 1.2; padding: 8px 18px; border-radius: 999px; background: #E3ECF7; color: #174A85; white-space: nowrap; }
.pill.o { background: #F8E3D2; color: #8A3A0A; }
.pill.n { background: #E9E5DA; color: #454F5E; }
.pill.d { background: #1A2333; color: #FAF8F2; }
.pills { display: flex; gap: 12px; flex-wrap: wrap; }
.big { font-family: 'Source Serif 4', Georgia, serif; font-size: 96px; font-weight: 600; line-height: 1; letter-spacing: -2px; color: #1F5FA8; }
.big.o { color: #C9631A; }
.big.k { color: #1A2333; }
hr { border-top: 1px solid #DDD7C9; }

/* tables */
table { width: 100%; font-size: 24px; line-height: 1.35; color: #454F5E; }
th { font-weight: 600; color: #1A2333; text-align: left; }
tr.h { background: #F0ECE1; }
tr.hl { background: #EAF1F9; }

/* diagram primitives: pinned boxes inside a .host */
.bx { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font-size: 24px; line-height: 1.25; font-weight: 600; color: #1A2333; background: #FFFEFB; border: 2px solid #1A2333; border-radius: 10px; padding: 6px 12px; }
.bx.blue { background: #E3ECF7; border-color: #1F5FA8; color: #133D6E; }
.bx.orange { background: #F8E3D2; border-color: #C9631A; color: #7A3208; }
.bx.soft { background: #F0ECE1; border-color: #B9B19F; }
.bx.dark { background: #1A2333; border-color: #1A2333; color: #FAF8F2; }
.bx.ghost { background: transparent; border: 2px dashed #8A93A1; color: #454F5E; }
.bx.plain { background: transparent; border: none; padding: 0; }
.lb { position: absolute; font-size: 24px; line-height: 1.25; color: #454F5E; }
.lb.b { font-weight: 600; color: #1A2333; }
.lb.r { text-align: right; }
.lb.cn { text-align: center; }
.lb.blue { color: #1F5FA8; }
.lb.orange { color: #A8480F; }
.lb.mono { font-size: 24px; }

/* bar charts */
.bars { display: flex; align-items: flex-end; gap: 40px; border-bottom: 2px solid #1A2333; }
.barcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; flex: 1; }
.bar { width: 100%; background: #1F5FA8; border-radius: 6px 6px 0 0; }
.bar.o { background: #C9631A; }
.bar.n { background: #B9B19F; }
.barval { font-size: 28px; font-weight: 600; color: #1A2333; line-height: 1.2; text-align: center; }
.barlabels { display: flex; gap: 40px; margin-top: 12px; }
.barlabels p { flex: 1; text-align: center; font-size: 24px; line-height: 1.25; color: #454F5E; }
.hbar { height: 36px; background: #1F5FA8; border-radius: 0 6px 6px 0; }
.hbar.o { background: #C9631A; }
.hbar.n { background: #B9B19F; }

/* slide kinds */
section.cover { background: #FAF8F2; padding: 128px; }
section.divider { background: #F0ECE1; padding: 128px; }
section.divider .num { font-family: 'Source Serif 4', Georgia, serif; font-size: 96px; font-weight: 600; line-height: 1; color: #1F5FA8; }
section.statement { background: #1F4E8C; color: #E6EEF8; padding: 128px; justify-content: center; }
section.statement h2 { color: #FAF8F2; font-size: 96px; line-height: 1.08; letter-spacing: -1.5px; }
section.statement .eyebrow { color: #BCD2EC; }
section.statement .lead { color: #E6EEF8; }

/* motion: finished look is the plain rule; these play on arrival */
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes fadein { from { opacity: 0; } }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
.rise { animation: rise 0.5s ease-out both; animation-delay: calc(var(--i, 0) * 110ms); }
.fade { animation: fadein 0.6s ease-out both; animation-delay: calc(var(--i, 0) * 110ms); }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
.fragment { opacity: 0; transition: opacity 0.4s ease-out; }
.fragment.visible { opacity: 1; }

/* horizontal measured bars: label | track | value */
.hrow { display: flex; align-items: center; gap: 20px; }
.hrow .hl { width: 300px; font-size: 24px; line-height: 1.25; color: #1A2333; font-weight: 600; text-align: right; }
.hrow .hv { font-size: 28px; font-weight: 600; color: #1A2333; white-space: nowrap; }
.axis { border-left: 2px solid #1A2333; display: flex; flex-direction: column; gap: 22px; padding: 14px 0; }
.partno { font-size: 24px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: #1F5FA8; line-height: 1.2; }
