@import url("appendix.css");

@font-face {
  font-family: Inter;
  src: url("fonts/inter-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("fonts/playfair-display-variable.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink: #261734;
  --muted: #655870;
  --paper: #faf8f4;
  --bauhinia: #642a80;
  --dark: #281733;
  --gold: #f2d7ad;
  --line: #dbd0dc;
  --serif: "Playfair Display", Georgia, serif;
  --sans: Inter, Arial, sans-serif;
  --controls-height: 54px;
}
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { overflow: hidden; background: #16111c; color: var(--ink); font: 21px/1.48 var(--sans); }
figure, blockquote, dl, dd, h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, [role="button"]:focus-visible { outline: 3px solid #ad79c5; outline-offset: 3px; }
#viewport { position: fixed; inset: 0 0 var(--controls-height); overflow: hidden; }
#deck {
  position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px;
  transform: translate(-50%, -50%) scale(var(--scale, 1)); transform-origin: center;
}
.slide {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  overflow: hidden; background: var(--paper); padding: 54px 93px 55px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.slide.active { opacity: 1; pointer-events: auto; }
.slide-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0 0 29px; color: #694c77; font-size: 15px; font-weight: 650;
}
.slide-head > :last-child, .slide-num { font-variant-numeric: tabular-nums; }
h1 {
  color: var(--ink); font: 800 65px/1.08 var(--serif);
  letter-spacing: -1.5px; margin-bottom: 14px;
}
h2 { font: 700 29px/1.19 var(--serif); }
.subtitle { font-size: 24px; color: var(--muted); max-width: 1110px; margin-bottom: 34px; }
.lead { font-size: 25px; line-height: 1.43; }
figcaption, .source { color: var(--muted); font: 16px/1.45 var(--sans); }
figcaption { margin-top: 8px; }
.source { margin-top: 22px; }
.phase { color: #704a80; font-size: 16px; font-weight: 700; }
.dark { background: var(--dark); color: #eee3f1; }
.dark h1, .dark h2 { color: #fff9fa; }
.dark .slide-head, .dark .phase { color: var(--gold); }

.cover {
  padding: 0; color: #fffaf3; background: var(--dark);
  display: grid; grid-template-columns: minmax(0, .77fr) minmax(0, 1fr);
}
.cover-copy { display: flex; flex-direction: column; justify-content: center; padding: 62px 70px 56px 92px; }
.classification { color: #dfc9e8; font-size: 15px; margin-bottom: 38px; }
.cover h1 { color: #fffaf3; font-size: 92px; margin-bottom: 14px; }
.cover h2 { color: var(--gold); font: 700 30px/1.2 var(--sans); margin-bottom: 29px; }
.cover p { color: #f1e7f3; font-size: 25px; line-height: 1.5; max-width: 490px; }
.cover-author { margin-top: 47px; font-size: 18px; color: #fffaf3; font-weight: 700; }
.cover-author span { display: block; color: #d9c4e0; font-size: 16px; font-weight: 400; }
.cover-art { position: relative; min-width: 0; min-height: 0; }
.cover-art img { width: 100%; height: 100%; object-fit: cover; object-position: 54% center; }
.cover-art figcaption {
  position: absolute; right: 22px; bottom: 22px; padding: 5px 10px;
  background: #281733e8; color: white; border-radius: 3px;
}

.product-layout { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr); gap: 38px; align-items: start; }
.product-layout figure img, .v0-media img { width: 100%; border-radius: 5px; border: 1px solid #d8ccd8; }
.world-media img { max-height: 518px; object-fit: contain; background: #f2ece2; }
.interface-media { margin-top: 22px; }
.interface-media img { max-height: 292px; object-fit: contain; background: #f2ece2; }
.media-button {
  margin-top: 13px; padding: 7px 0; font-size: 16px; font-weight: 700; cursor: pointer;
  color: var(--bauhinia); background: transparent; border: 0; border-bottom: 1px solid #bca0c5;
}
.media-button:hover { border-color: var(--bauhinia); }

.journey-slide h1 { max-width: 1150px; }
.journey-line {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  margin-top: 72px; position: relative;
}
.journey-line article { position: relative; border-top: 1px solid #8a6b97; padding: 29px 20px 0 0; }
.journey-line article::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 13px; height: 13px;
  border-radius: 50%; background: var(--gold);
}
.journey-line h2 { margin: 10px 0 13px; font-size: 34px; }
.journey-line p { font-size: 23px; line-height: 1.46; max-width: 390px; }
.journey-note {
  margin-top: 61px; padding: 19px 24px; border-left: 3px solid #d8b98a;
  color: #f6e6ce; font-size: 22px; background: #3a2548;
}

.evidence-layout {
  display: grid; grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
  gap: 38px; align-items: start;
}
.retention { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.retention caption { text-align: left; font: 700 26px/1.2 var(--serif); margin-bottom: 15px; }
.retention tr { border-bottom: 1px solid var(--line); }
.retention th, .retention td { padding: 16px 11px; text-align: right; }
.retention th:first-child { text-align: left; padding-left: 0; }
.retention thead { color: var(--muted); font-size: 16px; }
.retention tbody th { font-size: 19px; font-weight: 650; }
.retention tbody td { color: var(--bauhinia); font-size: 27px; font-weight: 760; }
.retention-block blockquote {
  font-size: 23px; font-family: var(--serif); line-height: 1.45; margin-top: 31px;
  border-left: 3px solid #b795c6; padding: 12px 20px; color: #40264c;
}
.retention-block cite { display: block; font: 14px/1.42 var(--sans); margin-top: 10px; color: var(--muted); }

.loop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px; padding: 0; margin: 16px 0 29px; list-style: none; }
.loop li { position: relative; padding: 21px 24px 23px; background: #efe7f1; border-top: 3px solid #8d5ba1; }
.loop li:not(:last-child)::after {
  content: '→'; position: absolute; left: 100%; width: 25px; top: 50%; text-align: center;
  transform: translateY(-50%); color: var(--bauhinia); font-size: 21px;
}
.loop h2 { font-size: 25px; margin-bottom: 11px; }
.loop p { font-size: 19px; line-height: 1.5; }
.loop-return { display: flex; align-items: center; gap: 8px; margin: -12px 0 15px; color: #684776; font-size: 17px; }
.loop-return > span { font-size: 24px; line-height: 1; }
.loop-return::after { content: ""; flex: 1; border-top: 1px solid #bba6c4; margin-left: 7px; }
.loop-distinction {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
  margin-top: 16px; padding-top: 19px; border-top: 1px solid var(--line);
}
.loop-distinction h2 { font: 700 21px/1.2 var(--sans); margin-bottom: 8px; }
.loop-distinction p { color: var(--muted); font-size: 19px; }

.engine-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.13fr); gap: 42px; }
.engine-mechanism { border-top: 1px solid var(--line); }
.engine-mechanism article { padding: 19px 14px 21px 0; border-bottom: 1px solid var(--line); }
.engine-mechanism h2 { margin-bottom: 6px; }
.engine-mechanism p { font-size: 20px; color: var(--muted); }
.benchmark { background: var(--dark); padding: 26px 31px 27px; color: #fffaff; }
.benchmark h2 { font-size: 29px; color: #fffaff; margin-bottom: 23px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 16px; align-items: baseline; }
.bar-row strong { font: 750 43px/1 var(--sans); color: var(--gold); }
.bar-row .track { grid-column: 1 / -1; height: 10px; background: #4a3355; }
.bar-row .bar { height: 100%; background: #e9c692; }
.bar-row.muted-bar .bar { background: #bc9fce; }
.bar-row.muted-bar strong { color: #dfcbe6; }
.benchmark figcaption { color: #e4d6e9; margin-top: 23px; }

.business-layout, .detail-layout {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 42px; margin-top: 42px;
}
.business-layout article, .detail-block { border-top: 2px solid #9871a5; padding: 23px 14px 15px 0; }
.business-layout .business-first { border-top: 4px solid var(--bauhinia); }
.business-layout h2 { font-size: 39px; margin: 10px 0 17px; max-width: 580px; }
.business-layout p:not(.phase) { color: #584b63; font-size: 24px; max-width: 560px; }
.business-layout p + p { margin-top: 14px; }

.team-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 25px; margin-top: 29px; }
.team-grid article { padding: 16px 10px 16px 0; border-top: 1px solid #cdbcd1; min-width: 0; }
.team-grid img { width: 127px; height: 127px; object-fit: cover; border: 1px solid #ccbad0; border-radius: 50%; margin-bottom: 24px; }
.team-grid h2 { font-size: 28px; }
.team-grid p { color: var(--muted); font-size: 19px; line-height: 1.38; }
.team-grid .role { font-size: 17px; font-weight: 750; color: var(--bauhinia); margin: 9px 0 10px; min-height: 49px; }

.roadmap { margin-top: 39px; border-top: 1px solid #cdbcd1; }
.roadmap article {
  display: grid; grid-template-columns: .86fr 1fr 2.25fr;
  align-items: baseline; gap: 24px; padding: 24px 0 26px; border-bottom: 1px solid #cdbcd1;
}
.roadmap .date { color: var(--bauhinia); font-size: 19px; font-weight: 750; }
.roadmap h2 { font-size: 31px; }
.roadmap article > :last-child { max-width: 710px; color: #544961; font-size: 23px; }

.detail-block h2 { margin-bottom: 14px; }
.detail-block dl > div { padding: 17px 6px 17px 0; border-bottom: 1px solid var(--line); }
.detail-block dt { font-size: 22px; font-weight: 750; color: #49245a; margin-bottom: 6px; }
.detail-block dd { font-size: 20px; color: var(--muted); }

.rs-appendix .slide-header { display: flex; justify-content: flex-end; margin-bottom: 14px; color: var(--muted); font-size: 15px; }
.rs-appendix .slide-label { display: none; }
.rs-appendix .eyebrow { font-size: 15px; color: #694c77; letter-spacing: 0; }
.rs-appendix .rs-appendix-title { font-size: 45px; }
.rs-appendix h2, .rs-appendix h3, .rs-appendix .rs-appendix-ip-index { font-family: var(--serif); }
.rs-appendix-ip-item { flex: 1 0 auto; align-content: start; padding-block: 13px; }

#controls {
  position: fixed; inset: auto 0 0; height: var(--controls-height); z-index: 5;
  display: flex; justify-content: center; align-items: center; gap: 9px;
  background: #16111c; color: #f7eefb; font: 14px/1.2 var(--sans);
}
#controls button, #controls a, .modal-header button {
  padding: 6px 11px; font-size: 14px; line-height: 1.4;
  border: 1px solid #594b64; border-radius: 4px; color: inherit; background: transparent; text-decoration: none; cursor: pointer;
}
#controls #prev, #controls #next { font-size: 21px; line-height: 1; }
#counter { min-width: 61px; text-align: center; font-variant-numeric: tabular-nums; }
#controls button:disabled { opacity: .45; cursor: default; }
#controls button:not(:disabled):hover, #controls a:hover { background: #3a2746; }
#progress { position: fixed; left: 0; top: 0; height: 2px; background: #ac77c4; z-index: 8; pointer-events: none; }
.overlay, .lightbox {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  z-index: 12; padding: 20px; background: #170e1cdb;
}
.overlay.open, .lightbox.active { display: flex; }
.modal { width: min(1030px,100%); max-height: 90vh; overflow: auto; padding: 23px; background: var(--paper); color: var(--ink); border-radius: 5px; }
.modal-header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 17px; }
#overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
#overview-grid button { padding: 12px; border: 1px solid var(--line); background: white; color: var(--ink); text-align: left; cursor: pointer; font-size: 15px; }
#overview-grid button span { display: block; color: var(--bauhinia); font-size: 13px; }
#overview-grid button[aria-current] { background: #eee2f0; }
#demo-video { display: block; max-height: 72vh; max-width: 100%; margin: auto; }
.lightbox img { max-height: 89vh; max-width: 100%; object-fit: contain; }
.lightbox button { position: absolute; top: 15px; right: 17px; color: white; background: #392842; border: 1px solid #896990; border-radius: 5px; cursor: pointer; }

body.read-mode { overflow: auto; background: #ece8e6; padding-bottom: var(--controls-height); }
.read-mode #viewport { position: static; overflow: visible; }
.read-mode #deck { position: static; width: auto; height: auto; transform: none; }
.read-mode .slide-frame { display: block; position: relative; height: calc(900px * var(--read-scale, 1)); margin-bottom: 12px; }
.read-mode .slide { width: 1600px; height: 900px; transform: scale(var(--read-scale, 1)); transform-origin: top left; opacity: 1; pointer-events: auto; }

@media screen and (max-width: 759.98px) {
  body { font-size: 16px; --controls-height: 49px; }
  .read-mode .slide-frame { height: auto; }
  .read-mode .slide {
    position: relative; inset: auto; width: 100%; height: auto; padding: 24px 21px 34px;
    transform: none; overflow: hidden;
  }
  .slide-head { font-size: 13px; margin-bottom: 15px; }
  h1 { font-size: clamp(33px, 8.8vw, 48px); letter-spacing: -.5px; margin-bottom: 10px; }
  h2, .business-layout h2, .journey-line h2 { font-size: 24px; }
  .subtitle, .lead { font-size: 17px; margin-bottom: 21px; }
  .read-mode .cover { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .cover-copy { padding: 35px 22px 30px; }
  .classification { margin-bottom: 23px; font-size: 13px; }
  .cover h1 { font-size: 52px; }
  .cover h2 { font-size: 21px; margin-bottom: 17px; }
  .cover p { font-size: 17px; }
  .cover-author { margin-top: 23px; font-size: 15px; }
  .cover-author span { font-size: 13px; }
  .cover-art { height: clamp(180px, 59vw, 430px); }
  .cover-art figcaption { font-size: 12px; bottom: 8px; right: 8px; }
  .product-layout, .evidence-layout, .engine-layout, .business-layout, .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 19px; }
  .interface-media { margin-top: 13px; }
  .product-details .lead { margin-bottom: 0; }
  figcaption, .source { font-size: 13px; }
  .journey-line, .loop { grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 15px; }
  .journey-line article { padding: 11px 0 0; }
  .journey-line article::before { display: none; }
  .journey-line p, .journey-note, .business-layout p:not(.phase), .roadmap article > :last-child { font-size: 16px; }
  .journey-line h2 { margin: 4px 0 5px; }
  .journey-note { margin-top: 16px; padding: 11px 13px; }
  .phase { font-size: 13px; }
  .retention th, .retention td { padding: 11px 4px; }
  .retention thead { font-size: 13px; }
  .retention tbody th { font-size: 14px; }
  .retention tbody td { font-size: 17px; }
  .retention-block blockquote { font-size: 17px; padding: 8px 11px; margin-top: 14px; }
  .loop li { padding: 13px; }
  .loop li:not(:last-child)::after { content: '↓'; top: 100%; left: 13px; transform: translateY(-2px); line-height: 20px; }
  .loop h2 { font-size: 20px; margin-bottom: 5px; }
  .loop p, .loop-distinction p, .engine-mechanism p, .detail-block dd { font-size: 16px; }
  .loop-return { margin: 0 0 14px; font-size: 14px; }
  .loop-return::after { display: none; }
  .loop-distinction { grid-template-columns: minmax(0, 1fr); row-gap: 15px; margin-top: 0; }
  .engine-mechanism article { padding: 12px 0 14px; }
  .benchmark { padding: 18px 16px; }
  .benchmark h2 { font-size: 23px; margin-bottom: 16px; }
  .bar-row strong { font-size: 32px; }
  .business-layout, .detail-layout { margin-top: 10px; }
  .business-layout article, .detail-block { padding-top: 12px; }
  .business-layout h2 { margin: 5px 0 10px; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin-top: 8px; }
  .team-grid article { padding: 13px 2px 8px 0; }
  .team-grid img { width: 82px; height: 82px; margin-bottom: 10px; }
  .team-grid h2 { font-size: 20px; }
  .team-grid .role { font-size: 13px; min-height: 0; }
  .team-grid p { font-size: 14px; }
  .roadmap { margin-top: 13px; }
  .roadmap article { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; }
  .roadmap h2 { font-size: 24px; }
  .roadmap .date { font-size: 15px; }
  .detail-block dt { font-size: 18px; }
  .rs-appendix .eyebrow { letter-spacing: 0; font-size: 13px; }
  .rs-appendix .rs-appendix-title { font-size: 31px; }
  .rs-appendix .rs-appendix-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .rs-appendix .rs-appendix-figure { padding: 12px; }
  .rs-appendix-figure-heading { flex-wrap: wrap; gap: 6px; }
  .rs-appendix-figure-heading > span { white-space: normal; }
  .rs-appendix-figure img { height: auto; flex: none; }
  .rs-appendix-proof-item, .rs-appendix-ip-item { flex: none; }
  .rs-appendix-proof-value { white-space: normal; }
  .rs-appendix .rs-appendix-economy-metrics { gap: 7px; }
  .rs-appendix .rs-appendix-economy-metrics strong { font-size: 24px; }
  .rs-appendix .rs-appendix-economy-metrics div > span { font-size: 13px; }
  .rs-appendix-ip-reference { overflow-wrap: anywhere; }
  #controls { gap: 5px; }
  #controls button, #controls a { font-size: 12px; padding-inline: 7px; }
  #counter { min-width: 48px; }
  #overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .slide { transition: none; } }
@media print {
  @page { size: 1600px 900px; margin: 0; }
  html, body, body.read-mode { width: 1600px; height: auto; padding: 0; overflow: visible; background: white; }
  #controls, #progress, .overlay, .lightbox { display: none !important; }
  #viewport, #deck { position: static !important; transform: none !important; width: 1600px; height: auto; overflow: visible; }
  .slide-frame, .read-mode .slide-frame { width: 1600px; height: 900px; break-after: page; margin: 0; }
  .slide-frame:last-child { break-after: auto; }
  .slide, .read-mode .slide {
    position: relative; width: 1600px; height: 900px; transform: none; opacity: 1;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}
