:root {
  --bg: #0a0c10;
  --text: #e8eaef;
  --muted: #9aa3b2;
  --line: rgba(232, 234, 239, 0.14);
  --accent: #5b9fd4;
  --laser: #ff4d4d;
  --panel: #12151c;
  --serif: "Playfair Display", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

#stage {
  position: relative;
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

#presenter {
  position: absolute;
  inset: 0;
}

.layer,
.slide {
  display: contents;
}

.face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 6.5rem 5.5rem 4rem;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  background: var(--bg);
}

html:not(.js) #presenter > .layer > .slide:first-child > .face {
  opacity: 1;
  visibility: visible;
}

html.js #presenter .face.is-current,
html.js #presenter .face.is-leaving {
  opacity: 1;
  visibility: visible;
}

html.js #presenter .face.is-current {
  z-index: 2;
}

html.js #presenter .face.is-leaving {
  z-index: 1;
}

.face-inner {
  width: min(44rem, 100%);
  position: relative;
  z-index: 1;
}

.kicker {
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.face h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 6.2vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.96;
}

.mode-prose h1,
.mode-code h1,
.mode-spec h1,
.mode-image h1,
.mode-video h1,
.mode-figure h1,
.mode-empty h1 {
  font-size: clamp(2.35rem, 4.6vw, 4rem);
}

.mode-title h1 {
  font-size: clamp(4.6rem, 12vw, 10.5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.84;
}

.mode-title h1 span {
  display: block;
}

.mode-title h1 .em {
  font-style: italic;
  font-weight: 400;
}

.lede,
.face p {
  font-size: 1.2rem;
  line-height: 1.5;
}

.lede {
  max-width: 34rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-weight: 300;
}

.hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.hints li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 0.35rem;
  border: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.92rem;
  line-height: 1;
}

.blank-icon {
  display: inline-block;
  box-sizing: border-box;
  width: 0.95rem;
  height: 0.66rem;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  vertical-align: middle;
}

.mode-quote blockquote {
  margin: 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--accent);
}

.mode-quote blockquote p {
  margin: 0;
  max-width: 18ch;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.18;
}

.cite {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

.prose p,
.stack p {
  max-width: 38rem;
  margin: 0.85rem 0 0;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.55;
}

.names {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 0.45rem 1.4rem;
  margin: 1.5rem 0 0;
  max-width: 36rem;
}

.names dt {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
}

.names dd {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.35;
  align-self: center;
}

code,
pre {
  font-family: var(--mono);
}

.face pre {
  margin: 1.4rem 0 0;
  padding: 1.15rem 1.25rem;
  overflow: auto;
  max-height: min(46vh, 22rem);
  background: var(--panel);
  border: 1px solid var(--line);
  color: #d5dbe6;
  font-size: 0.92rem;
  line-height: 1.55;
}

.mode-empty .face {
  background-image:
    linear-gradient(rgba(91, 159, 212, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 159, 212, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
}

.mode-empty pre {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(180px, 280px);
  gap: 2.5rem;
  align-items: center;
  width: min(52rem, 100%);
}

.plate {
  width: 100%;
  height: auto;
}

.mode-image,
.mode-video {
  align-items: flex-end;
  padding: 0 11rem 4.75rem 7.25rem;
}

.mode-flash {
  padding: 0;
  background: #000;
}

.mode-flash video {
  object-fit: contain;
  background: #000;
}

.rail-dots.is-long .dot {
  width: 20px;
}

.mode-frame {
  padding: 0;
}

.mode-frame iframe {
  border: 0;
  pointer-events: none;
  background: #000;
}

#stage[data-mode="frame"] .edge {
  visibility: hidden;
}

.bleed {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 12, 16, 0.82) 0%, rgba(10, 12, 16, 0.2) 18%, rgba(10, 12, 16, 0) 36%),
    linear-gradient(90deg, rgba(10, 12, 16, 0.55) 0%, rgba(10, 12, 16, 0) 16%),
    linear-gradient(0deg, rgba(10, 12, 16, 0.92) 0%, rgba(10, 12, 16, 0.55) 24%, rgba(10, 12, 16, 0) 52%);
}

.mode-image .face-inner,
.mode-video .face-inner {
  width: min(34rem, 100%);
}

.credit {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.credit span {
  white-space: nowrap;
}

.play-film {
  margin-top: 1.1rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.6rem;
}

.map-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
}

.map-label,
.rail-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.map-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip,
.map-empty,
.rail-empty {
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.92rem;
}

.chip {
  padding: 0.4rem 0.65rem;
}

.chip.is-seed {
  border-color: var(--accent);
  color: white;
}

.map-empty,
.rail-empty {
  padding: 0.15rem 0.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.r400 {
  justify-self: end;
  width: 220px;
  padding: 1.1rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 77, 77, 0.18), transparent 42%),
    #141820;
}

.r400-laser {
  display: block;
  width: 8px;
  height: 8px;
  margin: 0.15rem auto 0.9rem;
  border-radius: 50%;
  background: var(--laser);
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.85);
}

.r400-keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.r400-keys .laser-key {
  grid-column: 1 / -1;
}

.r400-keys p {
  margin: 0;
  padding: 0.7rem 0.4rem;
  background: #0c0e13;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.r400-keys strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 400;
}

.chrome {
  position: absolute;
  z-index: 5;
  left: 0.85rem;
  top: 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  max-width: calc(100% - 1.4rem);
}

.rail {
  --dot-span: 28px;
  position: absolute;
  z-index: 5;
  left: 0.85rem;
  top: 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.chrome .rail {
  position: static;
  left: auto;
  top: auto;
}

.countdown {
  margin: 0;
  padding: 0 0.15rem;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 22px;
  color: var(--laser);
  text-shadow: 0 0 10px rgba(255, 77, 77, 0.45);
}

html.clock-hidden .countdown {
  display: none;
}

html.map-hidden .rail {
  display: none;
}

.rail.has-gate {
  padding-left: calc(var(--dot-span) + 0.85rem);
}

.dot-gate {
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
}

.rail-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
}

.rail .rail-label {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  width: auto;
  line-height: 1;
}

.rail .rail-label::after {
  content: "";
  width: 1px;
  height: 0.95rem;
  background: var(--muted);
  opacity: 0.85;
}

.rail-dots {
  display: flex;
  flex-direction: row;
}

.dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
}

.dot::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(232, 234, 239, 0.32);
}

.dot.is-on::before {
  background: var(--laser);
  box-shadow: 0 0 10px rgba(255, 77, 77, 0.85);
}

.dot.dot-chapter,
.dot.dot-index {
  position: relative;
}

.dot.dot-gate {
  position: absolute;
}

.dot.dot-chapter::before {
  width: 16px;
  height: 16px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(232, 234, 239, 0.55);
}

.dot.dot-chapter.is-on::before,
.dot.dot-gate.is-on::before {
  background: transparent;
  box-shadow:
    inset 0 0 0 1.5px var(--laser),
    0 0 10px rgba(255, 77, 77, 0.85);
}

.dot .mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  color: rgba(232, 234, 239, 0.72);
  pointer-events: none;
}

.dot.dot-chapter.is-on .mark,
.dot.dot-index .mark {
  color: var(--laser);
}

.dot.dot-index::before {
  display: none;
}

.rail-dots.is-long .dot-index .mark {
  font-size: 9px;
  letter-spacing: -0.03em;
}

.rail-row.is-preview .dot::before {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(232, 234, 239, 0.4);
}

.laser-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: none;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: var(--laser);
  box-shadow: 0 0 16px 6px rgba(255, 77, 77, 0.75);
  pointer-events: none;
}

html.is-laser .laser-dot {
  display: block;
}

html.is-laser .face {
  cursor: none;
}

.edge {
  position: absolute;
  z-index: 6;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}

.edge-left,
.edge-right {
  top: 0;
  bottom: 0;
  width: 3px;
}

.edge-left { left: 0; }
.edge-right { right: 0; }

.edge-up,
.edge-down {
  left: 0;
  right: 0;
  height: 3px;
}

.edge-up { top: 0; }
.edge-down { bottom: 0; }

#stage.bump-left .edge-left,
#stage.bump-right .edge-right,
#stage.bump-up .edge-up,
#stage.bump-down .edge-down {
  animation: edge 240ms ease;
}

@keyframes edge {
  from { opacity: 0.9; }
  to { opacity: 0; }
}

.live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

html.js .face.enter-right { animation: enter-right 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
html.js .face.enter-left { animation: enter-left 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
html.js .face.enter-down { animation: enter-down 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
html.js .face.enter-up { animation: enter-up 320ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
html.js .face.enter-jump { animation: enter-jump 220ms ease both; }

@keyframes enter-right {
  from { transform: translateX(36px); }
  to { transform: none; }
}
@keyframes enter-left {
  from { transform: translateX(-36px); }
  to { transform: none; }
}
@keyframes enter-down {
  from { transform: translateY(22px); }
  to { transform: none; }
}
@keyframes enter-up {
  from { transform: translateY(-18px); }
  to { transform: none; }
}
@keyframes enter-jump {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .face.enter-right,
  html.js .face.enter-left,
  html.js .face.enter-down,
  html.js .face.enter-up,
  html.js .face.enter-jump {
    animation: none;
  }
}

.mode-black {
  background: #000;
  padding: 0;
}

.second-name {
  margin: 2.2rem 0 0;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 4.6vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.96;
}

.mode-words {
  justify-content: center;
  background: #000;
}

.word-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.word-row li {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.mode-portrait {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #000;
  padding: 6rem 2rem;
}

.mode-portrait .portrait {
  width: 9rem;
  height: 9rem;
  border: 1px solid #fff;
  border-radius: 50%;
  overflow: hidden;
}

.mode-portrait .portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mode-portrait h1 {
  margin-top: 1.4rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.mode-portrait .lede {
  margin-right: auto;
  margin-left: auto;
}

.mode-quote blockquote.wide p {
  max-width: 16em;
}

@media (max-width: 860px) {
  .face {
    align-items: flex-start;
    padding: 6.5rem 1.15rem 2.5rem;
  }

  .mode-image,
  .mode-video {
    align-items: flex-end;
    padding: 0 1.15rem 2.5rem;
  }

  .mode-portrait {
    align-items: center;
    text-align: center;
  }

  .names {
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.4rem 0.8rem;
  }

  .chrome,
  .rail {
    --dot-span: 22px;
    top: 0.85rem;
    left: 0.65rem;
    right: auto;
  }

  .rail-dots.is-long .dot {
    width: 16px;
  }

  .dot {
    width: 22px;
    height: 22px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .r400 {
    justify-self: start;
    width: min(220px, 100%);
  }

  .map-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* Skräddarsydd kreativitet. The opening slide is the standard:
   Playfair, capitals, wide tracking, white with a blue glow,
   set on the bottom center of the same dark field. */
html.talk {
  --title-shadow:
    0 0 10px rgba(91, 159, 212, 0.5),
    0 0 20px rgba(91, 159, 212, 0.3),
    0 0 40px rgba(91, 159, 212, 0.2);
}

html.talk .mode-title,
html.talk .mode-words,
html.talk .mode-quote {
  align-items: flex-end;
  justify-content: center;
  padding: 0 3vw 4rem;
  text-align: center;
  background: var(--bg);
}

html.talk .mode-title .face-inner,
html.talk .mode-quote .face-inner {
  width: 100%;
}

html.talk .mode-title h1,
html.talk .word-row,
html.talk .word-row li,
html.talk .mode-quote blockquote p {
  font-family: var(--serif);
  font-size: 5rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.1em;
  line-height: 1.12;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--title-shadow);
  text-wrap: balance;
}

html.talk .mode-title h1 span {
  display: inline;
}

html.talk .mode-title h1 .em {
  font-style: normal;
  font-weight: 400;
}

html.talk .mode-title h1.as-typed {
  text-transform: none;
  letter-spacing: 0.04em;
}

html.talk .mode-title h1.as-typed .em {
  font-size: 0.78em;
  letter-spacing: 0.06em;
}

html.talk .mode-title h1.is-file {
  font-family: var(--mono);
  font-size: 4.15rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

html.talk .mode-uses .face-inner,
html.talk .mode-file .face-inner {
  position: relative;
  z-index: 2;
}

html.talk .html-sheet {
  position: absolute;
  left: 8vw;
  top: 4.5rem;
  z-index: 1;
  width: calc(100% - 16vw);
  height: calc(100% - 13.8rem);
  overflow: visible;
}

html.talk .html-sheet .ink {
  fill: none;
  stroke: #fff;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}

html.talk .html-sheet .hair { stroke-width: 1.25; }
html.talk .html-sheet .rule { stroke-width: 1.15; }

html.talk .html-sheet .filemark {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.2em;
  fill: #fff;
}

html.talk .html-sheet .caption {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.03em;
  fill: #fff;
}

html.talk .html-sheet-frame {
  opacity: 0;
}

html.talk .html-sheet-frame.is-show {
  opacity: 1;
}

html.talk .html-sheet-mast {
  opacity: 0;
  transition: opacity 0.5s ease;
}

html.talk .html-sheet-frame.is-show .html-sheet-mast {
  opacity: 1;
  transition-delay: 0.4s;
}

html.talk .html-sheet .cell {
  opacity: 0;
  transition: opacity 0.45s ease;
}

html.talk .html-sheet-plate.is-on .cell {
  opacity: 1;
  transition-delay: var(--d);
}

/* Stil och layout. A prompt is typed at the top, as if entered live.
   Letters arrive one by one; the caret keeps blinking. */
html.talk .prompt-line {
  position: absolute;
  top: 6.8rem;
  left: 50%;
  z-index: 2;
  margin: 0;
  transform: translateX(-50%);
}

html.talk .prompt-bar {
  display: grid;
  align-items: center;
  min-height: 2.75rem;
  padding: 1.25rem 2.4rem 1.4rem;
  border: 1.6px solid rgba(232, 234, 239, 0.88);
  border-radius: 999px;
  color: #fff;
  background: rgba(10, 12, 16, 0.35);
  filter: drop-shadow(0 0 10px rgba(91, 159, 212, 0.32));
  font-family: var(--mono);
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.45;
  text-transform: none;
}

html.talk .prompt-ghost,
html.talk .prompt-fill {
  grid-area: 1 / 1;
}

html.talk .prompt-ghost {
  visibility: hidden;
  white-space: nowrap;
}

html.talk .prompt-fill {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-width: 0;
}

html.talk .prompt-typed {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

html.talk .prompt-ch {
  display: inline-block;
  max-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
  line-height: 1.45;
  padding: 0.08em 0 0.22em;
  opacity: 0;
}

html.talk .face.is-current .prompt-ch,
html.talk .face.is-leaving .prompt-ch {
  animation: prompt-ch 90ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.42s + var(--i) * 85ms);
}

html.talk .prompt-caret {
  display: block;
  flex: none;
  align-self: center;
  width: 1.6px;
  height: 0.95em;
  margin-left: 0.12rem;
  background: #fff;
  opacity: 0;
}

html.talk .face.is-current .prompt-caret,
html.talk .face.is-leaving .prompt-caret {
  animation: address-caret 1.1s steps(1) 0.18s infinite;
  opacity: 1;
}

@keyframes prompt-ch {
  from {
    max-width: 0;
    opacity: 0;
  }
  to {
    max-width: 1.4em;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.talk .prompt-ch,
  html.talk .face.is-current .prompt-ch,
  html.talk .face.is-leaving .prompt-ch {
    max-width: none;
    opacity: 1;
    animation: none;
  }

  html.talk .prompt-caret,
  html.talk .face.is-current .prompt-caret,
  html.talk .face.is-leaving .prompt-caret {
    opacity: 1;
    animation: none;
  }
}

/* Stil och layout. The four names are what should stay in memory.
   Words arrive with their group, then leave. Retune the beat here:
   --lead      pause while the prompt is still typing
   --gap       time from one group to the next
   --word      pause after a name before its words
   --stagger   breath inside a group
   --remember  when the words leave and the names brighten
   Group order follows the markup. --g and --i are set below. */
html.talk .style-board {
  --lead: 2.15s;
  --gap: 1.18s;
  --word: 0.32s;
  --stagger: 50ms;
  --remember: 7.3s;
  --style-glow:
    0 0 12px rgba(91, 159, 212, 0.28);
  --style-glow-hot:
    0 0 12px rgba(91, 159, 212, 0.7),
    0 0 28px rgba(91, 159, 212, 0.42),
    0 0 52px rgba(91, 159, 212, 0.22);
  position: absolute;
  left: 4vw;
  right: 4vw;
  top: 12.4rem;
  bottom: 10.2rem;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(1.1rem, 2.2vw, 2.4rem);
  align-content: center;
  margin: 0;
  text-align: center;
  pointer-events: none;
}

html.talk .style-group:nth-child(1) { --g: 0; }
html.talk .style-group:nth-child(2) { --g: 1; }
html.talk .style-group:nth-child(3) { --g: 2; }
html.talk .style-group:nth-child(4) { --g: 3; }
html.talk .style-group:nth-child(5) { --g: 4; }
html.talk .style-group:nth-child(6) { --g: 5; }

html.talk .style-group h2 {
  margin: 0 0 0.85rem;
  transform-origin: center top;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--style-glow);
  text-wrap: balance;
  opacity: 0;
}

html.talk .style-words {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

html.talk .style-words li:nth-child(1) { --i: 0; }
html.talk .style-words li:nth-child(2) { --i: 1; }
html.talk .style-words li:nth-child(3) { --i: 2; }
html.talk .style-words li:nth-child(4) { --i: 3; }
html.talk .style-words li:nth-child(5) { --i: 4; }
html.talk .style-words li:nth-child(6) { --i: 5; }
html.talk .style-words li:nth-child(7) { --i: 6; }
html.talk .style-words li:nth-child(8) { --i: 7; }
html.talk .style-words li:nth-child(9) { --i: 8; }
html.talk .style-words li:nth-child(10) { --i: 9; }
html.talk .style-words li:nth-child(11) { --i: 10; }
html.talk .style-words li:nth-child(12) { --i: 11; }

html.talk .style-words li {
  font-family: var(--sans);
  font-size: clamp(0.84rem, 1.15vw, 1.02rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.28;
  color: rgba(232, 234, 239, 0.78);
  text-shadow: none;
  opacity: 0;
}

html.talk .style-words li.face-cinzel {
  font-family: Cinzel, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.92em;
}

html.talk .style-words li.face-courier {
  font-family: "Courier New", Courier, monospace;
  font-weight: 400;
  letter-spacing: 0;
}

html.talk .style-words li.face-garamond {
  font-family: "EB Garamond", Garamond, Palatino, serif;
  font-weight: 500;
  font-size: 1.22em;
  letter-spacing: 0.01em;
}

html.talk .style-words li.face-playfair {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: 0.03em;
}

html.talk .face.is-current .style-group h2,
html.talk .face.is-leaving .style-group h2 {
  animation-name: style-name-in, style-name-stay;
  animation-duration: 0.78s, 1.15s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1), ease;
  animation-fill-mode: both, forwards;
  animation-delay: calc(var(--lead) + var(--g) * var(--gap)), var(--remember);
}

html.talk .face.is-current .style-words li,
html.talk .face.is-leaving .style-words li {
  animation-name: style-word-in, style-word-out;
  animation-duration: 0.66s, 1.15s;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1), ease;
  animation-fill-mode: both, forwards;
  animation-delay:
    calc(var(--lead) + var(--g) * var(--gap) + var(--word) + var(--i) * var(--stagger)),
    var(--remember);
}

@keyframes style-name-in {
  from { opacity: 0; transform: translateY(0.7rem); }
  to { opacity: 1; transform: none; }
}

@keyframes style-name-stay {
  from { opacity: 1; transform: none; text-shadow: var(--style-glow); }
  to { opacity: 1; transform: scale(1.06); text-shadow: var(--style-glow-hot); }
}

@keyframes style-word-in {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: none; }
}

@keyframes style-word-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-0.35rem); }
}

@media (prefers-reduced-motion: reduce) {
  html.talk .style-group h2,
  html.talk .face.is-current .style-group h2,
  html.talk .face.is-leaving .style-group h2 {
    opacity: 1;
    transform: none;
    text-shadow: var(--style-glow-hot);
    animation: none;
  }

  html.talk .style-words li,
  html.talk .face.is-current .style-words li,
  html.talk .face.is-leaving .style-words li {
    opacity: 0.78;
    transform: none;
    animation: none;
  }
}

html.talk .mode-quote .face-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

html.talk .mode-quote blockquote,
html.talk .mode-quote blockquote.wide {
  margin: 0;
  padding: 0;
  border: 0;
}

html.talk .mode-quote blockquote p,
html.talk .mode-quote blockquote.wide p {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12em;
  max-width: none;
  margin: 0;
}

html.talk .mode-quote p.is-lines {
  font-size: min(5rem, 4.5vw);
  letter-spacing: 0.1em;
}

html.talk .mode-quote blockquote p span {
  white-space: nowrap;
}

html.talk .mode-quote .cite {
  order: -1;
  margin: 0 0 0.9rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: none;
}

html.talk .word-row {
  justify-content: center;
  gap: 0.45em;
}

html.talk .mode-prose {
  align-items: center;
  justify-content: center;
  text-align: center;
}

html.talk .mode-prose .face-inner {
  width: min(40rem, 100%);
}

html.talk .mode-prose h1,
html.talk .second-name {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 18px rgba(91, 159, 212, 0.35);
}

html.talk .second-name {
  margin-top: 2.4rem;
}

html.talk .mode-prose .lede,
html.talk .mode-portrait .lede {
  margin-right: auto;
  margin-left: auto;
}

html.talk .mode-brief {
  align-items: flex-start;
  justify-content: center;
  padding: 5.4rem 4.2rem 2.4rem;
  text-align: left;
}

html.talk .mode-brief .face-inner {
  width: min(68rem, 100%);
}

html.talk .mode-brief h1 {
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--title-shadow);
}

html.talk .mode-brief .brief-points,
html.talk .mode-brief .brief-rooms,
html.talk .mode-brief .brief-places {
  margin: 1.15rem 0 0;
  padding: 0;
  list-style: none;
}

html.talk .mode-brief .brief-points {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

html.talk .mode-brief .brief-points li,
html.talk .mode-brief .brief-places li {
  position: relative;
  padding-left: 1.35rem;
}

html.talk .mode-brief .brief-points li::before,
html.talk .mode-brief .brief-places li::before {
  content: "";
  position: absolute;
  left: 0.12rem;
  top: 0.46em;
  width: 0.34rem;
  height: 0.34rem;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(91, 159, 212, 0.55);
}

html.talk .mode-brief .brief-points li,
html.talk .mode-brief .brief-places span {
  font-family: var(--sans);
  font-size: clamp(0.92rem, 1.35vw, 1.18rem);
  font-weight: 300;
  line-height: 1.45;
  color: #e8eaef;
}

html.talk .mode-brief .brief-rooms {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.45rem;
}

html.talk .mode-brief .brief-rooms li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: baseline;
  font-family: var(--sans);
  font-size: clamp(0.82rem, 1.15vw, 1.02rem);
  font-weight: 300;
  line-height: 1.3;
  color: var(--muted);
}

html.talk .mode-brief .room {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: 0.04em;
  color: #fff;
}

html.talk .mode-brief .brief-places {
  display: grid;
  gap: 1.85rem;
  margin-top: 2.2rem;
}

html.talk .mode-brief .brief-places strong {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.6vw, 2.15rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--title-shadow);
}

html.talk .mode-plate {
  padding: 0;
  background: #0a0c10;
}

html.talk .mode-plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Exempel. The chapter name stays. The question arrives after the entrance. */
html.talk .ask {
  position: absolute;
  left: 6vw;
  right: 6vw;
  top: 40%;
  margin: 0;
  z-index: 2;
  font-family: var(--serif);
  font-size: clamp(2.15rem, 4.6vw, 4.35rem);
  font-weight: 400;
  letter-spacing: 0.015em;
  line-height: 1.18;
  text-align: center;
  text-wrap: balance;
  color: #fff;
  text-shadow: var(--title-shadow);
  opacity: 0;
  pointer-events: none;
}

html.talk .face.is-current .ask,
html.talk .face.is-leaving .ask {
  animation: ask-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@keyframes ask-in {
  from { opacity: 0; transform: translateY(0.85rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.talk .ask,
  html.talk .face.is-current .ask,
  html.talk .face.is-leaving .ask {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Exempel and Stil och layout. The capture sits inside the dark field
   instead of filling the stage. Gemini's blended film stays full-bleed. */
html.talk .layer.is-framed > .slide > .face {
  background: var(--bg);
}

html.talk .layer.is-framed .bleed,
html.talk .layer.is-framed .mode-plate img {
  top: 7.5vh;
  left: 5.5vw;
  right: auto;
  bottom: auto;
  width: calc(100% - 11vw);
  height: calc(100% - 15vh);
  object-fit: contain;
  object-position: center;
  background: transparent;
}

html.talk img.skolprat-mark {
  position: absolute;
  inset: 1.15rem 1.5rem auto auto;
  z-index: 3;
  width: clamp(4.4rem, 7vw, 5.8rem);
  height: auto;
  object-fit: contain;
  object-position: right top;
  pointer-events: none;
}

/* Orientering. Chapter headings on the left, speakers on the right.
   A small fountain rests between the eye and the list. */
html.talk .mode-contents {
  --title-shadow:
    0 0 10px rgba(248, 224, 255, 0.5),
    0 0 20px rgba(248, 224, 255, 0.3),
    0 0 40px rgba(248, 224, 255, 0.2);
  align-items: center;
  justify-content: center;
  padding: 5.6rem 6vw 3.6rem 5.5vw;
  background: var(--bg);
}

html.talk .mode-contents .face-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 6rem);
  width: min(76rem, 100%);
}

html.talk .toc-side {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-width: 0;
}

html.talk .toc-water {
  width: 4rem;
  height: auto;
  flex: none;
  color: rgba(248, 224, 255, 0.9);
  filter: drop-shadow(0 0 7px rgba(248, 224, 255, 0.4));
  clip-path: inset(0 0 100% 0);
}

html.talk .face.is-current .toc-water,
html.talk .face.is-leaving .toc-water {
  animation: toc-water-in 1.35s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

html.talk .toc {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
}

html.talk .toc li {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.05vw, 1.72rem);
  font-weight: 400;
  letter-spacing: 0.11em;
  line-height: 1.12;
  text-transform: uppercase;
  color: rgba(232, 234, 239, 0.86);
  text-shadow: 0 0 16px rgba(248, 224, 255, 0.22);
  opacity: 0;
  transform: translateY(-0.8rem);
}

html.talk .toc li.is-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.42rem;
  margin-bottom: 0.28rem;
  font-size: clamp(1.55rem, 2.7vw, 2.2rem);
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: var(--title-shadow);
}

html.talk .toc-wave {
  display: block;
  width: 100%;
  height: 1.2rem;
  overflow: visible;
  color: #f8e0ff;
}

html.talk .toc-wave path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(248, 224, 255, 0.55));
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

html.talk .face.is-current .toc-wave path,
html.talk .face.is-leaving .toc-wave path {
  animation: toc-wave-draw 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}

@keyframes toc-wave-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

html.talk .toc li.is-here {
  color: #fff;
  text-shadow: var(--title-shadow);
}

html.talk .toc li.is-here::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: 0.38em;
  width: 0.32rem;
  height: 0.32rem;
  border: 1px solid #f8e0ff;
  transform: rotate(45deg);
  box-shadow: 0 0 8px rgba(248, 224, 255, 0.55);
}

html.talk .face.is-current .toc li,
html.talk .face.is-leaving .toc li {
  animation: toc-in 680ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i) * 115ms);
}

html.talk .speakers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2.15rem;
  flex: none;
  text-align: right;
}

html.talk .speaker {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.38rem;
  margin: 0;
  opacity: 0;
  transform: translateY(-0.8rem);
}

html.talk .face.is-current .speaker,
html.talk .face.is-leaving .speaker {
  animation: toc-in 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.42s + var(--i) * 0.18s);
}

html.talk .speaker-name {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.35vw, 2.05rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.12;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--title-shadow);
}

html.talk .speaker-role {
  font-family: var(--sans);
  font-size: clamp(0.82rem, 1.15vw, 1.02rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.3;
  color: var(--muted);
}

@keyframes toc-in {
  from { opacity: 0; transform: translateY(-0.8rem); }
  to { opacity: 1; transform: none; }
}

@keyframes toc-water-in {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  html.talk .toc li,
  html.talk .speaker,
  html.talk .toc-water,
  html.talk .face.is-current .toc li,
  html.talk .face.is-leaving .toc li,
  html.talk .face.is-current .speaker,
  html.talk .face.is-leaving .speaker,
  html.talk .face.is-current .toc-water,
  html.talk .face.is-leaving .toc-water {
    opacity: 1;
    transform: none;
    clip-path: none;
    animation: none;
  }

  html.talk .toc-wave path {
    stroke-dashoffset: 0;
    animation: none;
  }
}

html.talk .mode-portrait {
  background: var(--bg);
}

html.talk .mode-portrait .portrait {
  border: 0;
  box-shadow:
    0 0 0 1px rgba(91, 159, 212, 0.45),
    0 0 28px rgba(91, 159, 212, 0.16);
}

html.talk .mode-portrait h1 {
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 18px rgba(91, 159, 212, 0.35);
}

@media (max-width: 1100px) {
  html.talk .mode-title h1,
  html.talk .word-row,
  html.talk .word-row li,
  html.talk .mode-quote blockquote p {
    font-size: min(5rem, 7.2vw);
  }

  html.talk .mode-title h1.is-file {
    font-size: min(4.15rem, 6.4vw);
  }

  html.talk .style-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.6rem;
  }
}

@media (max-width: 768px) {
  html.talk .mode-title,
  html.talk .mode-words,
  html.talk .mode-quote {
    padding: 0 0.9rem 2rem;
  }

  html.talk .prompt-line {
    top: 5.2rem;
  }

  html.talk .ask {
    left: 1.1rem;
    right: 1.1rem;
    top: 36%;
    font-size: clamp(1.65rem, 8vw, 2.15rem);
  }

  html.talk .style-board {
    top: 10.2rem;
    bottom: 6.4rem;
    left: 1rem;
    right: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1.1rem;
    --lead: 1.4s;
    --gap: 0.85s;
    --remember: 5.4s;
  }

  html.talk .style-group h2 {
    min-height: 0;
    margin-bottom: 0.4rem;
    font-size: 1.02rem;
    letter-spacing: 0.07em;
  }

  html.talk .style-words {
    gap: 0.18rem;
  }

  html.talk .style-words li {
    font-size: 0.78rem;
  }

  html.talk .mode-title h1,
  html.talk .word-row,
  html.talk .word-row li,
  html.talk .mode-quote blockquote p {
    font-size: min(2.75rem, 8.2vw);
    letter-spacing: 0.05em;
  }

  html.talk .mode-title h1.as-typed {
    letter-spacing: 0.02em;
  }

  html.talk .mode-title h1.is-file {
    font-size: min(2.15rem, 7.4vw);
  }

  html.talk .stack-parts {
    gap: 1.2rem;
    top: 14%;
    bottom: 22%;
  }

  html.talk .html-sheet {
    left: 3vw;
    width: calc(100% - 6vw);
  }

  html.talk .mock {
    width: min(58rem, 94vw);
    height: 16rem;
  }

  html.talk .mode-brief {
    flex-direction: column;
    align-items: flex-start;
    padding: 4.6rem 1.15rem 1.4rem;
  }

  html.talk .mode-brief .skolprat-mark {
    position: static;
    display: block;
    width: 3.6rem;
    margin: 0 0 0.7rem;
  }

  html.talk .mode-brief .brief-points {
    gap: 0.62rem;
  }

  html.talk .mode-brief .brief-rooms {
    gap: 0.42rem;
    margin-top: 1rem;
  }

  html.talk .mode-contents {
    align-items: center;
    padding: 4.5rem 1.15rem 1.5rem;
  }

  html.talk .mode-contents .face-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.7rem;
  }

  html.talk .toc-side {
    gap: 0.85rem;
  }

  html.talk .toc-water {
    width: 2.4rem;
  }

  html.talk .toc {
    gap: 0.38rem;
  }

  html.talk .toc li {
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    white-space: normal;
  }

  html.talk .toc li.is-title {
    font-size: 1.22rem;
    letter-spacing: 0.06em;
    gap: 0.28rem;
  }

  html.talk .toc-wave {
    height: 0.95rem;
  }

  html.talk .speakers {
    align-items: flex-start;
    gap: 1.15rem;
    text-align: left;
  }

  html.talk .speaker {
    align-items: flex-start;
  }

  html.talk .speaker-name {
    font-size: 1.2rem;
    letter-spacing: 0.07em;
  }

  html.talk .speaker-role {
    font-size: 0.82rem;
  }
}

/* Hur vågen reser sig. The ripple from media/wave runs across the
   full width, a little above center, and keeps moving while the
   slide is current. The title stays on top of it. */
html.talk .rising-wave {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

html.talk .mode-rising .face-inner {
  position: relative;
  z-index: 1;
}

html.talk .mode-rising .subheads {
  position: absolute;
  z-index: 1;
  left: 0.6rem;
  right: 0.6rem;
  top: max(4.5rem, calc(42% - 9.5rem));
  width: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: baseline;
  gap: clamp(0.45rem, 2.2vw, 1.6rem);
}

html.talk .subheads[hidden] {
  display: none;
}

html.talk .subheads li {
  font-family: var(--serif);
  font-size: clamp(0.72rem, 2.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
  text-shadow: var(--title-shadow);
}

html.talk .subheads.is-in {
  animation: subhead-in 0.7s ease;
}

@keyframes subhead-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html.talk .subheads.is-in {
    animation: none;
  }
}

/* Opening of Hur vågen reser sig, drawn from the three Sequoia frames.
   The decades stack. The newest curve is the steep one.
   The wave is computation, not another step in communication.
   --wave-now colors that newest curve. */
html.talk .mode-waves,
html.talk .mode-fast,
html.talk .mode-kind {
  --wave-now: var(--accent);
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.4rem;
  padding: 4.6rem 3.2rem 3.2rem;
  background: #000;
}

html.talk .seq-read {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

html.talk .seq-caption {
  flex: none;
  margin: 0.4rem 0 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 5rem;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.1em;
  line-height: 1.12;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--title-shadow);
  text-wrap: balance;
}

html.talk .wave-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.35rem, 0.7vh, 0.75rem);
  min-height: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

html.talk .wave {
  position: relative;
  /* 0.85 is (40 − 6) / 40: the plateau's distance from the bottom of the
     viewBox. The rule stays under the copy, and the curve hangs here. */
  padding-bottom: calc(2.15rem * 0.85);
  /* Closed on the foot of the curve until the draw starts.
     1.2% + step * 4.6% is that foot in the viewBox. */
  clip-path: inset(0 calc(98.8% - var(--step) * 4.6%) -80% calc(1.2% + var(--step) * 4.6%));
}

/* One stroke: the rise ends on a horizontal tangent, then the rule
   continues in the same path. The copy sits on that rule. */
html.talk .wave-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 2.15rem;
  overflow: visible;
  color: #fff;
}

html.talk .wave-line path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* Each decade draws from its foot. --step is 0 at the bottom, so the
   oldest wave starts first and the stack grows upward. */
html.talk .face.is-current .wave {
  animation: wave-draw 1.75s linear both;
  animation-delay: calc(0.45s + var(--step) * 0.65s);
}

html.talk .face.is-leaving .wave {
  clip-path: none;
}

@keyframes wave-draw {
  from { clip-path: inset(0 calc(98.8% - var(--step) * 4.6%) -80% calc(1.2% + var(--step) * 4.6%)); }
  48% { clip-path: inset(0 calc(89.2% - var(--step) * 4.6%) -80% calc(1.2% + var(--step) * 4.6%)); }
  to { clip-path: inset(0 0 -80% 0); }
}

html.talk .wave-copy {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 1.85rem;
  min-width: 0;
  margin: 0;
  padding: 0 0 0.55rem calc(10.8% + var(--step) * 4.6% + 0.7rem);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  html.talk .wave {
    clip-path: none;
  }

  html.talk .face.is-current .wave {
    animation: none;
  }
}

html.talk .wave-year,
html.talk .wave-kind,
html.talk .wave-names {
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.15;
}

html.talk .wave-year {
  font-size: 1.55rem;
  letter-spacing: 0.04em;
}

html.talk .wave-kind {
  font-size: 1.12rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html.talk .wave-names {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.86);
}

html.talk .fast-plot {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

html.talk .fast-axis {
  color: rgba(255, 255, 255, 0.9);
}

html.talk .fast-old {
  color: rgba(255, 255, 255, 0.78);
}

html.talk .fast-now {
  color: var(--wave-now);
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--wave-now) 75%, transparent));
}

html.talk .kind-board {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(2.4rem, 7vh, 5rem);
  min-height: 0;
  padding: 0 1vw;
}

html.talk .kind-row {
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr);
  align-items: center;
  gap: 1.2rem 1.6rem;
}

html.talk .kind-name {
  margin: 0;
  color: #fff;
  font-family: var(--sans);
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

html.talk .kind-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
}

html.talk .kind-icon {
  justify-self: center;
  width: min(6.6rem, 16vw);
  color: #fff;
}

html.talk .kind-icon svg,
html.talk .kind-arrow {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

html.talk .kind-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html.talk .kind-icon svg circle {
  fill: currentColor;
  stroke: none;
}

html.talk .kind-arrow {
  width: min(3.1rem, 7vw);
  color: rgba(255, 255, 255, 0.9);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1100px) {
  html.talk .seq-caption {
    font-size: min(5rem, 7.2vw);
  }
}

@media (max-width: 860px) {
  html.talk .mode-waves,
  html.talk .mode-fast,
  html.talk .mode-kind {
    padding: 4.5rem 0.85rem 1rem;
  }

  html.talk .wave {
    min-height: 0;
    /* 0.85 is (40 − 6) / 40: the plateau's distance from the bottom of the
       viewBox. The rule stays under the copy when names wrap, and the
       curve hangs in this padding. */
    padding-bottom: calc(1.7rem * 0.85);
  }

  html.talk .wave-line {
    top: auto;
    bottom: 0;
    height: 1.7rem;
  }

  html.talk .wave-list {
    gap: 0.4rem;
  }

  html.talk .wave-copy {
    padding: 0.05rem 0 0.28rem calc(10.8% + var(--step) * 4.6% + 0.35rem);
    gap: 0.2rem 0.7rem;
  }

  html.talk .wave-year {
    font-size: 1rem;
  }

  html.talk .wave-kind {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
  }

  html.talk .wave-names {
    font-size: 0.62rem;
  }

  html.talk .seq-caption {
    font-size: min(2.75rem, 8.2vw);
    letter-spacing: 0.05em;
    margin-top: 0.85rem;
  }

  html.talk .kind-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
  }

  html.talk .kind-board {
    gap: 1.8rem;
  }

  html.talk .kind-icon {
    width: 3.1rem;
  }

  html.talk .kind-arrow {
    width: 1.15rem;
  }
}

@keyframes address-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

