:root {
  --bg: #0a0f1c;
  --bg-2: #111a2e;
  --panel: #141e34;
  --line: #24314f;
  --fg: #e8edf7;
  --muted: #94a3c0;
  --dim: #5f6f8f;
  --cos: #4ade80;
  --cos-deep: #3d7a0a;
  --cos-logo: #3c790a; /* The green of the COS logo. */
  --net: #fbbf24;
  --blue: #60a5fa;
  --pink: #f472b6;
  --red: #f87171;
  --highlight: deeppink;
  --sans: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Doto Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --scale: 1;
}

/* On wide-gamut displays, a deeppink beyond what sRGB can show. */
@supports (color: color(display-p3 1 0 0)) {
  :root { --highlight: color(display-p3 1 0 0.6); }
}

* { box-sizing: border-box; }

/* Until the fonts arrive from Cross-Origin Storage (see index.html). */
.fonts-pending .deck { visibility: hidden; }

html, body {
  margin: 0;
  height: 100%;
  background: #05080f;
  color: var(--fg);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Stage ---------- */

/* Pin the page to the screen. The 1920×1080 stage is wider than a phone
   before it's scaled, and mobile browsers would otherwise widen the layout
   viewport to fit it, so the deck would measure the wrong size. */
body:not(.speaker) {
  position: fixed;
  inset: 0;
  touch-action: manipulation; /* No double-tap zoom delay. */
}

.deck {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  /* --rotate is 90deg only in the opt-in rotated mode on portrait phones. */
  transform: translate(-50%, -50%) rotate(var(--rotate, 0deg)) scale(var(--scale));
  transform-origin: center center;
}

.slide {
  position: absolute;
  inset: 0;
  padding: 96px 120px 88px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(74, 222, 128, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(96, 165, 250, 0.10), transparent 60%),
    var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
  overflow: hidden;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease;
}

.slide > .slide-footer {
  position: absolute;
  left: 120px;
  right: 120px;
  bottom: 34px;
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  font-size: 22px;
  letter-spacing: 0.02em;
}

.slide-footer .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slide-footer .brand img {
  width: 28px;
  height: 28px;
  background: #f3f7ee;
  border-radius: 6px;
  padding: 3px;
}

aside.notes { display: none; }

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.025em; }

h1 { font-size: 112px; line-height: 1.02; }
h2 { font-size: 72px; line-height: 1.08; margin-bottom: 48px; }
h3 { font-size: 40px; line-height: 1.2; }

p, li { font-size: 38px; line-height: 1.45; }

.kicker {
  font-family: var(--mono);
  font-size: 26px;
  color: var(--cos);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 20px;
}

.lead { font-size: 44px; color: var(--muted); line-height: 1.4; max-width: 1500px; }
.muted { color: var(--muted); }
.cos { color: var(--cos); }
.highlight { color: var(--highlight); }
.net { color: var(--net); }
.blue { color: var(--blue); }
.mono { font-family: var(--mono); }

/* Code in prose and headings is yellow; code blocks keep their syntax colors. */
code {
  font-family: var(--mono);
  color: var(--net);
  font-size: 0.86em;
  background: rgba(148, 163, 192, 0.14);
  border-radius: 8px;
  padding: 0.05em 0.3em;
}

ul.points { list-style: none; padding: 0; margin: 0; }
ul.points b { color: var(--highlight); }
ul.points li {
  position: relative;
  padding-left: 56px;
  margin-bottom: 22px;
}
ul.points li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0.55em;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--cos);
  box-shadow: 0 0 24px rgba(74, 222, 128, 0.5);
}
ul.points ul { list-style: none; padding: 0; margin: 10px 0 0; }
ul.points li li { padding-left: 40px; margin-bottom: 6px; }
ul.points li li::before {
  left: 6px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  box-shadow: none;
}

/* ---------- Fragments ---------- */

.fragment {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.fragment.visible { opacity: 1; transform: none; }

/* ---------- Title ---------- */

.title-slide { justify-content: center; }
.title-slide .logo {
  width: 168px;
  height: 168px;
  border-radius: 36px;
  background: #f3f7ee;
  padding: 22px;
  margin-bottom: 56px;
  box-shadow: 0 30px 80px rgba(74, 222, 128, 0.25);
  transform: rotate(8deg);
}
.title-slide h1 .cos {
  display: block;
  /* Same glow as the logo; `text-shadow` follows the glyphs. */
  text-shadow: 0 30px 80px rgba(74, 222, 128, 0.25);
}
.title-slide .lead { margin-top: 36px; }
.title-slide .presenter { margin-bottom: 48px; }

.presenter {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 72px;
}
.presenter img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--cos-logo);
  box-shadow: 0 16px 48px rgba(60, 121, 10, 0.35);
}
.presenter div { display: flex; flex-direction: column; gap: 6px; }
.presenter b { font-size: 38px; }
.presenter div > span { font-size: 30px; color: var(--muted); }

/* ---------- Cards ---------- */

.grid { display: grid; gap: 40px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px;
}
.card h3 { margin-bottom: 14px; }
.card p { font-size: 30px; color: var(--muted); margin: 0; }
.card .big { font-size: 76px; font-weight: 800; letter-spacing: -0.03em; }

.game-card { padding: 0; overflow: hidden; border-radius: 8px; }
.game-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.game-card .meta { padding: 28px 36px 32px; display: flex; justify-content: space-between; align-items: baseline; }
.game-card .meta b { font-size: 40px; }
.game-card .meta span { font-family: var(--mono); font-size: 24px; color: var(--muted); }

.answer {
  margin-top: 32px;
  font-size: 47px;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pill {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 26px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.pill.cos { color: var(--cos); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
.pill.net { color: var(--net); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }

.logo-card { padding: 30px 34px; }
/* Every logo in the deck sits on the same white tile. */
.logo-mark { background: #fff; padding: 7px; border-radius: 12px; }
/* These images bring their own white margin. */
.logo-mark.own-tile { padding: 0; }
/* Already solid squares of their own. */
.logo-mark.no-tile { background: none; padding: 0; border-radius: 0; }
.logo-card .logo-mark { display: block; width: 56px; height: 56px; object-fit: contain; margin-bottom: 14px; }
.logo-card p { font-size: 28px; }
.logo-card .logo-row { display: flex; gap: 18px; }
.emoji { font-family: 'Noto Color Emoji'; font-weight: 400; }
.logo-card .emoji-row { font-family: 'Noto Color Emoji'; font-size: 48px; line-height: 56px; height: 56px; letter-spacing: 8px; margin-bottom: 14px; }

/* ---------- Tables ---------- */

table.models { border-collapse: collapse; font-size: 30px; width: 100%; }
table.models td { padding: 10px 0; border-bottom: 1px solid var(--line); }
table.models td:last-child { text-align: right; font-family: var(--mono); color: var(--net); }
.models-card { padding: 30px 34px; }
.models-card h3 { margin-bottom: 12px; }
.models-card table.models { font-size: 28px; }
.models-card table.models td { padding: 6px 0; }
.models-claim { font-size: 27px !important; color: var(--fg) !important; margin: 16px 0 0 !important; line-height: 1.35; }
.models-note { font-size: 20px !important; color: var(--dim) !important; margin-top: 12px !important; line-height: 1.4; }

/* ---------- Partition diagram ---------- */

.partition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 8px;
}
.site {
  border: 2px dashed var(--line);
  border-radius: 28px;
  padding: 32px 36px;
}
.site .origin { font-family: var(--mono); font-size: 30px; color: var(--blue); margin-bottom: 24px; }
.site .file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px;
  padding: 18px 24px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-family: var(--mono);
  font-size: 26px;
}
.site .file + .file { margin-top: 14px; }
.site .file .net { font-weight: 700; }
.site .file.tracker {
  background: rgba(255, 20, 147, 0.08);
  border-color: var(--highlight);
}
.partition-why { font-size: 34px; margin: 24px 0 0; }
.partition-why + .partition-why { margin-top: 16px; }
.partition-why + .cache-key { margin-top: 20px; }
.partition-why.isolation { margin-top: 24px; }
/* The slide starts in the days of a shared cache. Once "Cache isolation
   prevents this" shows, it switches to today: the right-hand site downloads
   every file again. */
.after-isolation { display: none; }
.slide:has(.isolation.visible) .before-isolation { display: none; }
.slide:has(.isolation.visible) .after-isolation { display: inline; }
.era { font-size: 36px; color: var(--highlight); margin: -32px 0 24px; }
.site .file .from-cache { color: var(--fg); }
.cache-key {
  margin-top: 48px;
  font-size: 34px;
  color: var(--muted);
}
.cache-key b { font-family: var(--mono); font-size: 30px; color: var(--net); }

/* ---------- Code ---------- */

pre {
  margin: 0;
  background: #0d1424;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px 36px;
  font-family: var(--mono);
  font-size: 26px;
  line-height: 1.5;
  overflow: hidden;
  white-space: pre;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.code-title { font-family: var(--mono); font-size: 24px; color: var(--muted); margin-bottom: 14px; }
.code-title.prose { font-family: var(--sans); font-size: 28px; }
.code-title .mono { color: var(--net); }

.tok-c { color: #64748b; font-style: italic; }
.tok-s { color: #a5e3a1; }
.tok-k { color: #f472b6; }
.tok-n { color: #fbbf24; }
.tok-f { color: #60a5fa; }
.tok-t { color: #c4b5fd; }
.tok-hl { background: rgba(74, 222, 128, 0.16); border-radius: 6px; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.16); }

.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.code-grid pre { font-size: 23px; padding: 26px 30px; }
/* Each column stacks its blocks, so DOM order reads top to bottom per column. */
.code-stack { display: flex; flex-direction: column; gap: 32px; }

/* ---------- Flow diagram ---------- */

.flow {
  display: grid;
  grid-template-columns: 1.1fr 80px 1.1fr 80px 1.15fr;
  align-items: center;
  margin-top: 20px;
}
.flow .box {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 24px;
  padding: 28px 30px;
  font-size: 28px;
  line-height: 1.4;
}
.flow .box h3 { font-size: 32px; margin-bottom: 10px; }
.flow .box .aside { margin: 16px 0 0; font-size: inherit; line-height: inherit; color: inherit; }
/* Starts below a `.qr-corner`, so the QR code clears the top of the content. */
:is(.flow, .threats).below-qr { margin-top: 110px; }
.flow .box code { font-size: 22px; white-space: nowrap; }
/* Straight arrows share the split arrow's stroke and arrowhead. */
.flow .arrow { display: block; width: 80px; height: 40px; color: var(--dim); }
/* Two fixed rows, so the split arrow's SVG coordinates (branches at y = 112
   and 360 of 472) meet each box at its center. Taller boxes need both the
   row height here and the SVG's coordinates updated. */
.flow .branches { display: grid; grid-template-rows: 224px 224px; gap: 24px; }
/* A split arrow: a stem that forks to Hit (up) and Miss (down). One SVG, so
   the parts share a coordinate system and no seams show when the slide
   scales. Each branch is its own fragment. */
.flow .split { display: block; width: 80px; height: 472px; color: var(--dim); }
.flow :is(.arrow, .split) path { fill: none; stroke: currentColor; stroke-width: 4; }
.flow :is(.arrow, .split) polygon { fill: currentColor; }
.flow .split .fragment { transform: none; }
.flow .box.hit { border-color: rgba(74, 222, 128, 0.5); background: rgba(74, 222, 128, 0.07); }
.flow .box.miss { border-color: rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.06); }
.flow .box.hit h3 { color: var(--cos); }
.flow .box.miss h3 { color: var(--net); }

/* ---------- Demo setup ---------- */

.origins {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 12px;
}
.origins .card { text-align: center; }
.origins .card .mono { font-size: 30px; color: var(--blue); margin-top: 10px; }
.origins .shared {
  text-align: center;
  font-family: var(--mono);
  font-size: 26px;
  color: var(--cos);
}
.origins .shared .big { font-size: 64px; font-weight: 800; font-family: var(--sans); }

/* ---------- Demo ---------- */

.demo-slide { padding: 40px 48px 56px; }
.demo-head {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
}
.demo-head h2 { font-size: 54px; margin: 0; white-space: nowrap; }
/* The kicker sits above the heading without widening the header row, so
   the buttons and QR code keep their room. */
.demo-head { margin-top: 34px; }
.demo-title { position: relative; }
.demo-title .kicker { position: absolute; left: 0; bottom: 100%; margin-bottom: 4px; white-space: nowrap; }
.demo-head > * { white-space: nowrap; flex: none; }
.demo-head .spacer { flex: 1; }
.demo-head .spacer { flex: 1; }
.demo-head .allow { font-family: var(--mono); font-size: 22px; color: var(--muted); }
.demo-head .allow.code { color: var(--net); }
.demo-head .allow.prose { font-family: var(--sans); }
.demo-head .allow.prose code { font-family: var(--mono); }

.btn {
  font: inherit;
  font-size: 24px;
  font-weight: 700;
  color: var(--bg);
  background: var(--fg);
  border: 0;
  border-radius: 14px;
  padding: 12px 26px;
  cursor: pointer;
}
.btn:hover { filter: brightness(0.9); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.go { background: var(--cos); }
.btn:disabled { opacity: 0.4; cursor: default; }

.cos-status { font-size: 22px; }

.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; flex: 1; min-height: 0; }

.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.browserbar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 58px;
  padding: 0 14px 0 20px;
  background: #1a2540;
  border-bottom: 1px solid var(--line);
}
.browserbar .dots { display: flex; gap: 8px; }
.browserbar .dots i { width: 13px; height: 13px; border-radius: 50%; background: #3a4766; display: block; }
.browserbar .url {
  flex: 1;
  display: flex;
  align-items: center;
  height: 38px;
  border-radius: 10px;
  background: #0d1424;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 20px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}
.browserbar select {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.browserbar select option { background: #0d1424; color: var(--fg); }
/* The origin, shown as text offline and as a dropdown live. */
.browserbar .url .host, .browserbar .url select { color: var(--highlight); }
.browserbar .url .path { color: var(--dim); }
.browserbar .btn { font-size: 19px; padding: 8px 16px; border-radius: 10px; }

.viewport {
  position: relative;
  height: 330px;
  flex: none;
  background: #000;
}
.viewport iframe, .viewport img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.viewport img { object-fit: cover; opacity: 0.35; filter: grayscale(0.5); }
.viewport .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  font-size: 26px;
  color: var(--fg);
  text-shadow: 0 2px 12px #000;
}

.dt-head {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 54px;
  flex: none;
  padding: 0 20px;
  background: #1a2540;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 21px;
}
.dt-head .label { font-weight: 700; color: var(--muted); }
.dt-head .stat { margin-left: auto; font-weight: 700; font-size: 22px; }
.dt-head .stat.cos { color: var(--cos); }
.dt-head .stat.net { color: var(--net); }
.dt-head .stat.disk { color: var(--blue); }

.devtools { position: relative; flex: 1; min-height: 0; background: #1e1e1e; }
.dt-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 28px 48px;
  font-size: 24px;
  line-height: 1.45;
  color: var(--muted);
  background: repeating-linear-gradient(135deg, #131b2e, #131b2e 18px, #111829 18px, #111829 36px);
}
.dt-placeholder b { color: var(--fg); font-size: 27px; }

/* ---------- Privacy ---------- */

.threats { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.threats .card h3 { font-size: 34px; }
.threats .card p { font-size: 27px; }
.threats .card .tag { font-family: var(--mono); font-size: 22px; color: var(--cos); margin-bottom: 12px; display: block; }

/* ---------- Adopters ---------- */

.adopters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.adopters .card { padding: 30px 28px; }
.adopters .card code { white-space: nowrap; }
.adopters .card b { font-size: 36px; display: block; margin-bottom: 8px; }
.adopters .card .logo-mark { display: block; width: 56px; height: 56px; object-fit: contain; margin-bottom: 16px; }
.adopters .card span { font-size: 24px; color: var(--muted); }
.adopters .card .state { font-family: var(--mono); font-size: 20px; margin-top: 14px; display: inline-block; }
.adopters .card .state.cos { color: var(--cos); }
.adopters .card .state.net { color: var(--net); }
.adopters .card .state.partner { color: var(--blue); }

/* ---------- Pixel font (loaded via COS) ---------- */

.pixel { font-family: 'Doto', var(--sans); letter-spacing: 0; font-weight: 900; }
.pixel.cos, .pixel .cos { color: var(--cos-logo); }
.title-slide h1 .pixel { font-size: 112px; line-height: 1.1; margin-top: 10px; }
.demo-head h2.pixel { font-size: 54px; line-height: 1.1; }
.font-note { position: absolute; left: 120px; bottom: 44px; font-family: var(--sans); font-size: 24px; color: var(--fg); margin: 0; }

/* ---------- QR codes ---------- */

.qr { margin: 0; text-align: center; }
.qr a { display: block; line-height: 0; }
.qr svg { width: 100%; height: auto; background: #fff; border-radius: 4px; display: block; }
.qr svg path, .qr svg rect[fill="black"] { fill: #0b1220; }
/* Every QR code is captioned with its URL, in green. */
.qr > div { font-family: var(--mono); font-size: 20px; color: var(--cos); margin-top: 10px; line-height: 1.3; }

.used-by { display: flex; align-items: center; gap: 16px; margin: 48px 0 0; font-size: 32px; color: var(--muted); }
.used-by img { width: 48px; height: 48px; }
.used-by b { color: var(--fg); }
.qr-corner { position: absolute; right: 120px; top: 96px; width: 220px; }
.qr-corner.low { top: auto; bottom: 110px; }
/* Scaled from its bottom-right corner into the free space above the
   header, so it reads larger without changing the row's height. The left
   margin matches the extra width, so it clears its neighbor. */
.qr-inline { width: 92px; flex: none; transform: scale(1.5); transform-origin: right bottom; margin-left: 46px; }
.qr-inline svg { border-radius: 2px; }
/* One line, right-aligned, so a longer URL grows left into the free space. */
.qr-inline > div { font-size: 13px; margin-top: 4px; white-space: nowrap; display: flex; justify-content: flex-end; }

/* The title slide's logo tile, tilted, in the top-right corner. */
.corner-logo {
  position: absolute;
  right: 150px;
  top: 84px;
  width: 150px;
  height: 150px;
  border-radius: 32px;
  background: #f3f7ee;
  padding: 20px;
  box-shadow: 0 30px 80px rgba(74, 222, 128, 0.25);
  transform: rotate(8deg);
}
.corner-logo.low { top: auto; bottom: 120px; }
.qr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px; margin-top: 12px; }
.qr-grid figure { margin: 0; }
.qr-grid.two { grid-template-columns: repeat(2, 480px); justify-content: center; gap: 120px; margin-top: 8px; }
.qr-grid.two figure > a, .qr-grid.two figure > div { max-width: 240px; }
.qr-grid figure > a, .qr-grid figure > div { max-width: 300px; margin-left: auto; margin-right: auto; }
.qr-grid figcaption { font-size: 30px; font-weight: 700; text-align: center; margin-top: 18px; line-height: 1.3; }
.qr-grid .qr > div { font-size: 19px; color: var(--cos); word-break: break-all; }
/* Logos above each caption, saying at a glance what the code leads to. */
.qr-grid .qr-icons { display: flex; justify-content: center; align-items: center; gap: 14px; height: 64px; margin-bottom: 14px; }
.qr-grid .qr-icons img { width: 56px; height: 56px; object-fit: contain; }
.qr-grid .qr-icons .emoji { font-family: 'Noto Color Emoji'; font-size: 52px; line-height: 1; font-weight: 400; }
.qr-grid .qr-icons .badged { position: relative; display: inline-flex; }
.qr-grid .qr-icons .badge { position: absolute; right: -10px; bottom: -6px; width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.qr-grid .qr-icons img.awesome { width: auto; height: 40px; }
.qr-grid figcaption { display: flex; flex-direction: column; align-items: center; }

.thanks-slide { justify-content: center; }
.thanks { display: grid; grid-template-columns: 1fr 520px; gap: 100px; align-items: center; }
.thanks h1 { margin-bottom: 36px; }
/* Like the title slide: a regular line, then the green Doto line with its glow. */
.thanks h1 .pixel {
  display: block;
  margin-top: 10px;
  line-height: 1.1;
  text-shadow: 0 30px 80px rgba(74, 222, 128, 0.25);
}

/* ---------- Appendix: everything the deck loads from COS ---------- */

.resources { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.resources h2 { margin-bottom: 32px; }
.resources table { border-collapse: collapse; width: 100%; font-size: 23px; }
.resources td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.resources td code { font-size: 20px; }
.resources td.size { text-align: right; font-family: var(--mono); color: var(--net); white-space: nowrap; padding-left: 16px; }
.resources .group th { text-align: left; font-size: 19px; font-weight: 600; color: var(--muted); padding: 18px 0 6px; }
.resources .group:first-child th { padding-top: 0; }
.resources .group th code { font-size: 17px; }
.phl { color: var(--dim); }
.phl.on { color: var(--cos); }
.resources td.phl { width: 40px; text-align: right; font-size: 20px; }
.resources-legend { font-size: 22px; color: var(--muted); margin: 24px 0 0; line-height: 1.5; }
.resources-legend b { color: var(--fg); font-weight: 600; }
.qr-big { width: 520px; }
.qr-big > div { font-size: 22px; }

.pill.small { font-size: 18px; padding: 3px 12px; margin-left: 10px; vertical-align: 2px; }

/* ---------- Single-page demos ---------- */

.panes.single { grid-template-columns: 1fr; }
.pane.side {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  grid-template-rows: 58px 54px 1fr;
  grid-template-areas: "bar bar" "vp head" "vp dt";
}
.pane.side .browserbar { grid-area: bar; }
.pane.side .viewport { grid-area: vp; height: auto; border-right: 1px solid var(--line); }
.pane.side .dt-head { grid-area: head; border-top: 0; }
.pane.side .devtools { grid-area: dt; }

/* A demo pane with the code that enables COS underneath it. */
.code-demo { display: grid; grid-template-rows: 1fr auto; gap: 22px; flex: 1; min-height: 0; }
.code-demo .pane.side { min-height: 0; }
.demo-code { font-size: 21px; padding: 20px 28px; }

.devtools-frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  /* Zoomed so the audience can read it. */
  width: calc(100% / 1.25);
  height: calc(100% / 1.25);
  transform: scale(1.25);
  transform-origin: 0 0;
  background: #202124;
}

/* ---------- Chrome around the stage ---------- */

.progress {
  position: fixed;
  left: 0;
  bottom: 0;
  width: var(--progress, 0);
  height: 4px;
  background: var(--cos);
  transition: width 0.3s ease, height 0.3s ease;
  z-index: 10;
}

/* Touch screens only (phones, tablets): desktops have the keyboard. Swiping
   is the main way to navigate, so the buttons stay small and out of the way. */
.navbtns { display: none; }
.navbtns [hidden] { display: none !important; }
@media (pointer: coarse) {
  .navbtns {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    display: flex;
    gap: 6px;
    z-index: 10;
    opacity: 0.45;
  }
}
.navbtns button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--fg);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.navbtns svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The rotate toggle only makes sense in portrait. */
@media not ((pointer: coarse) and (orientation: portrait)) {
  .navbtns .rotate { display: none; }
}

/* Rotated mode: the slide's bottom edge runs down the left of the screen,
   so the progress bar follows it there. The controls sit in the empty strip
   below the slide, at its bottom-right corner, turned with it: reading in
   the slide's frame, a column right of the slide with → at the bottom. */
.rotated .navbtns {
  right: auto;
  left: max(8px, env(safe-area-inset-left));
  flex-direction: row-reverse;
}
.rotated .navbtns button { transform: rotate(90deg); }
.rotated .progress {
  top: 0;
  bottom: auto;
  width: 4px;
  height: var(--progress, 0);
}

.notice {
  position: fixed;
  left: 12px;
  right: 12px;
  top: max(12px, env(safe-area-inset-top));
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg);
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
.notice[hidden] { display: none; }
.notice span { flex: 1; }
.notice b { color: var(--cos); }
.notice button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: var(--fg);
  color: var(--bg);
  white-space: nowrap;
}
.notice .dismiss { background: transparent; color: var(--muted); padding: 8px; }

/* ---------- Speaker view ---------- */

body.speaker { overflow: auto; background: var(--bg); }
body.speaker .deck, body.speaker .navbtns, body.speaker .progress, body.speaker .notice { display: none; }
.speaker-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding: 28px;
  height: 100vh;
  font-size: 20px;
}
.speaker-view header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 24px;
}
.speaker-view .timer { font-family: var(--mono); font-size: 56px; font-weight: 700; }
.speaker-view .timer.over { color: var(--red); }
.speaker-view .count { font-family: var(--mono); font-size: 28px; color: var(--muted); }
.speaker-view .now, .speaker-view .next {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 28px;
  overflow: auto;
}
.speaker-view h4 { margin: 0 0 12px; font-size: 18px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.speaker-view .title { font-size: 34px; font-weight: 800; margin-bottom: 18px; }
.speaker-view .notes-body { font-size: 26px; line-height: 1.5; }
.speaker-view .notes-body p, .speaker-view .notes-body li { font-size: 26px; }
.speaker-view .budget { color: var(--cos); font-family: var(--mono); font-size: 22px; }

.speaker-view .cos-dogfood { font-family: var(--mono); font-size: 20px; color: var(--cos); }
.speaker-view .offline-badge {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--bg);
  background: var(--net);
  border-radius: 10px;
  padding: 6px 14px;
}
