/*
 * Slides theme: University of Stuttgart corporate design (2016 manual),
 * adapted for projection:
 *   - Anthrazit and Mittelblau only; Hellblau and the blue gradient are not
 *     used because they wash out on beamers.
 *   - Concourse (MB Type) instead of Univers, if installed in local/fonts.css
 *     (licensed); otherwise the open Source Sans 3 and Source Serif 4.
 *   - The circle is the recurring motif: title and section circles, bullets,
 *     arrow start dots, the dot in front of the view ID.
 *   - Boxes have rounded corners (--k-radius): images, videos, figures,
 *     captions, marks, table headers, and any panel a talk adds.
 *
 * Layouts: <section data-layout="...">
 *   title | agenda | part | subsection | content (default) | quote | image | web | end
 *
 * Parts: Mittelblau and Anthrazit are the neutral base. Inside part n the
 * accent becomes --k-part-n (a modern, tinted palette below), so every slide
 * shows which part it belongs to. Mittelblau stays available as .blue.
 */

@import url("../../framework/fonts/open.css");

:root {
  /* House colors (CD manual 2.5) and their 20 % tints. */
  --us-anthrazit: #3e444c;
  --us-anthrazit-80: #656970;
  --us-anthrazit-60: #8b8f94;
  --us-anthrazit-40: #b2b4b7;
  --us-anthrazit-20: #d8dadb;
  --us-blau: #004191;
  --us-blau-80: #3367a7;
  --us-blau-60: #668dbd;
  --us-blau-40: #99b3d3;
  --us-blau-20: #ccd9e9;

  /* Part palette: dark enough for white text and for beamers. A talk can
     override these in its talk.css. */
  --k-part-1: #00707a;  /* petrol */
  --k-part-2: #7b3a6e;  /* plum */
  --k-part-3: #b0541c;  /* burnt orange */
  --k-part-4: #4c7a2c;  /* moss */

  /* Institute logo, beside the university logo on the title slide and top
     right on the end slide. Deliberately not set here (a value here would
     hide one from local/style.css, which loads before the theme): set
       --us-institute-logo: url("…");   a white logo for dark ground; a
                                        relative url() resolves against this
                                        theme folder, e.g. "../../local/logos/x.svg"
       --us-institute-aspect: 2.27;     its width / height
     in local/style.css (every talk) or a talk's talk.css. Without them, only
     the university logo shows. */

  /* Tokens read by the engine and by talk-level CSS. */
  --k-bg: #fff;
  --k-fg: var(--us-anthrazit);
  --k-accent: var(--us-blau);
  --k-muted: var(--us-anthrazit-80);
  --k-letterbox: #000;
  /* Each stack names the licensed font first (declared in local/fonts.css,
     if installed), then the framework's "Slides Symbols" (only Greek, arrows,
     maths and shapes: so glyphs the licensed font lacks look the same with or
     without the substitute), then the open substitute
     (framework/fonts/open.css), and ends with the framework's fallback; code
     uses the framework's "Slides Mono". */
  --k-font-body: "Concourse T4", "Slides Symbols", "Source Sans 3", var(--k-font-fallback);
  --k-font-head: "Concourse T4", "Slides Symbols", "Source Sans 3", var(--k-font-fallback);
  --k-font-tab: "Concourse T4 Tab", "Slides Symbols", "Source Sans 3", var(--k-font-fallback);
  --k-font-quote: "Equity", "Slides Symbols", "Source Serif 4", var(--k-font-fallback);
  --k-pad-x: 120px;
  --k-pad-top: 72px;
  --k-pad-bottom: 120px;
  --k-t-step: 0.4s;
  --k-t-camera: 0.8s;
  --k-radius: 18px;     /* corner radius of every box */
  /* Components (see "Components" below). */
  --k-card: #fff;           /* background of cards, diagram nodes, badges */
  --k-warn: #e8a33d;        /* amber: files, code, results, cautions */
  --k-warn-20: #fde7c7;
  --k-warn-10: #fff7ea;
  --k-warn-dark: #c77a12;
  --k-alert: #c62828;       /* red: "today", forbidden, errors */
  --k-term-bg: #1f2937;     /* terminal card */
  --k-term-fg: #e5e7eb;
  --k-term-prompt: #86efac;
}

/* The part's colour replaces the accent on its scenes and in the chrome. */
[data-part="1"] { --k-accent: var(--k-part-1); }
[data-part="2"] { --k-accent: var(--k-part-2); }
[data-part="3"] { --k-accent: var(--k-part-3); }
[data-part="4"] { --k-accent: var(--k-part-4); }

/* Tints of the current accent, for backgrounds and quiet lines. */
.k-scene, .k-chrome, .k-ag-part {
  --k-accent-60: color-mix(in srgb, var(--k-accent) 60%, #fff);
  --k-accent-40: color-mix(in srgb, var(--k-accent) 40%, #fff);
  --k-accent-20: color-mix(in srgb, var(--k-accent) 20%, #fff);
}

/* ---------- Base typography ------------------------------------------------ */

.k-scene {
  font: 400 38px/1.38 var(--k-font-body);
  color: var(--k-fg);
  background: var(--k-bg);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}

.k-track {
  padding: var(--k-pad-top) var(--k-pad-x) var(--k-pad-bottom);
}

/* Balanced content: <main class="slides balance"> (every content slide of the
   talk) or <section class="balance"> (one slide). What follows the title no
   longer hangs under it but sits in the free height between the title and the
   bottom of the text area, a little above the middle, so a short slide does
   not leave its lower half empty. <section class="top"> keeps one slide as
   before, and a bibliography (<k-references>) always starts at the top. Two empty flex items share the free height above and below the
   content; placed (.at), bottom-line and footnote elements are not affected. */
:is(main.balance .k-scene[data-layout="content"]:not(.continuous, .top, :has(k-references)), .k-scene.balance[data-layout="content"]:not(.continuous)) > .k-track {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 100%;
  padding-bottom: calc(var(--k-pad-bottom) + var(--k-refs-h, 0px));
}
:is(main.balance .k-scene[data-layout="content"]:not(.continuous, .top, :has(k-references)), .k-scene.balance[data-layout="content"]:not(.continuous)) > .k-track {
  & > * { order: 2; flex: none; }
  & > :is(h2, .sub, .kicker) { order: 0; }
  & > :is(img, video) { align-self: flex-start; }
  &::before { content: ""; order: 1; flex: 2 0 0px; }
  &::after { content: ""; order: 3; flex: 3 0 0px; }
  /* room for a bottom line at the foot of the text area */
  &:has(> .bottomline:not(.inline))::after,
  &:has(> .callout:not(:has(~ :not(.notes, k-arrow, k-mark, .k-popup-backdrop))))::after { flex-basis: 110px; }
}

.k-scene h1, .k-scene h2, .k-scene h3 {
  font-family: var(--k-font-head);
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
.k-scene h1 { font-size: 84px; }
.k-scene h2 { font-size: 60px; margin-bottom: 0.9em; }
.k-scene h3 { font-size: 42px; margin: 0.8em 0 0.4em; }
/* Subtitle: a second-level heading, e.g. for each new thought on a continuous
   slide whose sticky h2 stays on top: <h3 class="subtitle">…</h3>. */
.k-scene h3.subtitle { font-size: 46px; color: var(--k-accent); margin: 0 0 0.5em; }
/* A subtitle stays as close to the title as before (h2 margin 54 px − 48 px). */
.k-scene h2 + .sub { margin-top: -1.2em; }
.k-scene .sub {
  font-size: 40px;
  color: var(--k-accent);
  margin: 0 0 1.2em;
}

.k-scene p { margin: 0 0 0.6em; }
.k-scene strong, .k-scene b { font-weight: 700; }
.k-scene a { color: var(--k-accent); }
.k-scene small, .k-scene .small { font-size: 30px; }

/* Label above a title, e.g. "Part 2": caps, slightly spaced. */
.kicker {
  font: 700 26px/1.2 var(--k-font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--k-accent);
  margin: 0 0 0.6em;
}

.hl { color: var(--k-accent); }
.blue { color: var(--us-blau); }
.k-scene code { font-size: 0.8em; white-space: nowrap; }
.muted { color: var(--k-muted); }
.dim { opacity: 0.3; }
.tab { font-family: var(--k-font-tab); font-variant-numeric: tabular-nums; }

/* Bullets are small Mittelblau circles. */
.k-scene ul {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6em;
}
.k-scene ul li {
  position: relative;
  padding-left: 1.05em;
  margin: 0 0 0.4em;
}
.k-scene ul li::before {
  content: "";
  position: absolute;
  left: 0.12em;
  top: 0.5em;
  width: 0.36em;
  height: 0.36em;
  border-radius: 50%;
  background: var(--k-accent);
}
.k-scene ul ul { margin: 0.3em 0 0; font-size: 0.85em; }
.k-scene ul ul li::before {
  background: none;
  border: 3px solid var(--k-accent);
  box-sizing: border-box;
}
.k-scene ol { margin: 0 0 0.6em; padding-left: 1.3em; }
.k-scene ol li { margin: 0 0 0.4em; }
.k-scene ol li::marker { color: var(--k-accent); font-weight: 700; }

/* Tables (CD manual: Mittelblau header, quiet rows). */
.k-scene table {
  border-collapse: collapse;
  font-family: var(--k-font-tab);
  font-variant-numeric: tabular-nums;
  font-size: 32px;
}
.k-scene th {
  background: var(--k-accent);
  color: #fff;
  text-align: left;
  font-weight: 700;
}
.k-scene th, .k-scene td { padding: 0.35em 0.8em; }
.k-scene tr:first-child > th:first-child { border-top-left-radius: calc(var(--k-radius) * 0.6); }
.k-scene tr:first-child > th:last-child { border-top-right-radius: calc(var(--k-radius) * 0.6); }
.k-scene td { border-bottom: 2px solid var(--us-anthrazit-20); }

/* Figures and media. */
.k-scene figure { margin: 0; }
.k-scene figcaption { font-size: 26px; color: var(--k-muted); margin-top: 0.4em; }
.k-scene img, .k-scene video { max-width: 100%; }
/* Images, videos and inlined figures are boxes too: rounded corners.
   class="square" keeps sharp corners. */
.k-scene :is(img, video, iframe, k-svg, k-youtube) { border-radius: var(--k-radius); }
.k-scene .square { border-radius: 0; }
/* <k-pdf>: pages on a quiet grey desk, with a soft shadow each. */
.k-scene k-pdf { border-radius: var(--k-radius); background: var(--us-anthrazit-20); padding: 0 32px; box-sizing: border-box; }
.k-scene .k-pdf-sheet { padding: 32px 0; }
.k-scene .k-pdf-page { box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18); background: #fff; }
/* Text beside a rolling PDF: <div class="cols with-pdf"><div>…</div><k-pdf …></k-pdf></div>. */
.k-scene .cols.with-pdf { grid-template-columns: 1fr 680px; gap: 70px; align-items: start; }
.k-scene .cols.with-pdf > k-pdf { height: 780px; margin-top: -20px; }
/* The whole slide as the desk: <k-pdf class="full"> on a continuous slide with a
   sticky title. The pages roll under the frosted title and footer; the first
   page starts below the title, the last ends above the footer. style="--pdf-w:
   1200" sets the page width (default 1440). */
.k-scene k-pdf.full { position: absolute; inset: 0; height: auto; border-radius: 0;
  padding: 0 calc((100% - var(--pdf-w, 1440) * 1px) / 2); }  /* pages --pdf-w px wide, centred */
.k-scene k-pdf.full .k-pdf-sheet { padding: calc(var(--k-sticky-h, 0) * 1px + 32px) 0 calc(88px + 32px); }

/* The player inside <k-youtube> follows its box (square when full-bleed). */
.k-scene k-youtube > :is(iframe, .k-iframe-ph) { border-radius: 0; }
.k-scene .circle-img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }

/* Math. */
.k-scene mjx-container[display="true"] { margin: 0.5em 0 !important; }
.eq { font-size: 1.2em; }
/* Highlighted equation: <div class="eq box">$$…$$</div> sets it on a light
   grey panel (neutral, so it does not compete with the part colour). */
.k-scene .eq.box {
  width: fit-content;
  padding: 6px 36px;
  border-radius: var(--k-radius);
  background: color-mix(in srgb, var(--us-anthrazit-20) 55%, #fff);
}
.k-scene .eq.box mjx-container[display="true"] { margin: 0.5em 0 !important; }

/* Bottom line of a slide: <p class="bottomline">…</p>, a tinted box with an
   arrow, centred, its bottom edge on the bottom of the text area (above the
   footnotes). .left / .right: under the left or right column instead, so a
   picture in the other column keeps its height. .inline: in the flow of the
   content (e.g. below a figure in a column). Edit mode's --w sets its width. */
.k-scene .bottomline {
  position: absolute; left: 50%; bottom: calc(var(--k-pad-bottom) + var(--k-refs-h, 0px)); transform: translateX(-50%);
  margin: 0; max-width: 1500px; width: max-content; padding: 18px 40px 18px 88px; text-align: left;
  border-radius: var(--k-radius); background: var(--k-accent-20); color: var(--k-fg); font-weight: 400;
}
.k-scene .bottomline[style*="--w:"] { width: calc(var(--w) * 1px); max-width: none; box-sizing: border-box; }
.k-scene .bottomline.left { left: var(--k-pad-x); transform: none; }
.k-scene .bottomline.right { left: auto; right: var(--k-pad-x); transform: none; }
.k-scene .bottomline.inline { position: relative; left: 0; bottom: auto; transform: none; margin-top: 0.6em; }
.k-scene .bottomline::before { content: "→"; color: var(--k-accent); font-weight: 700; position: absolute; left: 40px; }

/* Notes scattered around a central figure or equation. */
.note {
  font-size: 30px;
  line-height: 1.3;
  color: var(--k-muted);
  max-width: 520px;
}
.note strong { color: var(--k-accent); }

/* Clipping: a small screenshot (headline, paper title, comment) on a card,
   placed freely and pointed at with <k-arrow>:
     <figure class="clip at" id="c1" style="--x: 1500; --y: 300">
       <img src="media/headline.png" alt="…"><figcaption>Source, date</figcaption>
     </figure>
   480 px wide; --w (also set by edit mode) changes the width. */
.k-scene .clip {
  width: calc(var(--w, 480) * 1px);
  box-sizing: border-box;
  padding: 10px;
  background: #fff;
  border-radius: var(--k-radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
  z-index: 2;
}
.k-scene .clip img { display: block; width: 100%; border-radius: calc(var(--k-radius) - 8px); }
.k-scene .clip figcaption { font-size: 18px; line-height: 1.2; margin: 8px 2px 0; }

/* Simple grids. */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.cols.c3 { grid-template-columns: 1fr 1fr 1fr; gap: 60px; }
.center { text-align: center; }
.fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Decorative circles: <div class="k-circle" style="--d: 400; left: ...; top: ..."> */
.k-circle {
  position: absolute;
  width: calc(var(--d, 300) * 1px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--k-accent);
  pointer-events: none;
}
.k-circle.dark { background: var(--k-fg); }
.k-circle.light { background: var(--us-blau-20); }
.k-circle.outline { background: none; border: 4px solid var(--k-accent); box-sizing: border-box; }

/* ---------- Step effects --------------------------------------------------- */

[data-anim="rise"].k-future { transform: translateY(30px); }
[data-anim="grow"].k-future { transform: scale(0.92); }
[data-anim="none"] { transition: none; }

/* ---------- Arrows and marks ---------------------------------------------- */

.k-arrow-line {
  fill: none;
  stroke: var(--k-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1 1.01;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s ease;
}
.k-arrow-head {
  fill: none;
  stroke: var(--k-accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s ease 0.45s;
}
.k-arrow-dot {
  fill: var(--k-accent);
  transition: opacity 0.2s ease 0.45s;
}
k-arrow.k-future .k-arrow-line, k-arrow.k-gone .k-arrow-line { stroke-dashoffset: 1; }
k-arrow.k-future .k-arrow-head, k-arrow.k-gone .k-arrow-head { opacity: 0; transition-delay: 0s; }
k-arrow.k-future, k-arrow.k-gone { opacity: 1; }
k-arrow.muted .k-arrow-line { stroke: var(--us-anthrazit-60); }
k-arrow.muted .k-arrow-dot { fill: var(--us-anthrazit-60); }
k-arrow.muted .k-arrow-head { stroke: var(--us-anthrazit-60); }
k-arrow.dark .k-arrow-line { stroke: var(--k-fg); }
k-arrow.dark .k-arrow-dot { fill: var(--k-fg); }
k-arrow.dark .k-arrow-head { stroke: var(--k-fg); }
k-arrow.dashed .k-arrow-line { stroke-dasharray: 0.012 0.012; transition: opacity 0.4s; }
/* Round dots; arrows.js sets their spacing. */
k-arrow.dotted .k-arrow-line { stroke-width: 6; transition: opacity 0.4s; }
k-arrow.light .k-arrow-line { stroke: var(--us-anthrazit-40); }
k-arrow.light .k-arrow-dot { fill: var(--us-anthrazit-40); }
k-arrow.light .k-arrow-head { stroke: var(--us-anthrazit-40); }

/* Drawn on top of the target, so it must be translucent: the accent at 14 %
   gives roughly its 20 % tint on white and keeps the formula readable. */
.k-mark-rect {
  fill: color-mix(in srgb, var(--k-accent) 14%, transparent);
  rx: calc(var(--k-radius) * 0.6);
  transition: opacity 0.3s ease 0.3s;
}
k-arrow, k-mark { z-index: 0; }

/* ---------- Chrome: footer line and view ID ------------------------------ */

.k-footer {
  position: absolute;
  left: var(--k-pad-x);
  bottom: 36px;
  font: 400 22px/1 var(--k-font-body);
  color: var(--k-muted);
}
.k-footer .k-sep { margin: 0 0.5em; color: var(--k-accent); }
.k-id {
  position: absolute;
  right: 56px;
  bottom: 32px;
  font: 700 26px/1 var(--k-font-tab);
  font-variant-numeric: tabular-nums;
  color: var(--k-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.k-id::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--k-accent);
}
.k-chrome.k-no-footer .k-footer { display: none; }
/* No footer line on title, agenda, part and closing pages. */
.k-canvas:is([data-layout="title"], [data-layout="agenda"], [data-layout="part"], [data-layout="subsection"], [data-layout="end"]) .k-footer { display: none; }
/* Title, part and closing pages carry no view ID. */
.k-canvas:is([data-layout="title"], [data-layout="part"], [data-layout="subsection"], [data-layout="end"]) .k-id { display: none; }
.k-canvas[data-layout="part"] .k-chrome,
.k-canvas[data-layout="subsection"] .k-chrome,
.k-canvas[data-layout="end"] .k-chrome { --k-muted: rgba(255, 255, 255, 0.8); --k-accent: #fff; }
.k-canvas[data-layout="image"] .k-footer,
.k-canvas[data-layout="quote"] .k-footer { display: none; }
/* Over a full-bleed image or video the view ID sits on a small frosted pill. */
.k-canvas[data-layout="image"] .k-id {
  right: 40px; bottom: 20px; padding: 12px 16px; border-radius: 99px;
  background: color-mix(in srgb, var(--k-bg) 72%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.k-canvas[data-layout="title"] .k-chrome { --k-muted: rgba(255, 255, 255, 0.8); --k-accent: #fff; }

/* ---------- Continuous scenes ---------------------------------------------- */

/* The sticky title is frosted glass: content sliding underneath stays faintly
   visible, blurred, so the audience sees that the sheet moves. */
.k-scene.k-continuous > .sticky {
  padding: var(--k-pad-top) var(--k-pad-x) 0;
  background: color-mix(in srgb, var(--k-bg) 68%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
}
.k-scene.k-continuous > .sticky h2, .k-scene.k-continuous > h2.sticky { margin-bottom: 0.3em; }
.k-scene.k-continuous > h2.sticky { font-size: 60px; padding-bottom: 0.3em; }
.k-scene.k-continuous .k-track { padding-top: calc(var(--k-sticky-h, 0) * 1px + 24px); }
.k-scene.k-continuous:not(:has(> .sticky)) .k-track { padding-top: var(--k-pad-top); }
/* Paged sheet: each .page reaches from below the sticky title to the bottom
   edge of the slide, so the next page never peeks in; every page starts at
   the track padding (sticky + 24), where the first one does. */
.k-scene.k-continuous.paged .page {
  box-sizing: border-box;
  min-height: calc(var(--k-h) * 1px - var(--k-sticky-h, 0) * 1px - 24px);
  padding-bottom: 24px;
}
/* The footer zone is frosted glass too, like the sticky title: the sheet
   slides underneath it. It grows to hold the reference footnotes. */
.k-scene.k-continuous::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(88px + var(--k-refs-h, 0px));
  background: color-mix(in srgb, var(--k-bg) 68%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  pointer-events: none;
  z-index: 1;
}

/* Firefox does not blur through backdrop-filter inside the scaled canvas:
   there the frosted title and footer zone are nearly opaque instead. */
@supports (-moz-appearance: none) {
  .k-scene.k-continuous > .sticky, .k-scene.k-continuous::after { background: color-mix(in srgb, var(--k-bg) 94%, transparent); }
}
/* class="continuous plain": no glass. The sticky title and the footer zone
   have no backdrop, so the sheet stays sharp behind them; for sheets whose
   screens are laid out like ordinary slides and keep those zones free. */
.k-scene.k-continuous.plain > .sticky {
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.k-scene.k-continuous.plain::after { content: none; }

/* ---------- Components ------------------------------------------------------ */

/* Line glyph: an inline SVG icon (viewBox 0 0 24 24, strokes only) in the
   accent colour, as large as the text around it. .fill parts are filled. */
svg.glyph {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  overflow: visible;
  fill: none;
  stroke: var(--k-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.glyph .fill { fill: var(--k-accent); stroke: none; }
/* A heading (or any line) with a glyph in front: glyph and text centred. */
.with-glyph { display: flex; align-items: center; gap: 0.35em; }
/* A glyph before the slide title: class glyph-title on the slide and the
   icon as --k-glyph: url("data:image/svg+xml,…") (black strokes). */
.k-scene.glyph-title h2::before {
  content: "";
  display: inline-block;
  vertical-align: -0.16em;
  margin-right: 0.35em;
  width: 1.05em;
  height: 1.05em;
  background: var(--k-accent);
  -webkit-mask: var(--k-glyph) center / contain no-repeat;
  mask: var(--k-glyph) center / contain no-repeat;
}

/* Card: a white box with a grey frame; .key tinted in the part colour,
   .accent framed in it. */
.card {
  box-sizing: border-box;
  padding: 20px 28px;
  border: 2px solid var(--us-anthrazit-40);
  border-radius: var(--k-radius);
  background: var(--k-card);
}
.k-scene .card > :first-child { margin-top: 0; }
.k-scene .card > :last-child { margin-bottom: 0; }
.card.key { background: var(--k-accent-20); border-color: var(--k-accent-60); }
.card.accent { border: 3px solid var(--k-accent); }
/* A conclusion line with an arrow; .open: an open question (grey). */
.k-scene p.then { color: var(--k-accent); font-weight: 700; }
.k-scene p.then::before { content: "→ "; }
.k-scene p.then.open { color: var(--k-muted); }

/* Number tiles: <div class="stats"><div><b>≈ 400</b><span>cores<br>at peak</span></div>…</div>,
   the label beside the number; .stacked puts it below. */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 16px; }
.stats > div {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 8px; border-radius: var(--k-radius); background: var(--k-accent-20);
}
.stats.stacked > div { flex-direction: column; gap: 0; text-align: center; }
.stats b { font-size: 36px; line-height: 1.1; color: var(--k-accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats b sup { font-size: 0.55em; vertical-align: 0.6em; line-height: 0; }
.stats span { font-size: 21px; line-height: 1.15; color: var(--k-fg); white-space: nowrap; }

/* Foot row: the bottom line left and a badge right, in the flow at the end of
   a slide or page: <div class="footrow"><p class="bottomline">…</p><a class="badge">…</a></div>. */
.footrow { display: flex; justify-content: space-between; align-items: stretch; gap: 40px; margin-top: 30px; }
.k-scene .footrow > .bottomline { position: relative; left: 0; bottom: auto; transform: none; margin: 0; }
/* Badge: a white box framed in the part colour, as tall as a bottom line,
   e.g. "Paper on [logo]" with the reference; it may be a popup. */
.badge {
  display: flex; align-items: center; gap: 12px; box-sizing: border-box;
  padding: 0 40px; border: 3px solid var(--k-accent); border-radius: var(--k-radius);
  background: var(--k-card); color: var(--k-fg); font-size: 32px; text-decoration: none;
}
.badge img.logo { height: 36px; width: auto; }
.k-scene .badge.k-popup-open:not(.k-popup-frame) { display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: 50px 70px; }
.k-scene .badge.k-popup-frame { padding: 0; }

/* Bottom line variants: .small (32 px text), .inline.center (centred in the flow). */
.k-scene .bottomline.small { font-size: 32px; }
.k-scene .bottomline.inline.center { margin-left: auto; margin-right: auto; }

/* Code card: a file name (and a note) on top, code, and optionally output:
   <div class="codecard"><div class="head"><code>File.lean</code><span>note</span></div><pre>…</pre><div class="out">…</div></div>.
   .term: a dark terminal with a .who label and code lines. */
.codecard { box-sizing: border-box; border-radius: var(--k-radius); border: 2px solid var(--us-anthrazit-40); overflow: hidden; background: var(--k-card); }
.codecard > .head { display: flex; align-items: baseline; gap: 14px; padding: 12px 22px; background: var(--us-anthrazit-20); }
.codecard > .head code { font-size: 22px; font-weight: 700; }
.codecard > .head span { font-size: 19px; color: var(--k-muted); }
.codecard > pre { margin: 0; padding: 20px 22px; font-size: 20px; line-height: 1.5; white-space: pre; overflow: hidden; }
.codecard > pre .kw, .codecard > pre b { color: var(--k-accent); font-weight: 700; }
.codecard > .out { display: flex; flex-direction: column; gap: 4px; padding: 14px 22px; border-top: 2px solid var(--us-anthrazit-20);
  font-family: var(--k-font-mono); font-size: 19px; color: var(--k-muted); }
.codecard > .out b { font-size: 24px; color: var(--k-accent); }
.codecard.term { border: 0; padding: 14px 22px 16px; background: var(--k-term-bg); color: var(--k-term-fg); }
.codecard.term code { display: block; font-size: 24px; line-height: 1.45; color: inherit; background: none; }
.codecard.term code i { font-style: normal; color: var(--k-term-prompt); margin-right: 0.4em; }
.codecard.term .who { display: block; font-size: 18px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7); margin-bottom: 6px; }

/* Callout: a box for a caution (.warn: amber with a warning sign). */
.k-scene .callout { position: relative; padding: 18px 26px; border-radius: var(--k-radius); background: var(--us-anthrazit-20);
  font-size: 28px; line-height: 1.3; }
.k-scene .callout.warn { padding-left: 76px; background: color-mix(in srgb, var(--k-warn-20) 60%, #fff); border: 2px solid var(--k-warn); }
.k-scene .callout.warn::before { content: "⚠"; position: absolute; left: 24px; top: 14px; font-size: 38px; color: var(--k-warn-dark); }
/* A callout is as wide as its content, never the full width of its column. */
.k-scene .callout { width: fit-content; max-width: 100%; box-sizing: border-box; }
/* The last thing on a slide (only speaker notes, arrows or marks follow it):
   it takes the place of a bottom line, centred at the foot of the text area. */
.k-scene[data-layout="content"]:not(.continuous) > .k-track > .callout:not(:has(~ :not(.notes, k-arrow, k-mark, .k-popup-backdrop))) {
  position: absolute; left: var(--k-pad-x); right: var(--k-pad-x); bottom: calc(var(--k-pad-bottom) + var(--k-refs-h, 0px));
  margin: 0 auto; max-width: calc(100% - 2 * var(--k-pad-x));
}

/* Check list: <div class="checklist"><div><b>Label</b><span>text</span></div>…</div>,
   tinted rows with a tick; --label-w sets the label column. */
.checklist { display: flex; flex-direction: column; gap: 14px; }
.checklist > div { display: flex; align-items: baseline; gap: 18px; padding: 14px 24px; border-radius: var(--k-radius); background: var(--k-accent-20); }
.checklist b { flex: none; width: var(--label-w, 250px); font-size: 30px; color: var(--k-accent); }
.checklist b::before { content: "✓"; margin-right: 0.4em; }
.checklist span { font-size: 26px; line-height: 1.2; }

/* Chip: a small pill label; .dark Anthrazit, .blue Mittelblau, default the part colour. */
.chip:not(svg *) { display: inline-block; padding: 6px 18px; border-radius: 99px; background: var(--k-accent); color: #fff; font-size: 26px; font-weight: 700; line-height: 1.2; }
.chip.dark:not(svg *) { background: var(--us-anthrazit); }
.chip.blue:not(svg *) { background: var(--us-blau); }

/* Diagram: boxes placed in canvas pixels inside a box of height --h, joined
   with <k-arrow>s: <div class="diagram" style="--h: 760"> with
   <div class="node card" id="a" style="--x: 0; --y: 0; --w: 300; --h: 80"><b>Title</b><span>detail</span></div>.
   --x/--y are the top-left corner (unlike .at). Kinds: card (white, grey
   frame), accent (part colour, white text), tint (tinted, framed in the part
   colour), file (amber), grey (filled grey), frame (only a frame; add
   dashed or dotted). A corner label: <span class="label">…</span> (top left;
   .tr top right, .br bottom right, .bl bottom left). Free text on the
   canvas, e.g. at an arrow: <span class="al" style="--x: …; --y: …">, .c
   centred on --x. */
.diagram { position: relative; height: calc(var(--h, 600) * 1px); font-size: 24px; }
.diagram > .node {
  position: absolute; box-sizing: border-box;
  left: calc(var(--x, 0) * 1px); top: calc(var(--y, 0) * 1px);
  width: calc(var(--w, 300) * 1px); height: calc(var(--h, 80) * 1px);
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  border-radius: var(--k-radius); padding: 0;
}
.diagram > .node > b { display: block; font-size: 26px; }
.diagram > .node > span { display: block; font-size: 20px; color: var(--k-muted); line-height: 1.2; }
.diagram > .node.card { background: var(--k-card); border: 2px solid var(--us-anthrazit-40); }
.diagram > .node.accent { background: var(--k-accent); color: #fff; --k-muted: rgba(255, 255, 255, 0.85); }
.diagram > .node.accent svg.glyph { stroke: #fff; }
.diagram > .node.tint { background: var(--k-accent-20); border: 3px solid var(--k-accent); }
.diagram > .node.file { background: var(--k-warn-20); border: 2px solid var(--k-warn); }
.diagram > .node.grey { background: var(--us-anthrazit-20); }
.diagram > .node.frame { border: 3px solid var(--us-anthrazit-40); }
.diagram > .node.dashed { border-style: dashed; }
.diagram > .node.dotted { border-style: dotted; }
.diagram > .node > .label { position: absolute; top: 10px; left: 18px; font-size: 22px; font-weight: 700; color: var(--k-fg); line-height: 1.2; }
.diagram > .node > .label.tr { left: auto; right: 18px; }
.diagram > .node > .label.br { top: auto; bottom: 8px; left: auto; right: 18px; }
.diagram > .node > .label.bl { top: auto; bottom: 8px; }
.diagram > .node.tint > .label { color: var(--k-accent); }
.diagram > .al { position: absolute; left: calc(var(--x, 0) * 1px); top: calc(var(--y, 0) * 1px); font-size: 19px; color: var(--k-fg); line-height: 1.2; white-space: nowrap; }
.diagram > .al.c { transform: translateX(-50%); text-align: center; }


/* ---------- Layout: title -------------------------------------------------- */

.k-scene[data-layout="title"] {
  background:
    /* both logos in one right-aligned row at the bottom, vertically centred on
       each other: the university logo sits left of the institute logo (82 px
       high) and a 64 px gap, or at the right edge without an institute logo */
    url("logos/unistuttgart_en_white.png") no-repeat
      right calc(80px + var(--us-institute-aspect, 0) * 82px + min(1, var(--us-institute-aspect, 0) * 1000) * 64px)
      bottom 73px / 285px auto,
    var(--us-institute-logo, none) no-repeat right 80px bottom 64px / auto 82px,
    radial-gradient(circle 660px at 1460px 560px, var(--us-anthrazit) 659.5px, transparent 660.5px),
    /* fills everything right of the circle centre, so only the left arc shows */
    linear-gradient(var(--us-anthrazit), var(--us-anthrazit)) no-repeat 1460px 0 / 100% 100%,
    var(--k-bg);
}
.k-scene[data-layout="title"] .k-track {
  position: absolute;
  inset: 0;
  padding: 0 120px 0 920px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
/* Teaser image in the white area on the left:
   <img class="teaser" src="media/teaser.jpg">  (add class "cover" to crop-fill). */
.k-scene[data-layout="title"] .teaser {
  position: absolute;
  left: 96px;
  top: 96px;
  width: 640px;
  height: 888px;
  object-fit: contain;
  object-position: center;
}
.k-scene[data-layout="title"] .teaser.cover { object-fit: cover; }
.k-scene[data-layout="title"] .kicker { color: rgba(255, 255, 255, 0.75); }
.k-scene[data-layout="title"] h1 { font-size: 76px; margin-bottom: 0.4em; }
.k-scene[data-layout="title"] .sub { color: #fff; font-size: 40px; margin-bottom: 1.4em; }
.k-scene[data-layout="title"] .author { font-size: 32px; font-weight: 700; margin: 0; }
.k-scene[data-layout="title"] .meta { font-size: 28px; margin: 0.2em 0 0; opacity: 0.85; }
/* Where and when the talk is given (filled from <meta name="occasion">) */
.k-scene[data-layout="title"] .occasion { font-size: 26px; margin: 1.1em 0 0; opacity: 0.85; }
.k-scene .occasion:empty { display: none; }

/* ---------- Layout: part -------------------------------------------------- */

/* The title slide in reverse: the part colour on the left, the white circle
   on the right with the same boundary (centre 1460, 560, radius 660; white
   also right of the centre). The title sits in the white area as the title
   slide's text sits in its dark circle; the agenda (outline.js) stays on the
   coloured area left of the arc, which reaches x = 800 at its leftmost. */
.k-scene[data-layout="part"] {
  --k-bg: var(--k-accent);
  background:
    radial-gradient(circle 660px at 1460px 560px, #fff 659.5px, transparent 660.5px),
    linear-gradient(#fff, #fff) no-repeat 1460px 0 / 100% 100%,
    var(--k-accent);
}
.k-scene[data-layout="part"] .k-track {
  position: absolute;
  inset: 0;
  padding: 0 120px 0 920px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.k-scene[data-layout="part"] h2 { font-size: 72px; margin: 0; }
.k-scene[data-layout="part"] .sub { margin: 0.5em 0 0; color: var(--k-muted); }
.k-scene[data-layout="part"] .k-part-agenda {
  position: absolute;
  left: 120px;
  top: 0;
  bottom: 0;
  width: 620px;  /* ends 40 px before the arc */
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

/* ---------- Agenda (layout "agenda", part slides, <k-agenda>) --------------- */

.k-scene .k-ag {
  list-style: none;
  margin: 0;
  padding: 0;
}
.k-scene .k-ag-part {
  display: grid;
  grid-template-columns: 76px 1fr;
  column-gap: 28px;
  align-items: center;
  margin: 0 0 76px;
}
.k-ag-num {
  grid-row: span 2;
  align-self: start;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--k-accent);
  color: #fff;
  font: 700 38px/76px var(--k-font-tab);
  font-variant-numeric: tabular-nums;
  text-align: center;
  /* Centred on the first line of the part name (46 px × 1.15), not on its top. */
  margin-top: calc((46px * 1.15 - 76px) / 2);
}
.k-ag-name { font-size: 46px; font-weight: 700; line-height: 1.15; }
.k-ag-sections {
  grid-column: 2;
  font-size: 30px;
  line-height: 1.35;
  color: var(--k-muted);
  margin-top: 6px;
}
/* Each section name stays on one line; the list wraps after a separator
   (the space after the dot is the only break point), so a line may end with
   a dot but never starts with one. */
.k-ag-section { white-space: nowrap; }
.k-scene .k-ag-part > * { min-width: 0; }
.k-ag-section:not(:last-child)::after {
  content: "· ";
  white-space: normal;
  margin-left: 0.45em;
  word-spacing: 0.2em;
  color: var(--k-accent);
  font-weight: 700;
}
/* The title sits like on content slides; the list is centred vertically in
   the space below it. */
.k-scene[data-layout="agenda"] .k-track {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.k-scene[data-layout="agenda"] .k-track > k-agenda {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.k-scene[data-layout="agenda"] .k-ag-sections { margin-top: 10px; }
.k-scene[data-layout="agenda"] .k-ag-part:last-child { margin-bottom: 0; }

/* On a part slide: white on the part colour, other parts quiet. */
.k-scene .k-part-agenda .k-ag-part { margin-bottom: 52px; }
.k-part-agenda .k-ag-num {
  background: none;
  box-shadow: inset 0 0 0 4px #fff;
  color: #fff;
  width: 60px;
  height: 60px;
  font-size: 30px;
  line-height: 60px;
  margin-top: calc((36px * 1.15 - 60px) / 2);
}
.k-scene .k-part-agenda .k-ag-part { grid-template-columns: 60px 1fr; }
.k-part-agenda .k-ag-name { font-size: 36px; }
.k-part-agenda .k-ag-sections { color: rgba(255, 255, 255, 0.85); font-size: 26px; }
.k-part-agenda .k-ag-section:not(:last-child)::after { color: #fff; }
.k-part-agenda .k-ag-current .k-ag-num { background: #fff; color: var(--k-accent); }
.k-part-agenda .k-ag-other { opacity: 0.45; }
.k-part-agenda .k-ag-other .k-ag-sections { display: none; }

/* ---------- References (outline.js) ---------------------------------------- */

/* The circled number in the text, slightly raised. */
.k-cite {
  display: inline-block;
  width: 1.55em;
  height: 1.55em;
  margin: 0 0.06em 0 0.18em;
  border-radius: 50%;
  background: var(--k-accent);
  color: #fff;
  font: 700 0.42em/1.55em var(--k-font-tab);
  font-variant-numeric: tabular-nums;
  text-align: center;
  vertical-align: 0.95em;
  text-indent: 0;
}
k-ref + k-ref .k-cite { margin-left: 0.02em; }
/* The footnotes: small and grey, above the footer line, left of the view ID. */
.k-scene .k-refs {
  padding: 0;
  margin: 0;
  left: var(--k-pad-x);
  right: 260px;
  bottom: 74px;
  font: 400 18px/1.3 var(--k-font-body);
  color: var(--k-muted);
}
.k-scene .k-ref-note { display: flex; gap: 10px; align-items: baseline; margin: 4px 0 0; }
.k-ref-note .k-cite { flex: none; font-size: 15px; vertical-align: 0; margin: 0; position: relative; top: -1px; }
.k-ref-note a { color: inherit; text-decoration: none; }
.k-canvas[data-layout="image"] .k-refs, .k-canvas[data-layout="quote"] .k-refs { bottom: 36px; }
/* The list of all sources (<k-references>), set like a paper's bibliography
   in two columns: number, then authors, the title in italics and the
   publication data (volume bold) on lines of their own. */
.k-scene .k-reflist { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 64px;
  font: 400 21px/1.3 var(--k-font-body); color: var(--k-fg); }
.k-scene .k-reflist-item { display: flex; gap: 14px; align-items: baseline; margin: 0 0 16px; padding: 0; break-inside: avoid; }
.k-scene .k-reflist-item::before { content: none; }
.k-reflist-item .k-cite { flex: none; font-size: 17px; vertical-align: 0; margin: 0; position: relative; top: -1px; }
.k-reflist-item .k-rl-body { display: flex; flex-direction: column; color: inherit; text-decoration: none; min-width: 0; }
.k-reflist-item .k-rl-authors { color: var(--k-fg); }
.k-reflist-item .k-rl-title { font-style: italic; color: var(--k-fg); }
.k-reflist-item .k-rl-data { color: var(--k-muted); }
.k-reflist-item .k-rl-vol { font-weight: 700; color: var(--k-fg); }
/* The kind of a source colours its number: paper, website, software. */
.k-scene .k-rl-legend { display: flex; gap: 36px; margin: -18px 0 22px; font: 400 21px/1.3 var(--k-font-body); color: var(--k-muted); }
.k-rl-key { display: inline-flex; align-items: center; gap: 10px; }
.k-rl-key .k-cite { font-size: 15px; vertical-align: 0; margin: 0; }
[data-kind="paper"] > .k-cite { background: var(--us-blau); }
[data-kind="web"] > .k-cite { background: var(--k-part-3); }
[data-kind="software"] > .k-cite { background: var(--k-part-1); }

/* ---------- Layout: subsection -------------------------------------------- */

.k-scene[data-layout="subsection"] {
  --k-bg: var(--us-anthrazit);
  --k-fg: #fff;
  --k-muted: rgba(255, 255, 255, 0.8);
  --k-accent: #fff;
}
.k-scene[data-layout="subsection"] .k-track {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding-left: 240px;
}
.k-scene[data-layout="subsection"] h2 { font-size: 72px; margin: 0; }
.k-scene[data-layout="subsection"] .kicker { color: var(--us-anthrazit-40); }

/* ---------- Layout: quote ----------------------------------------------- */

/* Quotations are set in the serif (Equity or Source Serif 4), on every slide. */
.k-scene blockquote { font-family: var(--k-font-quote); }

.k-scene[data-layout="quote"] {
  background:
    radial-gradient(circle 720px at 560px 330px, var(--us-anthrazit) 719.5px, transparent 720.5px),
    var(--k-bg);
}
.k-scene[data-layout="quote"] .k-track {
  position: absolute;
  left: 140px;
  top: 0;
  width: 900px;
  height: 860px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.k-scene[data-layout="quote"] blockquote {
  margin: 0 0 1em;
  font-size: 58px;
  line-height: 1.18;
  font-weight: 700;
}
.k-scene[data-layout="quote"] .who { font-size: 30px; opacity: 0.85; }

/* ---------- Layout: image ------------------------------------------------- */

.k-scene[data-layout="image"] .k-track { padding: 0; height: 100%; }
.k-scene[data-layout="image"] .k-track > :is(img, video, iframe, k-youtube, .k-iframe-ph):first-child {
  border-radius: 0;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
/* A full-bleed web page catches mouse and keys; this strip at the bottom edge
   hands them back to the talk when the mouse moves onto it. */
.k-scene[data-layout="image"] .k-track:has(> :is(iframe, k-youtube):first-child)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
}
.k-scene[data-layout="image"] .caption {
  position: absolute;
  left: calc(var(--k-pad-x) - 48px);
  bottom: 96px;
  max-width: 1100px;
  padding: 28px 48px;
  border-radius: var(--k-radius);
  /* frosted glass, like the sticky titles of continuous slides */
  background: color-mix(in srgb, var(--k-bg) 68%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  font-size: 32px;
}
.k-scene[data-layout="image"] .caption h2 { font-size: 44px; margin: 0 0 0.2em; }
.k-scene[data-layout="image"] .caption > h2:only-child { margin: 0; }
/* .caption.top: in the top-left corner instead (e.g. just a title over a PDF). */
.k-scene[data-layout="image"] .caption.top { top: 40px; left: 40px; bottom: auto; padding: 18px 36px; }
/* A rolling PDF over the whole slide: <section data-layout="image"> with
   <k-pdf src="…"> first, optionally a <div class="caption top"><h2>…</h2></div>.
   No header or footer: the pages roll from edge to edge of the slide. */
.k-scene[data-layout="image"] .k-track > k-pdf:first-child {
  position: absolute; inset: 0; height: auto; border-radius: 0;
  padding: 0 calc((100% - var(--pdf-w, 1280) * 1px) / 2);  /* leaves room left for .caption.top */
}
.k-scene[data-layout="image"] .k-track > k-pdf:first-child .k-pdf-sheet { padding: 40px 0; }

/* ---------- Layout: web ---------------------------------------------------- */

/* A web page filling the content area below the title, footer kept:
   <section data-layout="web"><h2>…</h2><iframe data-src="…"></iframe></section> */
.k-scene[data-layout="web"] .k-track {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.k-scene[data-layout="web"] .k-track > h2 { margin-bottom: 0.4em; }
/* A video keeps 16:9: as large as the content area allows, centred. */
.k-scene[data-layout="web"] .k-track > k-youtube {
  height: 100%;
  max-width: 100%;
  justify-self: center;
  min-height: 0;
}
.k-scene[data-layout="web"] .k-track > :is(iframe, .k-iframe-ph) {
  width: 100%;
  height: 100%;
  border: 0;
  box-shadow: 0 0 0 2px var(--us-anthrazit-20);
}
/* A box grown over the whole slide (data-bleed): square, without the rim. */
.k-scene .k-track .k-bleed { transition: border-radius var(--k-t-popup) ease, box-shadow var(--k-t-popup) ease; }
.k-scene .k-track .k-bleed.k-bleed-on { border-radius: 0; box-shadow: none; }

/* ---------- Layout: end --------------------------------------------------- */

.k-scene[data-layout="end"] {
  --k-bg: var(--us-blau);
  --k-fg: #fff;
  --k-muted: rgba(255, 255, 255, 0.85);
  --k-accent: #fff;
}
.k-scene[data-layout="end"]::before {
  content: "";
  position: absolute;
  left: 96px;
  top: 72px;
  width: 440px;
  height: 99px;
  background: url("logos/unistuttgart_en_white.png") no-repeat 0 0 / contain;
}
/* Institute logo (--us-institute-logo) top right, vertically centred on the university logo (same ratio as on the title slide) */
.k-scene[data-layout="end"]::after {
  content: "";
  position: absolute;
  right: 96px;
  top: 58px;
  width: 288px;
  height: 127px;
  background: var(--us-institute-logo, none) no-repeat 100% 0 / contain;
}
/* Centred: "Thank you", then <p class="contact"> (e-mail) and <p class="link"> (where the slides are) */
.k-scene[data-layout="end"] .k-track {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}
.k-scene[data-layout="end"] h2 { font-size: 96px; margin-bottom: 0.9em; }
.k-scene[data-layout="end"] .contact { font-size: 40px; margin: 0; }
.k-scene[data-layout="end"] .link { font-size: 32px; margin: 1.6em 0 0; color: var(--k-muted); }
.k-scene[data-layout="end"] a { color: inherit; text-decoration: none; }
/* The link on its own line below "Find these slides at", as large as the e-mail */
.k-scene[data-layout="end"] .link a { display: block; margin-top: 0.3em; font-size: 40px; color: #fff; }
/* Glyphs in front: envelope for the e-mail, a screen with slides for the link */
.k-scene[data-layout="end"] :is(.contact, .link)::before {
  content: ""; display: inline-block; vertical-align: -0.25em; margin-right: 0.55em;
  width: 1.25em; height: 1.25em; background: currentColor;
  -webkit-mask: var(--k-glyph) center / contain no-repeat; mask: var(--k-glyph) center / contain no-repeat;
}
.k-scene[data-layout="end"] .contact { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3.5 6.5l8.5 6 8.5-6'/%3E%3C/svg%3E"); }
.k-scene[data-layout="end"] .link { --k-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='1.5'/%3E%3Cpath d='M12 16v4M8 20h8M8 12l3-3 2 2 3-3'/%3E%3C/svg%3E"); }

/* Popup (data-popup): lifted box with a shadow over a dimmed slide */
.k-popup-open { box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28); }
.k-scene { --k-popup-dim: rgba(62, 68, 79, 0.45); --k-popup-blur: 8px; }
