.topbar { position: relative; z-index: 20; border-bottom: 1px solid var(--line); background: transparent; }
.topbar-inner { max-width: 1500px; min-height: 72px; margin: auto; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: block; flex: none; border-radius: 0; }
.brand img { display: block; width: auto; height: 40px; max-width: 180px; }
.toolbar { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.contents > summary { list-style: none; cursor: pointer; }
.contents > summary::-webkit-details-marker { display: none; }
.contents[open] > summary { border-color: var(--indigo); background: transparent; }
.contents-panel { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; width: min(480px, calc(100vw - 32px)); max-height: min(70vh, 620px); max-height: min(70dvh, 620px); overflow: auto; overscroll-behavior: contain; padding: 8px; border: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.contents-list { list-style: none; margin: 0; padding: 0; }
.contents-list a { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: baseline; gap: 12px; min-height: 48px; padding: 12px; border-radius: 0; color: var(--navy); text-decoration: none; font-size: 15px; line-height: 1.45; }
.contents-list a:hover, .contents-list a[aria-current="page"] { background: transparent; color: var(--ink); }
.contents-list a[aria-current="page"] { font-weight: 650; }
.chapter-number { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.control { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--navy); font-size: 14px; font-weight: 650; line-height: 1.4; }
.control:hover:not(:disabled) { border-color: var(--indigo); background: transparent; color: var(--ink); }
.control.primary { color: var(--ink); background: var(--indigo); border-color: var(--indigo); }
.control.primary:hover { background: transparent; color: var(--ink); }
.presentation-footer { background: transparent; }
.footer-inner { max-width: 1500px; margin: auto; padding: 14px 32px 18px; }
.narration-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.narration-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-size: 14px; cursor: pointer; }
.narration-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--indigo); cursor: pointer; }
.narration-status { flex-basis: 100%; margin: 0; font-size: 14px; color: var(--muted); }
.narration-timeline { display: flex; align-items: center; gap: 16px; margin: 12px 0 14px; }
#seek { display: block; flex: 1; min-width: 0; height: 24px; margin: 0; accent-color: var(--indigo); cursor: pointer; }
.narration-time { flex: none; min-width: 86px; text-align: right; font-size: 14px; font-variant-numeric: tabular-nums; }
.chapter-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chapter-navigation p { color: var(--muted); font-size: 14px; margin: 0; text-align: center; }
.progress-track { height: 3px; background: transparent; }
.progress-fill { height: 100%; width: 0; background: var(--indigo); }
@media (min-width: 960px) {
  .topbar-inner { min-height: 60px; padding-block: 8px; }
  .footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding-block: 8px 10px; }
  .narration-player { display: grid; grid-template-columns: auto minmax(160px, 1fr); align-items: center; gap: 16px; min-width: 0; }
  .narration-controls { row-gap: 2px; }
  .narration-status { contain: inline-size; }
  .narration-timeline { margin: 0; }
  .chapter-navigation { gap: 8px; }
  #previous-label, #next-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .chapter-navigation > .control { padding-inline: 11px; }
}
@media (max-width: 600px) {
  .topbar-inner { min-height: 64px; padding: 10px 16px; gap: 8px; flex-wrap: wrap; }
  .brand img { height: 32px; max-width: 144px; }
  .toolbar { gap: 8px; margin-left: auto; }
  #fullscreen { padding-inline: 10px; }
  #fullscreen span { display: none; }
  .footer-inner { padding: 12px 16px 14px; }
  .narration-timeline { gap: 10px; margin-block: 8px 10px; }
  .chapter-navigation { gap: 8px; flex-wrap: wrap; }
  .chapter-navigation p { order: -1; width: 100%; }
  .chapter-navigation > .control { flex: 1 1 0; }
}

@font-face {
  font-family: D-DIN;
  src: url('fonts/D-DIN.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3VF-Upright.otf') format('opentype');
  font-weight: 200 900;
  font-display: swap;
}
:root {
  --paper: #f8f8f5;
  --ink: #181c1c;
  --rule: #c1c7c1;
  --muted: #4f5956;
  --panel: #e8ebe6;
  --heading: D-DIN, Arial, sans-serif;
  --mono: ui-monospace, Menlo, monospace;
  --navy: var(--ink);
  --indigo: var(--ink);
  --indigo-deep: var(--muted);
  --indigo-tint: var(--panel);
  --line: var(--rule);
  font-family: 'Source Sans 3', Arial, sans-serif;
  background: var(--paper);
}
body { min-width: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.topbar, .presentation-footer { background: var(--paper); line-height: 1.5; }
.topbar-inner { min-height: 60px; }
.brand {
  width: max-content;
  color: var(--ink);
  text-decoration: none;
  font: 400 28px/1.05 var(--heading);
  letter-spacing: -.025em;
}
.brand:hover { text-decoration: underline; text-underline-offset: .15em; }
.control, .scene-step-picker select {
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  color-scheme: light;
  font: 600 15px/1.3 'Source Sans 3', Arial, sans-serif;
}
.control:hover:not(:disabled), .control[aria-pressed='true'], .contents[open] > summary,
.scene-step-picker select:hover { background: var(--panel); color: var(--ink); }
.control.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.control.primary:hover:not(:disabled) {
  background: var(--muted);
  border-color: var(--muted);
  color: var(--paper);
}
.control:disabled { opacity: .4; }
.icon { stroke-width: 1.4; }
.contents-panel { background: var(--paper); border-radius: 0; box-shadow: none; }
.contents-list li + li { margin-top: 0; border-top: 1px solid var(--rule); }
.contents-list a { border-radius: 0; overflow-wrap: anywhere; }
.contents-list a:hover, .contents-list a[aria-current='page'] { background: var(--panel); color: var(--ink); }
.contents-list a[aria-current='page'] { font-weight: 650; }
.contents-list a:focus-visible { outline-offset: -2px; }
.chapter-number { color: var(--muted); font: 500 11px/1.5 var(--mono); }
.slide {
  padding-inline: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
h1, #scene h3, .prototype-scene .scene-heading {
  font-family: var(--heading);
  font-weight: 400;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
h1 { font-size: clamp(30px, 3.2vw, 48px); line-height: 1.06; }
.summary { max-width: 78ch; color: var(--muted); overflow-wrap: anywhere; }
.eyebrow, .scene-meta, #scene-count, .step-category, .prototype-scene .overview-kicker,
.prototype-scene .overview-kicker-number, #chapter-progress, .narration-time {
  color: var(--muted);
  font: 500 11px/1.5 var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
}
.narration-time { letter-spacing: 0; }
.caption, figcaption, .step-detail, .completion { color: var(--muted); }
.stage { padding-top: 14px; border-top: 1px solid var(--rule); }
.step-list { border-color: var(--rule); }
.step-button { border-radius: 0; border-left-width: 1px; color: var(--ink); overflow-wrap: anywhere; }
.step-button:hover, .step.is-current .step-button { background: var(--panel); }
.step.is-current .step-button { border-left-color: var(--ink); }
.step-title, .step.is-current .step-title { color: var(--ink); }
.step.is-future .step-button { opacity: 1; }
.step.is-future .step-title { color: var(--muted); }
.presentation-footer { border-top: 1px solid var(--rule); }
.narration-status:not(:empty) { color: var(--muted); }
.progress-track { height: 2px; border-radius: 0; background: var(--rule); }
.progress-fill { background: var(--ink); }
#seek {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  background: transparent;
}
#seek::-webkit-slider-runnable-track { height: 2px; background: var(--muted); }
#seek::-moz-range-track { height: 2px; background: var(--muted); }
#seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border-radius: 0;
  background: var(--ink);
}
#seek::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 0; background: var(--ink); }
#seek:disabled { opacity: .5; cursor: default; }

/* The published diagrams retain their layout, state and geometry. Give the
   diagram marks (not the surrounding boxes) ink, and mask intersecting lines
   with the same paper as the slide. */
#scene .foundry-scene { padding-inline: 0; border: 0; }
#scene .fw-brand {
  width: auto;
  color: var(--ink);
  font: 400 clamp(24px, 3vw, 40px)/1.02 var(--heading);
  letter-spacing: -.025em;
}
#scene .foundry-scene :is(h3, p, span, strong, li), .prototype-scene * { overflow-wrap: anywhere; }
:is(#scene, #diagram) svg :is(path, rect, circle, line, polyline, polygon, ellipse) {
  vector-effect: non-scaling-stroke;
  stroke-width: 1.15;
}
#diagram .prototype-scene { --scene-line: var(--muted); }
#diagram :is(.scene-icon, .breaker-gate, .mcp-mark) { color: var(--ink); }
#diagram [data-step].is-future { opacity: .72; }
#diagram .overview-scene .overview-panel { outline: none; }
#diagram :is(.overview-agenda-number, .sup-order) { border: 1px solid var(--muted); }
#diagram :is(.capacity-slot, .capacity-limit, .sup-pip-used, .sup-gauge-fill, .store-progress),
#diagram :is(.cfg-source, .upd-package, .ops-status, .ops-stream, .int-live-indicator, .mcp-entry)::before,
#diagram .store-crash::before, #diagram .store-crash::after, #scene .fps-arrow,
#scene .fw-sequence-stamp-compact > span, #scene .fv-story-stop::before { background: var(--ink); }
#diagram :is(.sup-gauge, .store-track) { background: var(--rule); }
#diagram .capacity-overflow .capacity-slot { border: 1px dashed var(--ink); background: transparent; }
#diagram .ops-silent .ops-status::before { border: 1px solid var(--ink); background: transparent; }
#diagram .cfg-toggle { border-radius: 0; background: var(--muted); }
#diagram .cfg-toggle::after, #diagram :is(.security-record, .federation-link) > .scene-icon,
#scene .fv-link-label { background: var(--paper); }
#diagram .sch-lost-zone { border-style: dashed; }
#scene .fp-engineering .fp-eng-broken-line::after { border-top: 1px dashed var(--ink); }
@container foundry-visual (max-width: 520px) {
  #scene .fp-engineering .fp-eng-broken-line::after { border-top: 0; border-left: 1px dashed var(--ink); }
}
/* Leave the desktop seek control room to shrink at the edge of its breakpoint. */
@media (min-width: 960px) {
  .narration-player { grid-template-columns: auto minmax(120px, 1fr); }
}
@media (max-width: 620px) {
  .topbar-inner { min-height: auto; flex-wrap: nowrap; }
  .brand { min-width: 0; width: auto; flex: 0 1 auto; font-size: clamp(18px, 5.6vw, 24px); }
  .slide { padding-top: 14px; }
  .stage { padding-top: 10px; }
}
/* Presentation title follows the player language. */
html[lang="en"] .brand-da, html:not([lang="en"]) .brand-en { display: none; }
/* Chapter 2: the "one big program?" label sits above the dashed module boundary, not on it. */
.modules-scene .modules-processes { margin-top: 40px; }
.modules-scene .modules-monolith-label { top: auto; bottom: calc(100% + 8px); left: 0; max-width: 100%; background: var(--paper); }
/* The embedded close control takes its own row on narrow screens. */
@media (max-width: 720px) {
  .chapter-navigation { flex-wrap: wrap; }
  #close-presentation { order: 10; flex: 1 0 100%; justify-content: center; }
}
