:root {
  --ink: #171717;
  --paper: #FAF7F0;
  --panel: #F0EBDF;
  --line: #D9D1C1;
  --mute: #6B665C;
  --accent: #C93A1B;
  --log: #0B6E6E;
  --sans: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
}

html, body { background: var(--paper); }

.reveal {
  font-family: var(--sans);
  font-size: 28px;
  color: var(--ink);
  line-height: 1.3;
}
.reveal .slides { text-align: left; }
.reveal .slides > section { height: 100%; padding: 8px 18px; box-sizing: border-box; }

.reveal h1, .reveal h2, .reveal h3 { font-family: var(--sans); font-weight: 700; color: inherit; letter-spacing: -0.015em; }
.reveal h1 { font-size: 84px; line-height: 1.05; }
.reveal h2 { font-size: 56px; line-height: 1.1; margin-bottom: 28px; }
.reveal h3 { font-size: 36px; margin-bottom: 6px; }
.reveal p { margin: 0 0 14px; }
.reveal a { color: var(--log); }

.accent { color: var(--accent); font-weight: 600; }
.log { color: var(--log); font-weight: 600; }
.big-line { font-size: 37px; font-weight: 500; margin-top: 18px !important; }
.note-line { font-size: 28px; color: var(--mute); margin-top: 14px !important; }
.callout { border-left: 6px solid var(--accent); padding: 8px 18px; background: var(--panel); margin-top: 18px !important; font-size: 29px; }

/* title and dividers */
.reveal .title-slide, .reveal .divider { color: #fff; display: flex !important; flex-direction: column; justify-content: center; }
.reveal .slides > section.title-slide, .reveal .slides > section.divider { height: 100%; }
.kicker { font-size: 24px; letter-spacing: 0.12em; text-transform: uppercase; opacity: .75; }
.sub { font-size: 34px; opacity: .9; max-width: 1050px; }
.by { font-size: 26px; opacity: .7; margin-top: 30px !important; }
.divider h2 { font-size: 70px; margin: 0; }
.divider code { font-family: var(--mono); }

/* code */
.reveal pre {
  position: relative; box-sizing: border-box; width: 100%; margin: 0 0 14px; box-shadow: none; font-family: var(--mono); font-size: 27px; line-height: 1.38;
  background: var(--panel); border-radius: 8px;
}
.reveal pre.mid { font-size: 23.5px; }
.reveal pre.m22 { font-size: 22px; }
.reveal pre.small { font-size: 20px; }
.reveal pre code.fragment { position: absolute; top: 0; left: 0; width: 100%; box-sizing: border-box; background: var(--panel); }
.reveal pre code.fragment:not(.visible) { visibility: hidden; }
.reveal pre code { display: block; box-sizing: border-box; background: transparent; padding: 16px 20px; max-height: 560px; font-family: var(--mono); color: var(--ink); line-height: 1.38; }
.reveal code { font-family: var(--mono); font-size: .9em; }
.reveal .hljs { background: transparent; color: var(--ink); }
.reveal .hljs-keyword, .reveal .hljs-built_in, .reveal .hljs-literal { color: #A32C12; font-weight: 600; }
.reveal .hljs-string, .reveal .hljs-attr { color: #0B6E6E; }
.reveal .hljs-symbol, .reveal .hljs-number { color: #6B3FA0; }
.reveal .hljs-comment { color: #736D61; font-style: italic; }
.reveal .hljs-title { color: var(--ink); font-weight: 700; }
.reveal .hljs.has-highlights tr:not(.highlight-line) { opacity: .28; }
.reveal .hljs-ln-numbers { display: none; }
.reveal .hljs-ln-code { padding: 0 !important; }
.reveal pre.err {
  background: #2A1512; color: #FFD9CF; padding: 14px 20px; font-size: 24px; white-space: pre-wrap;
}

/* lists */
.reveal ul.plain, .reveal ol.plain { list-style: none; margin: 8px 0 0; padding: 0; }
.reveal ul.plain li, .reveal ol.plain li { padding: 8px 0 8px 28px; position: relative; font-size: 31px; }
.reveal ul.plain li::before { content: ""; position: absolute; left: 0; top: 24px; width: 11px; height: 11px; background: var(--accent); }
.reveal .large li { font-size: 36px !important; }
.reveal ul.large li::before { top: 28px; }
.reveal ul.plain.nested > li { padding: 5px 0 5px 28px; font-size: 30px; }
.reveal ul.plain.nested > li::before { top: 19px; }
.reveal ul.plain.nested ul { list-style: none; margin: 2px 0 0; padding: 0; }
.reveal ul.plain.nested ul li { position: relative; padding: 1px 0 1px 26px; font-size: 25px; color: var(--mute); }
.reveal ul.plain.nested ul li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; background: var(--mute); }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 10px; }
.three pre { height: calc(100% - 50px); margin: 0; }
.reveal .step-head { font-size: 26px; font-weight: 600; margin: 0 0 8px; }
.reveal ol.steps { counter-reset: s; }
.reveal ol.steps li { counter-increment: s; padding-left: 50px; }
.reveal ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; font-weight: 700; color: var(--mute); }

/* stats */
.stats { display: flex; gap: 60px; margin: 10px 0 24px; }
.stats b { display: block; font-size: 76px; line-height: 1.1; letter-spacing: -0.02em; }
.stats span { font-size: 27px; color: var(--mute); }

/* flows */
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 30px 0 16px; }
.flow i { font-style: normal; font-size: 30px; color: var(--mute); }
.box { border: 2px solid var(--ink); border-radius: 8px; padding: 13px 13px; font-family: var(--mono); font-size: 20px; background: #fff; }
.box.stack { box-shadow: 6px 6px 0 var(--line), 12px 12px 0 var(--mute); margin-right: 12px; }
.box.hot { background: var(--accent); border-color: var(--accent); color: #fff; }
.box.hot-log { background: var(--log); border-color: var(--log); color: #fff; }
.flow-under { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.flow-under span { background: var(--panel); border: 1px dashed var(--mute); padding: 8px 14px; border-radius: 6px; font-family: var(--mono); font-size: 24px; }

/* tables */
.reveal table.compact { border-collapse: collapse; width: 100%; font-size: 30px; margin: 0; }
.reveal table.compact th { text-align: left; font-size: 21px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); border-bottom: 3px solid var(--ink); padding: 8px 14px 8px 0; font-weight: 600; }
.reveal table.compact td { border-bottom: 1px solid var(--line); padding: 12px 14px 12px 0; vertical-align: top; }
.reveal table.compact small { color: var(--mute); font-size: .78em; }

/* cards */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.two.tight { margin-top: 2px; }
.two.tight .card { padding: 10px 18px; }
.two.tight .card p { margin: 0; }
.two.code pre { font-size: 22px; height: 100%; margin: 0; }
.card { border: 2px solid var(--line); border-radius: 10px; padding: 18px 22px; background: #fff; }
.card ul { margin: 8px 0 0 24px; }
.card li { font-size: 30px; margin: 3px 0; }
.card p { font-size: 29px; margin-bottom: 8px; }
.log-card { border-color: var(--log); border-top-width: 8px; }
.hot-card { border-color: var(--accent); border-top-width: 8px; }
.card .num { font-size: 54px; font-weight: 700; line-height: 1.1; margin: 4px 0 8px; }

/* architecture */
.arch { width: 100%; height: 500px; display: block; }
.arch .n { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.arch .n.hl { fill: var(--log); stroke: var(--log); }
.arch .srv { fill: var(--panel); stroke: var(--line); stroke-width: 2; }
.arch .db { fill: #E8E1D2; stroke: var(--mute); stroke-width: 2; }
.arch text { font-family: var(--sans); text-anchor: middle; fill: var(--ink); }
.arch .t { font-size: 28px; font-weight: 700; }
.arch .s { font-size: 21px; fill: var(--mute); }
.arch .s2 { font-size: 23px; font-weight: 600; }
.arch .w { fill: #fff; }
.arch .c { font-size: 20px; fill: var(--mute); }
.arch .l { stroke: var(--ink); stroke-width: 2.5; marker-end: url(#a); }

/* replay */
.replay { display: grid; grid-template-columns: 5fr 6fr; gap: 28px; align-items: start; margin-top: 6px; }
.reveal pre.plain { padding: 18px 20px; font-size: 27px; line-height: 2.05; margin: 0; }
.reveal .fragment.hl { opacity: 1; visibility: visible; border-radius: 4px; padding: 3px 6px; }
.reveal .fragment.hl.current-fragment { background: var(--log); color: #fff; }
.reveal ol.events { list-style: none; margin: 0; padding: 0; border-left: 5px solid var(--log); }
.reveal ol.events li { font-size: 27px; padding: 10px 14px; margin-bottom: 8px; background: #fff; border: 1px solid var(--line); border-left: none; }
.reveal ol.events li.res { background: #E4F0EE; }
.reveal ol.events li.crash { background: var(--accent); color: #fff; font-weight: 600; }
.reveal ol.events li.hl-ev { background: #E4F0EE; }

/* quotes */
.pull { font-size: 48px; line-height: 1.26; font-weight: 500; margin: 86px 0 22px; width: auto; box-shadow: none; padding: 0; text-align: left; font-style: normal; background: none; border: none; }
.cite { font-size: 24px; color: var(--mute); }
.reveal blockquote { width: 100%; }

.hs { background: var(--ink); color: #fff; padding: 20px 26px; border-radius: 8px; font-size: 28px; margin-bottom: 14px; }
.hs code { font-size: 1em; }
.cel-ex { background: var(--ink); color: #fff; padding: 16px 22px; border-radius: 8px; margin-bottom: 8px; font-size: 29px; }

.layers { display: grid; gap: 9px; }
.layers div { display: grid; grid-template-columns: 1fr; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--log); padding: 7px 16px; font-size: 27px; }
.layers span { color: var(--mute); }
.layers.quad { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; height: 520px; }
.layers.quad div { align-content: start; gap: 6px; padding: 14px 22px; font-size: 30px; }
.layers.quad b { font-size: 32px; }
.reveal .layers.quad ul { margin: 0; padding: 0; list-style: none; color: var(--mute); font-size: 27px; }
.reveal .layers.quad li { position: relative; padding-left: 22px; margin: 2px 0; }
.reveal .layers.quad li::before { content: ""; position: absolute; left: 0; top: 14px; width: 9px; height: 9px; background: var(--log); }

.passes { display: flex; gap: 8px; margin-bottom: 14px; }
.passes span { background: var(--accent); color: #fff; padding: 6px 15px; border-radius: 6px; font-size: 24px; font-weight: 600; }

.stack-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack-layers div { background: #fff; border: 2px solid var(--line); border-radius: 8px; padding: 12px 18px; }
.stack-layers b { display: block; font-size: 33px; }
.stack-layers span { color: var(--mute); font-size: 27px; }

.plan { display: grid; gap: 8px; font-size: 29px; }
.plan .row { display: grid; grid-template-columns: 360px 150px 1fr; align-items: center; padding: 10px 16px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.plan .row span { font-family: var(--mono); font-size: 27px; }
.plan .row em { font-style: normal; font-weight: 600; }
.plan .done em { color: var(--log); }
.plan .run { background: var(--log); color: #fff; border-color: var(--log); }
.plan .wait { color: var(--mute); }

.reveal .progress { color: var(--accent); height: 5px; }
.reveal .slide-number { background: transparent; color: var(--mute); font-size: 16px; }
.reveal .slides > section[data-background-color] ~ .slide-number { color: #fff; }

@media print {
  .reveal .fragment { opacity: 1 !important; visibility: visible !important; }
}

.reveal table + pre { margin-top: 20px; }
.reveal ol.steps + p { margin-top: 14px; }
.title-slide .sub { margin-top: 14px; }

/* query/update gap timeline */
.gap-tl { display: grid; grid-template-columns: 1fr 1.6fr 1fr; column-gap: 0; row-gap: 14px; margin: 6px 0 10px; }
.gap-tl .st { background: #fff; border: 2px solid var(--line); padding: 12px 16px; font-size: 22px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.gap-tl .st b { display: block; font-size: 28px; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 600; margin-top: 4px; }
.gap-tl .st.gap { background: repeating-linear-gradient(135deg, #FBE9E4 0 12px, #fff 12px 24px); border: 3px dashed var(--accent); color: var(--accent); }
.gap-tl .hits { display: grid; gap: 10px; }
.gap-tl .hit { border-left: 6px solid; padding: 8px 14px; background: #fff; font-size: 26px; }
.gap-tl .hit b { font-weight: 700; }
.gap-tl .hit span { display: block; font-size: 22px; color: var(--mute); margin-top: 2px; }
.gap-tl .hit.ok { border-color: var(--log); } .gap-tl .hit.ok b { color: var(--log); }
.gap-tl .hit.bad { border-color: var(--accent); } .gap-tl .hit.bad b { color: var(--accent); }

/* three goals */
.goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 8px; }
.reveal .goals .card { padding: 14px 18px; border-top: 8px solid var(--accent); }
.reveal .goals h3 { font-size: 30px; margin: 0 0 6px; }
.reveal .goals ul { list-style: none; margin: 0; padding: 0; }
.reveal .goals li { position: relative; padding: 4px 0 4px 20px; font-size: 25px; color: var(--mute); margin: 0; }
.reveal .goals li::before { content: ""; position: absolute; left: 0; top: 16px; width: 8px; height: 8px; background: var(--accent); }
.reveal table.goals-m td { font-size: 25px; color: var(--mute); }
.reveal table.goals-m td:first-child { font-size: 27px; color: var(--ink); font-weight: 600; width: 26%; }
.reveal table.goals-m td.no { color: var(--line); }
.plan.wide .row { grid-template-columns: 430px 150px 1fr; }

/* how hard to show */
.viz { display: grid; gap: 10px; }
.viz .lvl { display: grid; grid-template-columns: 1fr 190px; align-items: center; gap: 20px; background: #fff; border: 1px solid var(--line); border-left: 8px solid var(--log); padding: 10px 18px; }
.viz .lvl.out { border-left-color: var(--accent); }
.viz .lvl b { display: block; font-size: 30px; }
.viz .lvl span { display: block; font-size: 23px; color: var(--mute); }
.viz .lvl span code { font-size: .95em; }
.viz .m { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; height: 26px; }
.viz .m u { display: block; background: var(--log); border-radius: 3px; text-decoration: none; }
.viz .lvl.out .m u { background: var(--accent); }
.reveal img.shot { display: block; max-width: 100%; max-height: 580px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; }
.reveal .slides > section.center-shot { display: flex !important; align-items: center; justify-content: center; }
.reveal section.center-shot img { max-width: 100%; max-height: 640px; margin: 0; }

/* DRUG logo joke */
.drug { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; color: #fff; }
.drug .big { font-size: 104px; font-weight: 800; line-height: .74; letter-spacing: -0.02em; }
.drug .mid { display: flex; flex-direction: column; justify-content: space-between; height: 77px; margin: 0 4px; }
.drug .mid span { font-size: 34px; font-weight: 700; line-height: 1; }
.drug .ruby { color: #E0533D; }
.drug .rust { color: #DEA584; }
