:root {
  --paper: #f5f5ef;
  --ink: #18201b;
  --orange: #ff5425;
  --muted: #667069;
  --rule: #d8dcd5;
  --green: #1e694e;
  --body: Arial, Helvetica, sans-serif;
  --display: "Arial Narrow", "Liberation Sans", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-underline-offset: .2em; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 5px; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
pre, code { font-family: var(--mono); }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.65; }
code { font-size: .84em; }
button, input, pre, p, dd { min-width: 0; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
.page { max-width: 1360px; margin: auto; padding: 0 56px; }
.masthead { display: flex; gap: 34px; align-items: center; min-height: 100px; border-bottom: 1px solid var(--ink); }
.wordmark { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: -.9px; text-decoration: none; }
.bind-mark { display: inline-block; width: 24px; height: 27px; border-left: 7px solid var(--orange); border-top: 7px solid var(--orange); border-bottom: 7px solid var(--orange); }
.edition { padding-left: 28px; border-left: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.page-links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.page-links a { text-decoration: none; }
.page-links a:hover, .repository-link:hover { text-decoration: underline; }
.opening { display: grid; grid-template-columns: 1.7fr 1fr; gap: 48px; align-items: end; padding: 62px 0 52px; }
.opening h1 { font: 700 clamp(46px, 5.7vw, 82px)/.99 var(--display); letter-spacing: -2.4px; }
.opening p { padding-bottom: 5px; max-width: 290px; font-size: 18px; line-height: 1.55; }
.film { margin-bottom: 52px; }
.film-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.film-heading h2 { font-size: 20px; letter-spacing: -.35px; }
.film-heading a { font-size: 13px; }
.film video { display: block; width: 100%; height: auto; border: 1px solid var(--ink); background: var(--ink); }
.film-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 25px; margin-top: 15px; font-size: 12px; color: var(--muted); }
.film-links a { color: var(--ink); }
.film-links span { margin-left: auto; }
.stage-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.stage-tab { position: relative; display: flex; gap: 14px; align-items: center; border: 0; background: transparent; color: var(--muted); text-align: left; padding: 21px 20px; font-size: 16px; font-weight: 600; }
.stage-tab + .stage-tab { border-left: 1px solid var(--rule); }
.stage-tab[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.stage-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 28px; top: 100%; border: 9px solid transparent; border-top-color: var(--ink); }
.stage-key { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; }
.stage-tab[aria-selected="true"] .stage-key { color: var(--ink); background: var(--orange); border-color: var(--orange); }
.recording-status { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 24px 0 0; }
#load-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border: 1px solid var(--muted); border-radius: 50%; }
.data-ready .status-dot { border-color: var(--green); background: var(--green); }
.text-button { padding: 3px 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.stage-intro { display: flex; gap: 32px; justify-content: space-between; align-items: end; padding: 32px 0 27px; }
.stage-intro h2 { font-size: 25px; font-weight: 700; letter-spacing: -.7px; line-height: 1.25; max-width: 560px; }
.stage-intro p { max-width: 345px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.boundary-sheet { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.source-sheet { position: relative; padding: 26px 32px 26px 0; border-right: 1px solid var(--rule); }
.source-heading-row, .boundary-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.source-heading-row h3, .boundary-heading-row h3 { font-size: 15px; font-weight: 700; }
#source-provenance { color: var(--muted); font-size: 11px; text-align: right; max-width: 140px; }
.source-fields { margin: 28px 0 18px; }
.source-field dt { color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.source-field dd { font-family: var(--mono); font-size: 18px; letter-spacing: -.5px; overflow-wrap: anywhere; }
.source-customer { margin-top: 22px; }
.source-customer dd { font-family: var(--display); font-weight: 700; font-size: clamp(38px, 5.7vw, 76px); line-height: 1.02; letter-spacing: -2px; }
.binding-pointer { position: absolute; height: 18px; width: 58px; right: -40px; top: 152px; z-index: 1; }
.binding-pointer span { display: block; height: 8px; margin-top: 5px; background: var(--orange); width: 100%; }
.binding-pointer::after { position: absolute; content: ""; right: -9px; top: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 14px solid var(--orange); }
[data-active-stage="0"] .binding-pointer span { background: repeating-linear-gradient(to right, var(--orange) 0 9px, transparent 9px 14px); }
.binding-note { border-left: 4px solid var(--orange); padding-left: 13px; margin: 24px 0 24px; }
.binding-note > span { font-size: 13px; font-weight: 700; }
.binding-note p { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 5px; max-width: 330px; }
.raw-details > summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.raw-details pre { margin-top: 14px; }
.binding-details { padding-top: 12px; border-top: 1px solid var(--rule); }
.command-details { margin-top: 12px; }
.boundary-evidence { padding: 26px 0 28px 48px; }
.boundary-heading-row code { color: var(--muted); font-size: 11px; }
.outcome-line { display: flex; align-items: flex-start; gap: 12px; padding: 28px 0 25px; }
.outcome-line p { font-size: 18px; line-height: 1.4; max-width: 340px; }
.outcome-badge { display: inline-block; flex-shrink: 0; padding: 4px 9px; font-size: 11px; line-height: 1.6; font-weight: 700; background: var(--rule); color: var(--muted); }
.outcome-badge.accepted { color: var(--green); background: #e0eae2; }
.outcome-badge.blocked, .outcome-badge.error { color: var(--ink); background: var(--orange); }
.outcome-badge.current { color: var(--ink); background: #e0eae2; }
.control-section { border-top: 1px solid var(--rule); padding-top: 17px; }
.control-section h4, .final-response h4 { font-size: 13px; font-weight: 700; }
.section-caption { font-size: 12px; line-height: 1.6; color: var(--muted); margin-top: 5px; max-width: 380px; }
.controls { margin-top: 15px; }
.control { border-top: 1px solid var(--rule); padding: 13px 0; }
.control:first-child { border-top: 0; }
.control summary { display: flex; gap: 14px; justify-content: space-between; align-items: center; cursor: pointer; font-size: 13px; }
.control summary::before { content: "+"; color: var(--muted); }
.control[open] summary::before { content: "−"; }
.control-label { margin-right: auto; }
.control pre { margin-top: 12px; color: var(--muted); }
.empty-note { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 500px; }
.model-section { padding: 29px 0 28px; }
.section-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 19px; }
.section-heading h3 { font-size: 20px; font-weight: 700; letter-spacing: -.45px; }
.section-heading > p { font-size: 12px; color: var(--muted); max-width: 380px; text-align: right; }
.model-calls { border-top: 1px solid var(--rule); }
.model-calls > .empty-note { padding: 20px 0; }
.call-row { border-bottom: 1px solid var(--rule); }
.call-row > summary { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; cursor: pointer; padding: 15px 0; list-style: none; }
.call-row > summary::-webkit-details-marker { display: none; }
.call-order { color: var(--muted); font-size: 12px; }
.call-name { font-family: var(--mono); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.call-customer { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.call-toggle { font-size: 19px; color: var(--muted); }
.call-row[open] .call-toggle { font-size: 0; }
.call-row[open] .call-toggle::after { content: "−"; font-size: 19px; }
.call-fields { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; padding: 2px 0 22px 42px; }
.call-fields h4 { color: var(--muted); font-size: 11px; font-weight: 400; margin-bottom: 9px; }
.final-response { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px; padding: 22px 0 0; }
.final-response p { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.playback-note { padding: 17px 0; border-top: 1px solid var(--ink); font-size: 12px; color: var(--muted); }
kbd { font: inherit; color: var(--ink); padding: 0 3px; border-bottom: 1px solid var(--muted); }
.installation { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 22px 48px; margin: 67px 0 62px; }
.installation h2 { font: 700 45px/1.08 var(--display); letter-spacing: -1.5px; margin-bottom: 18px; }
.installation p { font-size: 14px; line-height: 1.7; }
.repository-link { display: inline-block; font-size: 13px; font-weight: 600; margin-top: 22px; text-underline-offset: 4px; }
.install-code { padding: 23px 25px; border: 1px solid var(--ink); font-size: 12px; line-height: 1.9; }
.install-code code { font-size: inherit; }
.installation .install-note { grid-column: 2; font-size: 12px; color: var(--muted); }
footer { display: flex; gap: 24px; align-items: center; min-height: 85px; border-top: 1px solid var(--ink); font-size: 12px; }
footer > span { font-weight: 700; }
footer p { color: var(--muted); }
footer a { margin-left: auto; }

@media (min-width: 1450px) {
  .opening h1 { font-size: 84px; }
}

@media (max-width: 900px) {
  .page { padding: 0 30px; }
  .opening { gap: 25px; }
  .opening p { font-size: 15px; }
  .stage-tab { padding: 18px 12px; gap: 9px; font-size: 14px; }
  .stage-intro { gap: 25px; }
  .stage-intro h2 { font-size: 23px; }
  .stage-intro p { max-width: 285px; font-size: 12px; }
  .source-sheet { padding-right: 23px; }
  .source-heading-row { align-items: start; }
  #source-provenance { max-width: 100px; }
  .boundary-evidence { padding-left: 35px; }
  .outcome-line { display: block; }
  .outcome-line p { margin-top: 10px; font-size: 16px; }
  .boundary-heading-row { align-items: start; }
  .boundary-heading-row code { font-size: 10px; }
  .installation { gap: 20px 30px; }
  .install-code { padding: 17px; font-size: 11px; }
}

@media (max-width: 620px) {
  .film { margin-bottom: 34px; }
  .film-heading { display: block; }
  .film-heading h2 { font-size: 19px; }
  .film-heading a { display: inline-block; margin-top: 8px; }
  .film-links span { width: 100%; margin-left: 0; }
  .page { padding: 0 20px; }
  .masthead { min-height: 91px; gap: 10px; flex-wrap: wrap; align-content: center; padding: 13px 0; }
  .wordmark { font-size: 22px; }
  .bind-mark { height: 23px; width: 21px; border-width: 6px; }
  .edition { order: 3; width: 100%; padding: 0 0 0 33px; border: 0; font-size: 11px; }
  .page-links { font-size: 12px; gap: 18px; }
  .opening { display: block; padding: 36px 0 28px; }
  .opening h1 { font-size: clamp(45px, 11.7vw, 69px); letter-spacing: -1px; }
  .opening p { margin-top: 21px; font-size: 14px; max-width: 320px; }
  .opening p br { display: none; }
  .stage-tab { flex-direction: column; align-items: start; gap: 9px; padding: 14px 9px; line-height: 1.3; font-size: 12px; }
  .stage-key { width: 23px; height: 23px; font-size: 11px; }
  .stage-tab[aria-selected="true"]::after { left: 14px; border-width: 7px; }
  .recording-status { padding-top: 20px; gap: 12px; }
  #load-status, .text-button { font-size: 10px; }
  .stage-intro { display: block; padding: 25px 0 21px; }
  .stage-intro h2 { font-size: 23px; max-width: 330px; }
  .stage-intro p { margin-top: 9px; max-width: 330px; font-size: 12px; }
  .boundary-sheet { display: block; }
  .source-sheet { border-right: 0; padding: 22px 0 29px; }
  .source-heading-row h3, .boundary-heading-row h3 { font-size: 14px; }
  #source-provenance { font-size: 10px; max-width: 165px; }
  .source-fields { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; margin: 23px 0 15px; align-items: start; }
  .source-customer { margin-top: 0; }
  .source-field dd { font-size: 14px; line-height: 1.6; }
  .source-customer dd { font-size: 44px; line-height: 1.1; }
  .source-field dt { font-size: 11px; }
  .binding-note { margin: 18px 0; }
  .binding-pointer { top: auto; right: 28px; bottom: -19px; width: 8px; height: 40px; }
  .binding-pointer span { width: 8px; height: 34px; margin-top: 0; }
  .binding-pointer::after { right: -5px; top: 29px; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 14px solid var(--orange); border-bottom: 0; }
  [data-active-stage="0"] .binding-pointer span { background: repeating-linear-gradient(to bottom, var(--orange) 0 9px, transparent 9px 14px); }
  .boundary-evidence { border-top: 1px solid var(--rule); padding: 24px 0; }
  .boundary-heading-row code { font-size: 10px; margin-right: 0; }
  .outcome-line { display: flex; padding: 23px 0; }
  .outcome-line p { margin: 0; font-size: 16px; }
  .outcome-badge { font-size: 10px; }
  .model-section { padding: 24px 0; }
  .section-heading { display: block; }
  .section-heading h3 { font-size: 19px; }
  .section-heading > p { margin-top: 6px; text-align: left; font-size: 11px; }
  .call-row > summary { grid-template-columns: 17px minmax(0, 1fr) auto; gap: 8px; padding: 14px 0; }
  .call-name { font-size: 10px; }
  .call-customer { display: none; }
  .call-toggle { display: none; }
  .call-fields { display: block; padding: 2px 0 20px 25px; }
  .call-fields > div + div { margin-top: 18px; }
  .call-fields pre, .control pre, .binding-details pre, .command-details pre { font-size: 11px; }
  .final-response { display: block; padding-top: 20px; }
  .final-response p { margin-top: 9px; font-size: 12px; }
  .playback-note { font-size: 10px; line-height: 1.7; }
  .installation { display: block; margin: 41px 0; }
  .installation h2 { font-size: 38px; }
  .installation p { font-size: 13px; }
  .repository-link { font-size: 12px; margin: 15px 0 20px; }
  .install-code { padding: 16px 13px; font-size: 11px; line-height: 1.9; }
  .installation .install-note { font-size: 11px; margin-top: 13px; }
  footer { gap: 12px; flex-wrap: wrap; align-content: center; min-height: 89px; padding: 15px 0; font-size: 10px; }
  footer p { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
