:root {
  color-scheme: light;
  --paper: #fcfbf8;
  --ink: #243444;
  --muted: #71808c;
  --line: #d9dcd9;
  --blue: #3c6b9e;
  --orange: #bf682e;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
button:disabled { opacity: .28; cursor: default; }
.deck { min-height: 100svh; display: flex; flex-direction: column; }
header { height: 76px; margin: 0 4.5vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 20px; text-decoration: none; }
.brand b { font-size: 19px; letter-spacing: -.8px; color: var(--blue); }
.brand span { font-size: 12px; color: #647582; border-left: 1px solid #bfc8cc; padding-left: 20px; }
.header-actions { display: flex; align-items: center; gap: 25px; }
#notes { background: none; padding: 8px 0; border: 0; color: var(--muted); font-size: 11px; }
.icon { border: 1px solid #c9d0d4; background: transparent; width: 38px; height: 36px; display: inline-grid; place-items: center; border-radius: 3px; font-size: 20px; }
.icon:hover:not(:disabled) { background: #e9eef2; }
.icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; }
#fullscreen { border-color: transparent; color: var(--muted); }
#stage { flex: 1; display: flex; flex-direction: column; padding: 30px 4.5vw 0; }
.heading { flex-shrink: 0; }
#chapter-label { margin: 0 0 12px; font: 11px 'Courier New', monospace; color: #77858b; }
h1 { margin: 0; font-size: clamp(31px, 3.25vw, 52px); font-weight: 500; letter-spacing: -1.7px; line-height: 1.15; }
#subtitle { margin: 17px 0 0; color: #657783; font-size: clamp(13px, 1.15vw, 17px); line-height: 1.55; max-width: 1100px; }
.figure-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 38px; align-items: center; flex: 1; min-height: 420px; padding: 25px 0 18px; }
#explanation { min-width: 0; align-self: center; }
.diagram { min-width: 0; }
.diagram-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 7.5%; font: 11px 'Courier New', monospace; letter-spacing: .2px; color: #697e8e; margin-bottom: 3px; }
#diagram-label { color: var(--blue); }
#diagram-status.at-limit { color: var(--orange); }
#package { display: block; width: 100%; max-height: 485px; overflow: visible; }
.package-edge { fill: #f4f4f0; stroke: #acb7bc; stroke-width: 1.2; }
.package-label { fill: #71838c; font: 10px 'Courier New', monospace; letter-spacing: 1px; }
.links path { fill: none; stroke: #a6b7c4; stroke-width: 2; }
.xpu-under { fill: #bbc4cb; stroke: #647889; stroke-width: 1; }
.xpu-body { fill: #dbe5ed; stroke: #4c677c; stroke-width: 1.3; }
.xpu-inner { fill: none; stroke: #93a9bb; stroke-width: 1; }
.xpu-title { fill: #2a4d6c; font: 500 32px 'Segoe UI', Arial, sans-serif; letter-spacing: 1px; }
.xpu-subtitle { fill: #667f94; font: 10px 'Courier New', monospace; letter-spacing: 2px; }
#center-note { fill: #566f83; font: 12px 'Segoe UI', Arial, sans-serif; }
.physical-layers rect { fill: #dae2e9; stroke: #8da4b5; stroke-width: .8; }
.memory-face { fill: #f8fbfd; stroke: #6f8ca5; stroke-width: 1.1; }
.memory-name { font: 600 11px 'Segoe UI', Arial, sans-serif; fill: #395f85; letter-spacing: .3px; }
.memory-level { font: 9px 'Courier New', monospace; fill: #758a9a; }
.empty-slots rect { fill: #eaf0f4; }
.reserved { fill: url(#reserved); stroke: #c5c6c2; stroke-width: .5; }
.reserved-label { fill: #747d80; font: 6.5px 'Courier New', monospace; letter-spacing: .2px; }
.band-id { fill: #fff; font: bold 7px 'Courier New', monospace; }
.hardware-face { display: none; }
.hardware-face path { fill: #e3edf5; stroke: #89a5be; stroke-width: .8; }
.hardware-face text { fill: #6c8dab; font: 10px 'Courier New', monospace; }
.hardware-mode .hardware-face { display: block; }
.hardware-mode .empty-slots, .hardware-mode .reserved, .hardware-mode .reserved-label { visibility: hidden; }
#hardware-callout path { fill: none; stroke: #b0bec8; stroke-width: 1; }
#hardware-callout text { fill: #80929f; font: 10px 'Segoe UI', Arial, sans-serif; }
.package-footnote { fill: #778994; font: 10px 'Segoe UI', Arial, sans-serif; }
.flash-face { display: none; }
.is-flash .physical-layers rect { fill: #eac5a4; stroke: #b88054; }
.is-flash .memory-face { fill: #fff0e0; stroke: #be7c49; }
.is-flash .hardware-face { display: none; }
.is-flash .flash-face { display: block; }
.is-flash .memory-name { fill: #aa591f; }
.flash-face text { fill: #b16631; font: 8px 'Courier New', monospace; }
.flash-face .flash-capacity { fill: #a75e27; font: 26px 'Segoe UI', Arial, sans-serif; letter-spacing: -1px; }
.flash-capacity tspan { font-size: 11px; letter-spacing: 0; }
.legend { display: flex; justify-content: center; align-items: center; gap: 25px; min-height: 23px; color: #6c7c86; font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 11px; height: 8px; border: 1px solid #aebdc9; }
.reserved-key { background: repeating-linear-gradient(135deg, #d1d1cb 0 2px, #e9e7e2 2px 5px); border-color: #c1c3bd; }
.cache-key { background: var(--blue); border-color: var(--blue); }
.free-key { background: #eaf0f4; }
.hbf-key { background: #eac5a4; border-color: #b88054; }
.side-label { font-size: 14px; color: #526a7b; }
.side-view svg { display: block; width: 100%; margin-top: 4px; overflow: visible; }
.cross-die rect { fill: #d7e7f4; stroke: #658fb3; stroke-width: .8; }
.cross-die path { fill: none; stroke: #83a8c6; stroke-width: 1.8; }
.cross-die { animation: separate-dies 1.1s cubic-bezier(.2,.7,.2,1) both; }
.logic-base { fill: #758fa8; }
.side-view .callout { fill: none; stroke: #9fafba; stroke-width: 1; }
.side-view text { font-size: 9px; fill: #697f91; }
.side-view p { font-size: 12px; line-height: 1.8; color: #758690; margin: 7px 0 0; }
.batch-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1px solid #d4dcdF; padding-bottom: 10px; margin-bottom: 8px; }
.batch-heading h2 { font-weight: 500; font-size: 14px; margin: 0; }
.batch-heading>span { font-size: 10px; color: #8b969c; }
.users { display: flex; flex-direction: column; gap: 2px; }
.user-row { display: flex; gap: 9px; align-items: center; height: 31px; padding: 3px 4px; color: #457096; border-bottom: 1px solid #edf0ef; }
.person { height: 24px; width: 19px; fill: none; stroke: currentColor; stroke-width: 1.3; flex-shrink: 0; }
.user-id { font: 11px 'Courier New', monospace; }
.user-history { display: flex; gap: 3px; margin-left: 4px; }
.user-history i { width: 17px; height: 10px; background: #83a1bf; border: 1px solid #638bae; }
.user-status { font-size: 9px; color: #7b8fa0; margin-left: auto; }
.user-row.waiting { color: #b56832; background: #fcf1e6; border-bottom-color: #eddfd2; }
.waiting .user-history i { background: #f2d2b6; border-color: #d79b6c; }
.waiting .user-status { color: #ba7945; }
.dense .user-row { height: 26px; }
.dense .person { height: 20px; }
.history-stages { margin-top: 22px; display: flex; flex-direction: column; gap: 9px; font-size: 11px; color: #afb8bf; }
.history-stages span { border-left: 2px solid #e0e5e8; padding-left: 10px; }
.history-stages .active { border-left-color: var(--blue); color: #4d7296; }
.controls { display: flex; gap: 12px; margin-bottom: 20px; }
.controls label { font-size: 10px; color: #71818d; display: flex; flex-direction: column; gap: 8px; flex: 1; }
select { display: block; width: 100%; padding: 7px 9px; border: 1px solid #b7c7d4; border-radius: 3px; background: #fff; font-size: 12px; color: #375a7b; cursor: pointer; }
.hbf-definition { padding-left: 4px; }
.orange-rule { display: block; width: 35px; height: 3px; background: var(--orange); margin-bottom: 15px; }
.hbf-definition h2 { font-size: 30px; font-weight: 500; margin: 0; letter-spacing: -.7px; color: var(--orange); }
.hbf-definition>p { color: #9a795d; font-size: 12px; margin: 8px 0 20px; }
.hbf-definition dl { margin: 0; }
.hbf-definition dl>div { margin: 0 0 19px; }
.hbf-definition dt { color: #7e8588; font-size: 11px; margin-bottom: 3px; }
.hbf-definition dd { margin: 0; font-size: 37px; line-height: 1.2; letter-spacing: -1.5px; color: #aa602c; font-weight: 400; }
.hbf-definition dd span { font-size: 13px; letter-spacing: 0; margin-left: 8px; color: #957559; }
.hbf-definition .small-note { font-size: 10px; line-height: 1.8; color: #a1978c; margin: 23px 0 0; }
.takeaway { min-height: 67px; padding: 17px 0 23px; display: flex; align-items: baseline; gap: 16px; border-top: 1px solid var(--line); }
#takeaway-number { color: #9aa5a9; font: 10px 'Courier New', monospace; }
#takeaway { font-size: 13px; line-height: 1.6; color: #526776; margin: 0; }
.illustration-note { font-size: 9px; color: #94a0a6; margin-left: auto; flex-shrink: 0; }
footer { margin: 0 4.5vw; border-top: 1px solid var(--line); height: 72px; display: flex; align-items: center; gap: 30px; flex-shrink: 0; }
.page { color: #9ba6ad; font: 10px 'Courier New', monospace; white-space: nowrap; }
#page { color: #38566d; margin-right: 6px; }
#chapters { display: flex; align-items: center; gap: 20px; flex: 1; }
#chapters button { font-size: 11px; padding: 8px 0; background: none; border: 0; color: #8a989f; white-space: nowrap; border-bottom: 2px solid transparent; }
#chapters button[aria-current] { border-color: var(--blue); color: var(--blue); }
.navigation { display: flex; gap: 8px; align-items: center; }
#next-label { font-size: 10px; color: #798d9c; margin-right: 11px; }
.next { color: white; background: var(--blue); border-color: var(--blue); }
.next:hover:not(:disabled) { background: #315b86; }
.flying-fragment { position: fixed; pointer-events: none; z-index: 5; width: 27px; height: 17px; font: 9px 'Courier New', monospace; display: grid; place-items: center; background: #3c6b9e; color: #fff; border: 1px solid #2f5b89; border-radius: 1px; opacity: 0; }
.flying-fragment.rejected { color: #9e561e; background: #f8d7b6; border-color: #c18b5d; }
dialog { background: var(--paper); border: 1px solid #b8c4ca; color: #5d6e7a; border-radius: 5px; max-width: 650px; width: calc(100% - 40px); padding: 32px; }
dialog::backdrop { background: #233c5260; }
dialog h2 { font-size: 24px; font-weight: 500; color: var(--ink); margin-top: 5px; }
dialog h3 { font-size: 13px; font-weight: 600; margin-top: 24px; color: var(--ink); }
dialog p { font-size: 12px; line-height: 1.8; }
dialog a { display: block; font-size: 12px; color: var(--blue); line-height: 2; text-underline-offset: 3px; }
.close { position: absolute; right: 13px; top: 13px; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@keyframes separate-dies { from { transform: translateY(calc(var(--layer)*9px)); } to { transform: translateY(0); } }
@media (min-width: 1650px) {
  .figure-layout { grid-template-columns: 300px minmax(0,1fr); gap: 70px; }
  #package { max-height: 570px; }
  .user-row { height: 39px; }
  .dense .user-row { height: 32px; }
  .user-status { font-size: 11px; }
  .user-id { font-size: 13px; }
  .batch-heading h2 { font-size: 16px; }
}
@media (min-width: 761px) and (max-height: 800px) {
  header { height: 58px; }
  #stage { padding-top: 20px; }
  #chapter-label { margin-bottom: 8px; }
  h1 { font-size: 36px; }
  #subtitle { font-size: 13px; margin-top: 11px; }
  .figure-layout { min-height: 355px; padding-top: 17px; padding-bottom: 10px; grid-template-columns: 210px minmax(0,1fr); gap: 25px; }
  #package { max-height: 385px; }
  .side-view svg { max-height: 185px; }
  .user-row { height: 26px; }
  .dense .user-row { height: 22px; }
  .person { height: 21px; }
  .controls { margin-bottom: 14px; }
  .controls label { font-size: 9px; }
  .history-stages { margin-top: 15px; }
  .takeaway { min-height: 54px; padding: 13px 0 16px; }
  footer { height: 58px; }
  .hbf-definition dl>div { margin-bottom: 13px; }
  .hbf-definition dd { font-size: 31px; }
}
@media (max-width: 1050px) and (min-width: 761px) {
  .figure-layout { grid-template-columns: 190px minmax(0,1fr); gap: 15px; }
  #chapters { gap: 12px; }
  #chapters button { font-size: 10px; }
  #next-label { max-width: 110px; font-size: 9px; }
  .user-history i { width: 12px; }
  .user-row { gap: 7px; }
  .illustration-note { display: none; }
}
@media (max-width: 760px) {
  header { height: 62px; margin: 0 6vw; }
  .brand { gap: 10px; }
  .brand span { padding-left: 10px; font-size: 10px; }
  .header-actions { gap: 10px; }
  #notes { font-size: 9px; }
  #fullscreen { display: none; }
  #stage { padding: 25px 6vw 0; }
  h1 { font-size: 31px; letter-spacing: -1px; }
  #chapter-label { font-size: 10px; }
  #subtitle { font-size: 13px; line-height: 1.7; margin-top: 13px; }
  .figure-layout { display: flex; flex-direction: column; align-items: stretch; gap: 30px; padding-top: 25px; min-height: 0; }
  #explanation { width: 100%; }
  .side-view { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0 12px; }
  .side-label { grid-column: 1 / 3; font-size: 13px; }
  .side-view svg { width: 100%; }
  .side-view p { font-size: 10px; }
  .diagram { margin: 0 -4vw; }
  .diagram-heading { font-size: 9px; }
  #package { min-height: 220px; }
  .legend { gap: 15px; font-size: 9px; }
  .users { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
  .user-row, .dense .user-row { height: 28px; gap: 5px; }
  .user-id { font-size: 10px; }
  .person { height: 20px; width: 15px; }
  .user-history { gap: 2px; margin-left: 2px; }
  .user-history i { width: 9px; height: 8px; }
  .user-status { font-size: 8px; }
  .controls { max-width: 100%; }
  .history-stages { flex-direction: row; gap: 12px; margin-top: 20px; font-size: 9px; }
  .history-stages span { padding-left: 7px; }
  .hbf-definition { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
  .orange-rule { grid-column: 1 / 3; margin-bottom: 10px; }
  .hbf-definition h2 { grid-column: 1; }
  .hbf-definition>p { grid-column: 1; margin: 4px 0 0; }
  .hbf-definition dl { grid-column: 2; grid-row: 2 / 5; }
  .hbf-definition dd { font-size: 30px; }
  .hbf-definition .small-note { grid-column: 1; font-size: 9px; margin-top: 15px; }
  .takeaway { margin-top: 10px; gap: 10px; }
  #takeaway { font-size: 12px; }
  .illustration-note { display: none; }
  footer { margin: 0 6vw; height: auto; min-height: 100px; display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 13px 0; }
  #chapters { grid-row: 2; grid-column: 1/3; justify-content: space-between; gap: 8px; }
  #chapters button { font-size: 10px; }
  .page { grid-column: 1; grid-row: 1; }
  .navigation { grid-column: 2; grid-row: 1; }
  #next-label { font-size: 9px; margin-right: 6px; }
  .icon { width: 32px; height: 30px; }
  dialog { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 761px) {
  .deck { height: 100svh; min-height: 650px; }
  #stage { min-height: 0; }
  .figure-layout { min-height: 0; align-items: stretch; }
  .diagram { min-height: 0; display: flex; flex-direction: column; }
  #package { flex: 1; min-height: 0; max-height: none; }
  .diagram-heading, .legend { flex-shrink: 0; }
}
#hardware-callout text { font-size: 12px; }

/* KV backing memory and HBF integration scenes. */
.flow-step { margin: 0 0 12px; color: #8b8f8e; font: 10px 'Courier New', monospace; letter-spacing: .5px; }
.offload-panel h2, .integration-explanation h2 { font-size: 20px; font-weight: 500; line-height: 1.3; margin: 0 0 20px; color: #34566f; }
.host-memory { border: 1px solid #aab8bd; background: #f0f2ef; padding: 17px 15px; }
.host-label { color: #83908c; font: 9px 'Courier New', monospace; letter-spacing: 1px; }
.host-memory h3 { font-size: 24px; font-weight: 500; margin: 7px 0 4px; letter-spacing: -.5px; }
.host-memory>p { color: #788a90; font-size: 11px; margin: 0 0 15px; }
.host-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.host-slot { height: 26px; display: grid; place-items: center; border: 1px dashed #c4cecd; color: #b2bdbb; font: 10px 'Courier New', monospace; }
.host-slot.stored { background: #dce8f3; border: 1px solid #94afc4; color: #416787; }
.flow-summary { font-size: 11px; line-height: 1.8; color: #748590; margin: 15px 0 0; }
#host-link text { font: 9px 'Courier New', monospace; fill: #7d8c91; }
#host-link .host-rate { font-size: 10px; }
.host-link-path { fill: none; stroke: #9bafba; stroke-width: 1.6; stroke-dasharray: 5 4; }
#host-link.moving .host-link-path { stroke: #bf682e; stroke-dasharray: none; stroke-width: 2; }
#host-link.restoring .host-link-path { stroke: #3c6b9e; }
.transfer-fragment { background: #6b8ba8; border-color: #456c8b; }
#stage[data-mode='comparison'] .figure-layout { grid-template-columns: 230px minmax(0,1fr); }
#stage[data-mode='comparison'] .diagram { justify-content: center; }
#stage[data-mode='comparison'] .diagram-heading { padding: 0; margin-bottom: 17px; font-size: 10px; }
#comparison[hidden] { display: none; }
.memory-types>div { margin: 0 0 30px; }
.type-marker { display: block; height: 3px; width: 28px; background: #3c6b9e; margin-bottom: 12px; }
.type-marker.orange { background: #bf682e; }
.memory-types h2 { font-size: 29px; font-weight: 500; letter-spacing: -.8px; margin: 0; color: #3c6b9e; }
.memory-types>div:nth-child(2) h2 { color: #bf682e; }
.memory-types p { font-size: 12px; line-height: 1.8; color: #788891; margin: 5px 0 0; }
.memory-types .comparison-note { max-width: 210px; font-size: 11px; }
.spec-comparison { border-collapse: collapse; width: 100%; table-layout: fixed; }
.spec-comparison th, .spec-comparison td { padding: 22px 15px; border-bottom: 1px solid #d6dddd; text-align: left; vertical-align: middle; }
.spec-comparison thead th { padding-top: 12px; padding-bottom: 20px; color: #3c6b9e; font-size: 22px; font-weight: 500; border-top: 1px solid #bdcbd6; }
.spec-comparison thead th:first-child { font-size: 12px; color: #7d8b92; font-weight: 400; }
.spec-comparison thead th:nth-child(3) { color: #b66429; }
.spec-comparison th small { display: block; font-size: 10px; font-weight: 400; color: #89959b; margin-top: 5px; }
.spec-comparison tbody th { color: #607888; font-size: 13px; font-weight: 400; }
.spec-comparison td { font-size: 33px; font-weight: 400; color: #3c6b9e; letter-spacing: -1px; white-space: nowrap; }
.spec-comparison td:nth-child(3) { color: #b66429; background: #faf2e9; }
.spec-comparison td span { font-size: 12px; letter-spacing: 0; }
.comparison-source { font-size: 9px; color: #8a959a; line-height: 1.8; margin: 15px 0 0; }
.comparison-source a { color: #708796; text-underline-offset: 3px; }
.integration-explanation>p:not(.flow-step) { font-size: 12px; line-height: 1.8; color: #748591; }
.integration-explanation .route-note { font-size: 11px; }
.read-route { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; margin: 14px 0; }
.read-route span { font-size: 12px; padding: 7px 11px; border: 1px solid #b4c6d4; background: #f0f5f9; color: #496d8c; }
.read-route span:first-child { border-color: #d4a57f; background: #fcf0e4; color: #b5723e; }
.read-route i { font-style: normal; font-size: 15px; color: #8da0ac; margin-left: 14px; }
.rate-label rect { fill: var(--paper); fill-opacity: .95; }
.rate-label text { fill: #4b7296; font: 11px 'Courier New', monospace; }
.rate-label.hbf-rate text { fill: #b06932; }
.chain-link { stroke: #bf8a5e; stroke-width: 2; fill: none; }
.forwarding-callout { stroke: #9aaab5; stroke-width: 1; fill: none; }
.forwarding-label { fill: #7d8e98; font: 10px 'Segoe UI', Arial, sans-serif; }
#stage[data-mode='chain'] .legend, #stage[data-mode='replacement'] .legend { font-size: 9px; gap: 15px; }
#chapters { gap: 15px; }
#chapters button { font-size: 10px; }
@media (min-width:761px) and (max-height:800px) {
  .spec-comparison th, .spec-comparison td { padding: 16px 12px; }
  .spec-comparison td { font-size: 27px; }
  .spec-comparison thead th { font-size: 20px; padding: 10px 12px 14px; }
  #stage[data-mode='comparison'] .figure-layout { grid-template-columns: 200px minmax(0,1fr); }
  .comparison-source { font-size: 8px; margin-top: 10px; }
  .offload-panel h2, .integration-explanation h2 { font-size: 18px; margin-bottom: 13px; }
  .host-memory { padding: 13px; }
  .host-slot { height: 23px; }
  .read-route { gap: 5px; margin: 8px 0; padding: 8px 0; }
  .read-route span { padding: 5px 9px; font-size: 11px; }
  .integration-explanation>p:not(.flow-step) { font-size: 11px; }
}
@media (min-width:761px) and (max-width:1100px) {
  #chapters { gap: 10px; }
  #chapters button { font-size: 9px; }
  footer { gap: 16px; }
  #next-label { max-width: 105px; }
  .spec-comparison td { font-size: 24px; }
  .spec-comparison td span { font-size: 10px; }
  #stage[data-mode='comparison'] .figure-layout { grid-template-columns: 175px minmax(0,1fr); }
  #stage[data-mode='comparison'] .diagram-heading { font-size: 8px; }
}
@media (max-width:760px) {
  #chapters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px 12px; }
  #chapters button { font-size: 10px; }
  footer { padding-bottom: 18px; }
  .offload-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; align-items: start; }
  .flow-step { font-size: 9px; }
  .offload-panel .flow-step { grid-column: 1; }
  .offload-panel h2 { grid-column: 1; font-size: 19px; }
  .host-memory { grid-column: 2; grid-row: 1/4; padding: 12px; }
  .host-memory h3 { font-size: 20px; }
  .host-memory>p { font-size: 10px; }
  .host-slot { font-size: 8px; height: 23px; }
  .flow-summary { grid-column: 1; font-size: 10px; margin-top: 0; }
  .memory-types { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .memory-types>div { margin: 0; }
  .memory-types .comparison-note { grid-column: 1/3; max-width: none; }
  .spec-comparison th, .spec-comparison td { padding: 15px 7px; }
  .spec-comparison tbody th { font-size: 10px; }
  .spec-comparison thead th { padding: 10px 7px 15px; font-size: 18px; }
  .spec-comparison thead th:first-child { font-size: 10px; }
  .spec-comparison th small { font-size: 8px; }
  .spec-comparison td { font-size: 24px; }
  .spec-comparison td span { font-size: 10px; display: block; margin-top: 3px; }
  #stage[data-mode='comparison'] .diagram { margin: 0; }
  #stage[data-mode='comparison'] .diagram-heading { display: block; font-size: 9px; }
  #stage[data-mode='comparison'] .diagram-heading span { display: block; margin-top: 5px; }
  .integration-explanation { display: grid; grid-template-columns: 1fr 1fr; column-gap: 15px; }
  .integration-explanation .flow-step, .integration-explanation h2, .integration-explanation>p { grid-column: 1; }
  .read-route { grid-column: 2; grid-row: 1/5; margin: 0; align-self: center; }
  .integration-explanation .route-note { font-size: 10px; }
  #stage[data-mode='chain'] .legend, #stage[data-mode='replacement'] .legend { font-size: 8px; flex-wrap: wrap; gap: 7px 15px; }
  #next-label { max-width: 155px; }
}
@media (max-width:760px) { #host-link { visibility: hidden; } }

/* Package cross sections and fixed-axis system comparison. */
#stage[data-mode='comparison'] .figure-layout { grid-template-columns: minmax(260px, .72fr) minmax(0, 1.35fr); gap: 48px; }
.stack-comparison h2, .capacity-panel h2 { margin: 0 0 14px; color: #526f84; font-size: 16px; font-weight: 500; }
.stack-comparison svg { display: block; width: 100%; max-height: 280px; }
.stack-comparison p { font-size: 11px; color: #7b8a93; line-height: 1.8; max-width: 340px; }
.cutaway-title { fill: #3c6b9e; font: 19px 'Segoe UI', sans-serif; }
.stack-cutaway .die { fill: #dce9f4; stroke: #86a7c1; }
.stack-cutaway .vertical-vias { stroke: #477caa; stroke-width: 2; opacity: .65; }
.stack-cutaway .logic { fill: #718fa8; }
.stack-cutaway .die-label { fill: #4f7595; font: 14px 'Segoe UI', sans-serif; }
.stack-comparison .base-label { fill: #7a8c99; font: 11px 'Segoe UI', sans-serif; }
.stack-comparison .interposer { fill: #c8cfcd; }
.flash-cutaway .cutaway-title, .flash-cutaway .die-label { fill: #b16631; }
.flash-cutaway .die { fill: #f6dfc9; stroke: #c79670; }
.flash-cutaway .vertical-vias { stroke: #bc783f; }
.flash-cutaway .logic { fill: #bf926f; }
.spec-comparison th, .spec-comparison td { padding: 11px 13px; }
.spec-comparison td { font-size: 15px; letter-spacing: 0; }
.spec-comparison td small { display: block; font-size: 9px; color: #81909b; margin-top: 3px; }
.spec-comparison .primary-spec td { font-size: 27px; letter-spacing: -.6px; }
.spec-comparison tbody th { font-size: 12px; }
.spec-comparison thead th { font-size: 21px; padding: 10px 13px 13px; }
#stage[data-mode='replacement'] .figure-layout, #stage[data-mode='chain'] .figure-layout { grid-template-columns: minmax(300px, .8fr) minmax(0, 1.5fr); gap: 28px; }
.capacity-panel { width: 100%; }
#capacity-plot { display: block; width: 100%; max-height: 310px; overflow: visible; }
.plot-grid { fill: none; stroke: #e1e6e6; stroke-width: 1; }
.plot-axis { fill: none; stroke: #9cacb7; stroke-width: 1; }
.axis-title { fill: #6c8292; font: 12px 'Segoe UI', sans-serif; }
.tick { fill: #8395a0; font: 10px 'Courier New', monospace; }
.replacement-line { fill: none; stroke: #ca9f7c; stroke-width: 1.5; }
.chain-plot-line { fill: none; stroke: #749aba; stroke-width: 1.5; stroke-dasharray: 4 4; }
.plot-point circle { fill: #fcfbf8; stroke: #bf804c; stroke-width: 1.8; }
.plot-point:first-of-type circle, .chain-point circle { stroke: #3c6b9e; }
.plot-point text { fill: #768791; font: 11px 'Segoe UI', sans-serif; }
.plot-point.selected circle { fill: #bf804c; }
.plot-point.selected text { fill: #9f5f2e; font-weight: 600; }
.plot-point .point-halo { fill: #f4e3d4 !important; stroke: none; }
.chain-point.selected circle { fill: #3c6b9e; }
.chain-point.selected text { fill: #3c6b9e; }
.chain-point .point-halo { fill: #dce8f1 !important; }
.plot-result { border-top: 1px solid #d7dfe2; padding: 10px 0 0; display: flex; justify-content: space-between; align-items: baseline; gap: 9px; }
.plot-result span { color: #788b98; font-size: 10px; }
.plot-result strong { font-size: 18px; font-weight: 500; color: #486b87; white-space: nowrap; }
.plot-result i { color: #b1bdc5; font-style: normal; padding: 0 3px; }
.plot-note, .plot-detail { font-size: 10px; line-height: 1.65; color: #82929b; margin: 9px 0 0; }
.plot-detail { color: #5b7588; font-size: 11px; }
.plot-detail b { font-weight: 500; }
#stage[data-mode='replacement'] .memory-name, #stage[data-mode='chain'] .memory-name { font-size: 16px; }
#stage[data-mode='replacement'] .hardware-face text, #stage[data-mode='chain'] .hardware-face text { font-size: 21px; }
#stage[data-mode='replacement'] .rate-label text, #stage[data-mode='chain'] .rate-label text { font-size: 18px; }
#stage[data-mode='chain'] .flash-face>text:not(.flash-capacity) { font-size: 13px; }
#stage[data-mode='chain'] .package-footnote { font-size: 14px; }
#stage[data-mode='chain'] .legend, #stage[data-mode='replacement'] .legend { flex-wrap: wrap; gap: 5px 15px; }
@media (min-width:761px) and (max-height:800px) {
  .stack-comparison svg { max-height: 235px; }
  .spec-comparison th, .spec-comparison td { padding: 8px 10px; }
  .spec-comparison .primary-spec td { font-size: 24px; }
  .spec-comparison thead th { padding: 8px 10px; }
  .comparison-source { margin-top: 8px; }
  .capacity-panel h2, .stack-comparison h2 { font-size: 14px; margin-bottom: 8px; }
  #capacity-plot { max-height: 250px; }
  .plot-result { padding-top: 8px; }
  .plot-result strong { font-size: 16px; }
  .plot-note, .plot-detail { margin-top: 6px; font-size: 10px; }
}
@media (max-width:760px) {
  .stack-comparison svg { max-height: 240px; }
  .stack-comparison p { max-width: none; }
  .spec-comparison th, .spec-comparison td { padding: 10px 6px; }
  .spec-comparison td { font-size: 11px; white-space: normal; }
  .spec-comparison td span { display: inline; font-size: 10px; }
  .spec-comparison .primary-spec td { font-size: 21px; }
  .spec-comparison tbody th { font-size: 10px; }
  .spec-comparison thead th { font-size: 17px; }
  .capacity-panel { max-width: 460px; margin: 0 auto; }
  #stage[data-mode='chain'] .diagram { overflow-x: auto; margin: 0 -4vw; }
  #stage[data-mode='chain'] #package { flex: none; width: 680px; min-height: 265px; }
  #stage[data-mode='chain'] .diagram-heading { padding: 0 4vw; }
  #stage[data-mode='chain'] .legend { padding: 0 4vw; }
}

/* Named, heterogeneous workloads share one package and LPDDR geometry. */
#workload[hidden] { display: none; }
#workload { min-height: 0; flex: 1; display: flex; align-items: center; }
#workload>svg { width: 100%; height: 100%; min-height: 0; }
#stage[data-mode='workload'] .figure-layout { grid-template-columns: 250px minmax(0,1fr); gap: 38px; }
.baseline-note { font-size: 12px; line-height: 1.9; color: #5e7c91; margin-top: 24px; }
.roster-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 1px solid #cdd8de; padding-bottom: 9px; }
.roster-heading h2 { font-size: 16px; font-weight: 500; margin: 0; }
.roster-heading>span { font-size: 11px; color: #647f92; }
.history-key { font-size: 9px; color: #94a1a8; margin: 7px 0 9px; }
.agent-row { padding: 5px 0 6px; }
.agent-identity { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.agent-identity b { font-size: 13px; font-weight: 500; color: var(--agent-color); }
.agent-identity span { color: #7d949f; font-size: 9px; }
.agent-row[data-tier='lpddr'] .agent-identity span { color: #b5896c; }
.agent-row p { margin: 3px 0 5px; font-size: 9px; color: #91a0a9; }
.history-track { height: 5px; background: #eef0ee; }
.history-track i { height: 100%; display: block; background: var(--agent-color); }
.allocation-note { color: #96a2a9; font-size: 9px; line-height: 1.65; margin: 12px 0 0; }
.many-agents .agent-row { padding: 3px 0 4px; }
.many-agents .agent-row p { display: none; }
.many-agents .agent-identity { margin-bottom: 4px; }
.many-agents .agent-identity b { font-size: 12px; }
.many-agents .history-track { height: 4px; }
.workload-package { fill: #f4f5f2; stroke: #bdcbd3; }
.workload-package-label { fill: #869aa8; font: 10px 'Courier New', monospace; }
.workload-bus path { stroke: #97b0c2; stroke-width: 3; fill: none; }
.workload-layer { fill: #d8e3ec; stroke: #a6b9c8; }
.workload-face { fill: #f1f6fa; stroke: #8facbf; }
.workload-memory-title { fill: #4d7090; font: 14px 'Segoe UI', sans-serif; }
.workload-free { fill: #e7eef3; }
.hbf .workload-layer { fill: #edcfb7; stroke: #c89870; }
.hbf .workload-face { fill: #fff3e6; stroke: #c89870; }
.hbf .workload-memory-title { fill: #b97943; }
.hbf .workload-free { fill: #f8e6d4; }
.resident-name { fill: white; font: 8px 'Segoe UI', sans-serif; }
.workload-reserved { fill: #d7dddb; }
.hbf .workload-reserved { fill: #eddac7; }
.workload-reserved-label { fill: #859291; font: 6px 'Courier New', monospace; }
.workload-xpu rect { fill: #dbe7f0; stroke: #7b9bb5; stroke-width: 1.5; }
.workload-xpu text { fill: #4d7291; font: 27px 'Segoe UI', sans-serif; }
.workload-xpu .workload-batch-label { font-size: 12px; }
.workload-host-link { stroke: #97adb9; stroke-width: 2; stroke-dasharray: 5 5; }
.workload-flash-link { stroke: #c7966d; stroke-width: 2; fill: none; }
.route-background { fill: var(--paper); }
.workload-route { fill: #79909e; font: 12px 'Segoe UI', sans-serif; }
.host-outline { fill: #f0f2ee; stroke: #acbabd; }
.host-svg-title { fill: #637c86; font: 17px 'Segoe UI', sans-serif; }
.host-svg-subtitle { fill: #8c9d9e; font: 11px 'Segoe UI', sans-serif; }
.host-agent-name { fill: #fff; font: 11px 'Segoe UI', sans-serif; }
.host-empty { stroke: #c8d3cf; stroke-dasharray: 4 5; }
.workload-footnote { fill: #8c9aa0; font: 10px 'Segoe UI', sans-serif; }
#chapters { gap: 12px; }
#chapters button { font-size: 9px; }
@media (min-width:761px) and (max-height:800px) {
  #stage[data-mode='workload'] .figure-layout { grid-template-columns: 230px minmax(0,1fr); gap: 30px; }
  .agent-row { padding: 3px 0 4px; }
  .agent-row p { margin: 2px 0 3px; font-size: 8px; }
  .agent-identity b { font-size: 12px; }
  .agent-identity span { font-size: 8px; }
  .history-track { height: 4px; }
  .roster-heading h2 { font-size: 14px; }
  .allocation-note { margin-top: 7px; font-size: 8px; }
  .many-agents .agent-row { padding: 2px 0 3px; }
  .many-agents .agent-identity { margin-bottom: 3px; }
  .many-agents .agent-identity b { font-size: 11px; }
  .many-agents .history-track { height: 3px; }
}
@media (min-width:761px) and (max-width:1350px) {
  footer { gap: 16px; }
  #chapters { gap: 9px; }
  #chapters button { font-size: 8px; }
  #next-label { max-width: 110px; }
}
@media (max-width:760px) {
  #workload>svg { height: auto; min-height: 280px; }
  #stage[data-mode='workload'] .diagram { margin: 0 -4vw; }
  .agent-roster { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 17px; }
  .roster-heading, .history-key, .allocation-note { grid-column: 1 / 3; }
  .history-key { margin: 4px 0; }
  .agent-row { padding: 4px 0; }
  #chapters { grid-template-columns: repeat(4,minmax(0,1fr)); }
  #chapters button { font-size: 9px; }
}
#stage[data-mode='workload'] .legend { flex-wrap: wrap; gap: 5px 17px; font-size: 9px; }

/* A larger, quieter figure and one change at a time. */
#stage[data-mode='workload'] .figure-layout { grid-template-columns: 225px minmax(0,1fr); gap: 24px; padding-top: 12px; }
#stage[data-mode='workload'] .diagram-heading { font-size: 13px; padding: 0 12px; margin-bottom: 8px; }
#stage[data-mode='workload'] .legend { font-size: 12px; margin-top: 8px; }
.workload-memory-title { font-size: 21px; }
.resident-name { font-size: 14px; }
.workload-xpu text { font-size: 34px; }
.workload-route { font-size: 19px; }
.host-svg-title { font-size: 23px; }
.host-svg-subtitle { font-size: 15px; }
.host-agent-name { font-size: 13px; }
.named-fragment { width: 65px; height: 25px; font: 14px 'Segoe UI', sans-serif; border: 0; }
.agent-identity b { font-size: 15px; }
.agent-identity span { font-size: 10px; }
.agent-row p { font-size: 10px; }
.few-agents .agent-row { padding: 16px 8px; margin: 4px -8px; border-left: 3px solid transparent; }
.few-agents .agent-identity b { font-size: 23px; }
.few-agents .agent-identity span { font-size: 12px; }
.few-agents .agent-row p { font-size: 13px; line-height: 1.5; margin: 7px 0 10px; }
.few-agents .history-track { height: 9px; }
.few-agents .agent-focus { border-left-color: var(--agent-color); background: #eef2f2; }
.few-agents .allocation-note { font-size: 11px; line-height: 1.7; margin-top: 18px; }
.history-key { font-size: 11px; }
@media (min-width:761px) and (max-height:800px) {
  .few-agents .agent-row { padding: 11px 8px; }
  .few-agents .agent-identity b { font-size: 21px; }
  .few-agents .agent-row p { font-size: 12px; }
  .few-agents .allocation-note { margin-top: 12px; }
}
@media (max-width:760px) {
  #stage[data-mode='workload'] .figure-layout { gap: 20px; }
  .few-agents { display: block; }
  .few-agents .agent-row { padding: 10px 8px; }
  .few-agents .agent-identity b { font-size: 20px; }
  #workload>svg { min-height: 250px; }
  #stage[data-mode='workload'] .legend { font-size: 10px; }
}
.agent-roster:not(.few-agents) .agent-row p { display: none; }
.agent-roster:not(.few-agents) .agent-identity { margin-bottom: 5px; }
.many-agents { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.many-agents .roster-heading, .many-agents .history-key, .many-agents .allocation-note { grid-column: 1 / 3; }
.many-agents .agent-identity b { font-size: 14px; }
.many-agents .agent-identity span { font-size: 9px; }
.many-agents .agent-row { padding: 5px 0; }
@media (min-width:761px) and (max-height:800px) {
  .agent-roster:not(.few-agents) .agent-row { padding: 4px 0; }
  .agent-roster:not(.few-agents) .allocation-note { font-size: 10px; }
  .many-agents { gap: 7px 14px; }
}
.four-agents .agent-row { padding: 6px 8px; }
.four-agents .agent-identity b { font-size: 18px; }
.four-agents .agent-row p { font-size: 11px; margin: 4px 0 6px; }
.four-agents .history-track { height: 6px; }
.four-agents .allocation-note { font-size: 10px; margin-top: 8px; }
.hbf-offload-paths path { stroke: #bf875b; stroke-width: 2; fill: none; stroke-dasharray: 5 4; }
.hbf-backing-label text { fill: #ad754d; font: 20px 'Segoe UI', sans-serif; }
.hbf-backing-label .hbf-read-note { fill: #8b969d; font-size: 16px; }

/* One event trace, replayed under each memory policy. */
[hidden], .figure-layout[hidden], #results[hidden], #scene-controls[hidden] { display: none !important; }
#scene-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 16px; }
.trace-events, .trace-actions, .layout-switch { display: flex; align-items: center; gap: 7px; }
.trace-events button, .trace-actions button { background: transparent; border: 1px solid #d0d9dc; border-radius: 3px; padding: 8px 10px; font-size: 11px; color: #6c808f; }
.trace-events button span { color: #9aaab3; margin-right: 7px; }
.trace-events button[aria-pressed='true'], .layout-switch button[aria-pressed='true'] { color: #3c6b9e; border-color: #85a4bb; background: #edf3f8; }
.trace-actions [data-play-trace] { white-space: nowrap; }
.paused-history { opacity: .55; }
.agent-row[data-ready='false'] .agent-identity b { opacity: .65; }
#stage[data-slide='3'] .figure-layout, #stage[data-slide='7'] .figure-layout { padding-top: 8px; }

/* Synthetic results are visually and structurally separate from the capacity story. */
#results { flex: 1; min-height: 0; display: grid; grid-template-rows: minmax(155px,.72fr) minmax(0,1fr); gap: 12px; padding: 14px 0 16px; }
.results-top { min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.results-chart { height: 100%; min-height: 0; }
.results-plot { width: 100%; height: 100%; display: block; }
.result-region { cursor: pointer; }
.result-region rect { fill: #f0f2ef; stroke: transparent; }
.result-region.selected rect { fill: #e8f0f7; stroke: #9bb4c7; }
.result-region text { fill: #788f9e; font: 12px 'Segoe UI', sans-serif; }
.result-grid { stroke: #dce3e6; stroke-dasharray: 2 4; fill: none; pointer-events: none; }
.result-axis { fill: none; stroke: #9eafb9; }
.result-tick { fill: #8698a3; font: 11px 'Courier New', monospace; pointer-events: none; }
.result-axis-title { fill: #637e90; font: 13px 'Segoe UI', sans-serif; }
.result-dot { cursor: pointer; stroke: var(--paper); stroke-width: 1; }
.synthetic-badge { color: #a16f45; font: 10px 'Courier New', monospace; letter-spacing: .7px; margin: 0 0 12px; }
.region-buttons { display: flex; gap: 8px; }
.region-buttons button { border: 1px solid #c6d3dc; background: transparent; border-radius: 3px; font-size: 12px; padding: 10px 12px; color: #698394; }
.region-buttons button[aria-pressed='true'] { color: #345f83; background: #e6eff6; border-color: #85a5bd; }
.region-summary { color: #718795; font-size: 12px; line-height: 1.7; max-width: 470px; margin: 12px 0; }
.playback-controls { display: flex; align-items: center; gap: 12px; }
.playback-controls button { background: transparent; border: 0; padding: 4px 0; color: #4b7291; text-decoration: underline; text-underline-offset: 4px; font-size: 11px; }
.playback-controls span { color: #9aa7ad; font-size: 10px; }
.results-cards { min-height: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.result-card { min-height: 0; display: flex; flex-direction: column; border-top: 2px solid var(--result-color); padding-top: 10px; }
.result-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.result-card-heading h3 { font-size: 16px; font-weight: 500; color: var(--result-color); margin: 0; }
.result-card-heading>span { font-size: 10px; color: #8d9ba4; }
.result-metrics { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin: 10px 0; color: #788d9c; }
.result-metrics strong { font-size: 19px; font-weight: 500; color: #4b6d85; }
.result-metrics strong span { font-size: 11px; font-weight: 400; }
.result-metrics>span { font-size: 10px; }
.result-metrics b { font-size: 14px; font-weight: 500; color: var(--result-color); }
.result-metrics b span { font-size: 9px; font-weight: 400; }
.chat-wall { display: grid; grid-template-columns: repeat(var(--chat-cols),minmax(0,1fr)); grid-template-rows: repeat(var(--chat-rows),minmax(0,1fr)); flex: 1; min-height: 0; gap: 5px; }
.mini-chat { min-width: 0; min-height: 0; background: #fff; border: 1px solid #d5dfe5; border-radius: 3px; display: flex; flex-direction: column; overflow: hidden; }
.mini-chat-user { display: flex; align-items: center; flex-shrink: 0; gap: 4px; color: #6d8393; font-size: 10px; padding: 3px 5px; background: #f0f4f6; line-height: 1; }
.mini-chat-user svg { width: 10px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.mini-chat-user i { width: 3px; height: 3px; background: #7ba08d; margin-left: auto; border-radius: 50%; }
.chat-scroll { min-height: 0; overflow: hidden; flex: 1; padding: 3px 5px; }
.stream-text { font-size: 11px; color: #7b8991; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.dense-chats .chat-wall { gap: 3px; }
.dense-chats .mini-chat-user { font-size: 8px; padding: 2px 3px; }
.dense-chats .mini-chat-user svg { width: 7px; height: 8px; }
.dense-chats .chat-scroll { padding: 2px 3px; }
.dense-chats .stream-text { font-size: 8px; line-height: 1.3; }
@media (min-width:761px) and (max-height:800px) {
  #scene-controls { margin-top: 10px; gap: 8px; }
  .trace-events, .trace-actions, .layout-switch { gap: 5px; }
  .trace-events button, .trace-actions button { font-size: 10px; padding: 6px 8px; }
  #results { grid-template-rows: 155px minmax(0,1fr); gap: 10px; padding-top: 9px; }
  .region-summary { margin: 7px 0; font-size: 11px; }
  .synthetic-badge { margin-bottom: 8px; }
  .region-buttons button { padding: 8px 10px; font-size: 11px; }
  .result-card-heading h3 { font-size: 14px; }
  .result-metrics { margin: 7px 0; }
  .result-metrics strong { font-size: 17px; }
  .result-metrics>span, .result-metrics b span { font-size: 8px; }
  .mini-chat-user { font-size: 9px; padding: 2px 4px; }
  .stream-text { font-size: 10px; }
  .dense-chats .mini-chat-user { font-size: 7px; padding: 1px 2px; }
  .dense-chats .stream-text { font-size: 7px; }
}
@media (max-width:1050px) and (min-width:761px) {
  #scene-controls { flex-wrap: wrap; }
  .result-card-heading { display: block; }
  .result-metrics { flex-wrap: wrap; }
}
@media (max-width:760px) {
  #scene-controls { align-items: stretch; flex-direction: column; }
  .trace-events { display: grid; grid-template-columns: 1fr 1fr; }
  .trace-actions { flex-wrap: wrap; }
  .trace-events button, .trace-actions button { font-size: 11px; }
  #results { display: block; padding: 20px 0; }
  .results-top { display: flex; flex-direction: column; gap: 16px; align-items: stretch; }
  .results-chart { height: 185px; }
  .region-buttons { flex-wrap: wrap; }
  .results-cards { display: flex; flex-direction: column; margin-top: 25px; gap: 25px; }
  .result-card { height: 310px; flex-shrink: 0; }
  .result-card-heading h3 { font-size: 16px; }
  .result-metrics>span { font-size: 10px; }
}
#stage[data-slide='3'] .few-agents .agent-row, #stage[data-slide='7'] .few-agents .agent-row { padding: 7px 8px; }
#stage[data-slide='3'] .few-agents .agent-identity b, #stage[data-slide='7'] .few-agents .agent-identity b { font-size: 19px; }
#stage[data-slide='3'] .few-agents .agent-row p, #stage[data-slide='7'] .few-agents .agent-row p { margin: 4px 0 6px; }

/* The HBF-only extension adds conversations after the matched trace. */
.burst-roster h2 { font-size: 20px; font-weight: 500; margin: 0 0 7px; }
.burst-count { color: #748b9a; font-size: 12px; margin: 0 0 16px; }
.agent-cloud { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.burst-agent { padding: 6px 3px; font-size: 12px; color: var(--agent-color); background: #f0f3f3; border-bottom: 2px solid var(--agent-color); }
.burst-agent[data-active='false'] { background: #fcf0e6; border-bottom-style: dashed; opacity: .6; }
#scene-controls { flex-wrap: wrap; }

/* Configuration sweeps and readable output lanes. */
.configuration-curve { fill: none; stroke-width: 1.7; opacity: .6; pointer-events: none; }
.pareto-frontier { fill: none; stroke: #566771; stroke-width: 2; stroke-dasharray: 5 4; pointer-events: none; }
.results-chart { display: flex; flex-direction: column; }
.results-plot { flex: 1; min-height: 0; }
.series-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; color: #718391; font-size: 10px; flex-shrink: 0; }
.series-legend span { display: flex; align-items: center; gap: 5px; }
.series-legend i { width: 15px; border-top: 2px solid var(--legend-color); }
.series-legend .frontier-key i { border-top: 2px dashed #566771; }
.frontier-note { color: #8d9da7; font-size: 10px; line-height: 1.6; margin: 7px 0; }
.results-empty { color: #7b919f; text-align: center; font-size: 14px; margin: 10px 0 22px; }
#results[data-selected='false'] { grid-template-rows: minmax(0,1fr) auto; }
#results[data-selected='false'] .results-top { grid-template-columns: 1.4fr 1fr; }
#results[data-selected='false'] .results-chart { max-height: 420px; }
#results[data-selected='false'] .series-legend { font-size: 12px; }
.region-buttons { flex-wrap: wrap; }
.activity-strip { display: flex; flex-wrap: wrap; gap: 3px; padding: 0 0 8px; min-height: 15px; }
.activity-light { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--result-color); opacity: .25; transition: opacity .08s; }
.activity-light.emitting { opacity: 1; }
.stream-list { min-height: 0; overflow-y: auto; flex: 1; border-top: 1px solid #dfe6ea; border-bottom: 1px solid #dfe6ea; scrollbar-width: thin; scrollbar-color: #c3d1da transparent; }
.stream-lane { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 8px; align-items: center; min-height: 29px; height: 29px; border-bottom: 1px solid #edf0f1; background: #fff; padding: 0 6px; }
.stream-lane:last-child { border-bottom: 0; }
.stream-user { color: var(--result-color); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream-output { overflow: hidden; }
.readable-streams .stream-text { font-size: 13px; line-height: 27px; white-space: nowrap; margin: 0; color: #8a979f; }
.latest-word { color: #2e4f68; font-weight: 500; background: #e8f0f5; }
.typing-cursor { display: inline-block; vertical-align: -1px; width: 2px; height: 13px; margin-left: 3px; background: var(--result-color); animation: cursor-blink 1s steps(2,end) infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }
#results[data-paused='true'] .typing-cursor { animation: none; opacity: .35; }
#results[data-paused='true'] .activity-light { opacity: .25; }
.stream-footer { display: flex; justify-content: space-between; gap: 8px; color: #8c9ca6; font-size: 9px; padding-top: 7px; }
.stream-footer b { color: var(--result-color); font-weight: 500; }
.focused-lane { background: #eef4f8; }
@media (min-width:761px) and (max-height:800px) {
  #results[data-selected='true'] { grid-template-rows: 165px minmax(0,1fr); }
  .frontier-note { font-size: 9px; margin: 4px 0; }
  .region-summary { margin: 5px 0; }
  .region-buttons button { font-size: 10px; padding: 7px 8px; }
  .readable-streams .result-card-heading h3 { font-size: 14px; }
  .readable-streams .result-metrics { margin: 6px 0; }
  .activity-strip { padding-bottom: 5px; }
  .stream-footer { padding-top: 5px; }
  .burst-roster .agent-cloud { gap: 4px; }
  .burst-agent { padding: 4px 3px; }
}
@media (max-width:760px) {
  #results[data-selected='false'] .results-chart { height: 240px; }
  .readable-streams { height: 320px; }
  .results-empty { font-size: 12px; text-align: left; margin-top: 22px; line-height: 1.7; }
  .agent-cloud { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .series-legend { font-size: 9px; gap: 6px 10px; }
}
.activity-strip { height: 30px; min-height: 30px; align-content: flex-start; padding-bottom: 3px; overflow-y: auto; scrollbar-width: thin; }

/* The live view keeps its plot above the chat wall, aligned to the right. */
#results[data-view='streams'][data-selected='true'] { position: relative; grid-template-rows: 98px minmax(0,1fr); gap: 8px; }
#results[data-selected='true'] .results-top { display: block; }
#results[data-selected='true'] .results-chart { position: absolute; right: 0; top: -78px; width: 420px; height: 174px; transform-origin: top left; }
#results[data-selected='true'] .results-chart .series-legend { display: none; }
#results[data-selected='true'] .results-chart .result-axis-title { font-size: 17px; }
#results[data-selected='true'] .results-chart .result-tick { font-size: 14px; }
#results[data-selected='true'] .region-picker { max-width: calc(100% - 445px); }
#results[data-selected='true'] .synthetic-badge { margin: 0 0 8px; }
#results[data-selected='true'] .region-summary, #results[data-selected='true'] .frontier-note { display: none; }
#results[data-selected='true'] .playback-controls { margin-top: 10px; }
#stage:has(#results[data-selected='true']) .heading { max-width: calc(100% - 445px); }
#stage:has(#results[data-selected='true']) #subtitle { display: none; }
#stage:has(#results[data-selected='true']) h1 { font-size: 32px; }
.readable-streams .stream-list { display: grid; grid-template-columns: repeat(var(--tile-cols),minmax(0,1fr)); grid-template-rows: repeat(var(--tile-rows),minmax(0,1fr)); gap: 4px 6px; overflow: hidden; border: 0; }
.readable-streams .stream-lane { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 1px; min-height: 0; height: auto; min-width: 0; padding: 1px 3px; border: 0; border-bottom: 1px solid #e0e7eb; background: #f3f6f7; border-radius: 2px; }
.readable-streams .stream-user { display: block; flex-shrink: 0; font-size: 9px; line-height: 10px; color: var(--result-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.readable-streams .stream-output { overflow: hidden; width: 100%; text-align: left; }
.readable-streams .stream-text { font: 14px/1.1 'Segoe UI',Arial,sans-serif; white-space: nowrap; overflow: hidden; color: #72818c; }
.readable-streams .typing-cursor { display: none; }
.readable-streams .latest-word { background: transparent; color: #243f54; font-weight: 400; }
.readable-streams .activity-strip { overflow: visible; height: 30px; min-height: 30px; }
.readable-streams .focused-lane { background: #dfeaf2; outline: 1px solid var(--result-color); outline-offset: -1px; }

/* Full-height racks and a dedicated chart / assumptions sidebar. */
#results[data-view='iso'] { display: grid; grid-template-columns: minmax(0,3fr) minmax(280px,1.05fr); grid-template-rows: minmax(0,1fr); gap: 28px; padding-top: 20px; }
.iso-systems { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; min-height: 0; }
.iso-system { min-width: 0; min-height: 0; border-top: 2px solid var(--result-color); padding-top: 10px; display: flex; flex-direction: column; }
.iso-system .result-card-heading { min-height: 24px; }
.iso-system .result-card-heading h3 { font-size: 17px; }
.iso-system-summary { display: flex; flex-direction: column; gap: 4px; padding: 5px 0 10px; }
.iso-system-summary strong { color: var(--result-color); font-weight: 500; font-size: 22px; }
.iso-system-summary span { font-size: 12px; color: #748997; }
.blade-network { width: 100%; flex: 1; min-height: 0; }
.blade-network text { fill: #526e81; font: 13px 'Segoe UI',sans-serif; }
.blade-network .switch-label { font-size: 14px; }
.nvlink-switch { fill: #e9eff1; stroke: #90a5b0; }
.blade-link { fill: none; stroke: #a5bac7; stroke-width: 1.4; }
.blade-shell { fill: #fcfdfd; stroke: var(--result-color); }
.blade-compute { fill: #dfeaf3; stroke: #95afc2; }
.blade-hbm { fill: #e9f1f6; stroke: #a7bdce; }
.blade-hbf { fill: #faeee2; stroke: #cba683; }
.blade-network .blade-xpu { fill: #335775; font-size: 13px; }
.blade-network .blade-number { fill: #90a1ac; font-size: 11px; }
.lpddr-pool rect { fill: #edf2ed; stroke: #9ab09f; }
.pool-link { fill: none; stroke: #91a997; stroke-width: 1.5; }
.blade-network .pool-detail { font-size: 10px; fill: #718a77; }
.iso-layout { font-size: 11px; color: #7c909d; margin: 8px 0; min-height: 26px; }
.iso-metrics { border-top: 1px solid #dee5e9; padding-top: 10px; }
.iso-metrics strong { font-size: 25px; color: var(--result-color); font-weight: 500; }
.iso-metrics strong span { font-size: 11px; }
.iso-metrics p { font-size: 11px; color: #788d9c; margin: 4px 0; }
.iso-sidebar { min-height: 0; display: flex; flex-direction: column; gap: 18px; border-left: 1px solid #dee5e9; padding-left: 20px; }
.iso-sidebar .results-chart { height: 46%; flex-shrink: 0; }
.iso-plot { width: 100%; height: 100%; min-height: 0; }
.iso-plot .result-axis-title { font-size: 19px; }
.iso-plot .result-tick { font-size: 16px; }
.iso-sidebar .series-legend { justify-content: flex-start; font-size: 10px; gap: 5px 10px; }
.iso-assumptions h2 { font-size: 21px; font-weight: 500; margin: 6px 0; }
.iso-assumptions p { font-size: 12px; line-height: 1.5; color: #768b99; margin: 10px 0; }
.iso-assumptions .synthetic-badge { color: #a16f45; font-size: 9px; }
.iso-assumptions .region-buttons { gap: 6px; }
.iso-assumptions .region-buttons button { font-size: 11px; padding: 7px; }
@media (min-width:761px) and (max-height:800px) {
  #stage:has(#results[data-selected='true']) { padding-top: 12px; }
  #stage:has(#results[data-selected='true']) #chapter-label { margin-bottom: 6px; }
  #results[data-view='streams'][data-selected='true'] { grid-template-rows: 70px minmax(0,1fr); }
  #results[data-selected='true'] .results-chart { top: -72px; height: 142px; width: 370px; }
  .readable-streams .stream-list { gap: 2px 5px; }
  .readable-streams .stream-user { font-size: 8px; line-height: 9px; }
  .readable-streams .stream-lane { padding: 0 3px; gap: 0; }
  .iso-system .result-card-heading h3 { font-size: 14px; }
  .iso-system-summary strong { font-size: 19px; }
  .iso-system-summary span { font-size: 10px; }
  .iso-assumptions p { font-size: 10px; margin: 7px 0; }
  .iso-sidebar { gap: 10px; }
  .iso-metrics strong { font-size: 22px; }
  .iso-metrics p, .iso-layout { font-size: 10px; }
}
@media (max-width:760px) {
  #stage:has(#results[data-selected='true']) .heading { max-width: none; }
  #results[data-selected='true'] .results-chart { position: static; width: 100%; height: 220px; }
  #results[data-selected='true'] .region-picker { max-width: none; margin-top: 15px; }
  .readable-streams { height: 490px; }
  .readable-streams .stream-list { min-height: 350px; }
  #results[data-view='iso'] { display: flex; flex-direction: column; gap: 30px; }
  .iso-sidebar { order: -1; border-left: 0; padding-left: 0; }
  .iso-sidebar .results-chart { height: 230px; }
  .iso-systems { display: flex; flex-direction: column; gap: 30px; }
  .iso-system { min-height: 490px; }
  .blade-network { min-height: 310px; }
}

@media (min-width:761px) {
  .readable-streams:not([data-chats='96']):not([data-chats='80']) .activity-strip { height: 20px; min-height: 20px; }
}

/* Equal-budget comparison: a large plot over three horizontal server groups. */
#results[data-view='iso'] { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1.05fr) minmax(0,1fr); gap: 16px; padding-top: 12px; }
.iso-top { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); gap: 45px; min-height: 0; }
.iso-top .results-chart { min-height: 0; }
.iso-top .series-legend { font-size: 11px; }
.iso-top .iso-assumptions { align-self: center; }
.iso-top .iso-assumptions p { max-width: 450px; }
.iso-plot .result-axis-title { font-size: 15px; }
.iso-plot .result-tick { font-size: 13px; }
.iso-system { padding-top: 6px; }
.iso-system .result-card-heading { min-height: 20px; }
.iso-system-summary { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 8px; padding: 3px 0 5px; }
.iso-system-summary strong { font-size: 19px; }
.iso-system-summary span { font-size: 11px; }
.iso-layout { min-height: 0; margin: 3px 0; font-size: 10px; }
.iso-metrics { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 5px; }
.iso-metrics strong { font-size: 22px; white-space: nowrap; }
.iso-metrics strong span, .iso-metrics p { font-size: 10px; }
.iso-metrics p { text-align: right; }
.blade-network .blade-number { font-size: 12px; }
#results[data-view='conclusion'] { display: flex; flex-direction: column; justify-content: center; gap: 38px; padding: 24px 0; }
.conclusion-kicker, .conclusion-points article>span { font: 11px 'Courier New',monospace; letter-spacing: .6px; color: #8a9aa3; }
.conclusion-lead p { font-size: clamp(25px,3vw,43px); line-height: 1.3; letter-spacing: -.7px; color: #426985; margin: 12px 0 0; }
.conclusion-points { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 40px; }
.conclusion-points article { border-top: 2px solid #c1cfd8; padding-top: 14px; }
.conclusion-points h2 { font-size: 23px; font-weight: 500; margin: 12px 0; }
.conclusion-points p { color: #718694; font-size: 15px; line-height: 1.65; margin: 0; max-width: 370px; }
.conclusion-evidence { color: #957454; font-size: 12px; margin: 0; }
@media (min-width:761px) and (max-height:800px) {
  #stage:has(#results[data-view='iso']) h1 { font-size: 32px; }
  #stage:has(#results[data-view='iso']) #subtitle { margin-top: 9px; }
  #results[data-view='iso'] { gap: 10px; grid-template-rows: minmax(0,1.1fr) minmax(0,1fr); }
  .iso-top { gap: 28px; }
  .iso-top .series-legend { font-size: 10px; }
  .iso-system-summary strong { font-size: 17px; }
  .iso-system-summary span, .iso-metrics p { font-size: 9px; }
  .iso-metrics strong { font-size: 19px; }
  #results[data-view='conclusion'] { gap: 24px; }
  .conclusion-lead p { font-size: 30px; }
  .conclusion-points h2 { font-size: 20px; }
  .conclusion-points p { font-size: 13px; }
}
@media (max-width:760px) {
  #results[data-view='iso'] { display: flex; gap: 25px; }
  .iso-top { display: flex; flex-direction: column; gap: 20px; }
  .iso-top .results-chart { height: 250px; }
  .iso-system { min-height: 300px; }
  .blade-network { min-height: 150px; }
  .iso-system-summary { flex-wrap: wrap; }
  .iso-metrics { flex-wrap: wrap; }
  .conclusion-points { grid-template-columns: 1fr; gap: 24px; }
  #results[data-view='conclusion'] { gap: 28px; }
  .conclusion-points h2 { font-size: 21px; }
}

.result-dot[aria-pressed='true'] { stroke: #263f50; stroke-width: 2; }
.result-dot:hover, .result-dot:focus-visible { stroke: #263f50; stroke-width: 2.5; }
.iso-benefit { min-height: 0; display: flex; flex-direction: column; padding-left: 20px; border-left: 1px solid #dce4e9; }
.benefit-heading h2 { margin: 0 0 9px; color: #526e81; font-size: 18px; font-weight: 500; }
.benefit-heading label { display: flex; align-items: center; gap: 12px; font-size: 12px; color: #728694; }
.benefit-heading input { width: 66px; border: 1px solid #acbfcc; background: #f7fafb; color: #3c617b; border-radius: 3px; font: 16px 'Segoe UI',sans-serif; padding: 3px 6px; }
.benefit-plot { width: 100%; min-height: 0; flex: 1; }
.benefit-label { font: 14px 'Segoe UI',sans-serif; fill: #708592; }
.benefit-value { font: 15px 'Segoe UI',sans-serif; fill: #3f5d73; }
.benefit-footnote { font: 12px 'Segoe UI',sans-serif; fill: #8c9ca6; }
.benefit-note { font-size: 10px; line-height: 1.5; color: #8a9aa5; margin: 3px 0 0; }
.rate-threshold { stroke: #5b788d; stroke-dasharray: 3 4; fill: none; pointer-events: none; }
.threshold-label { font: 13px 'Segoe UI',sans-serif; fill: #496c87; }
#results[data-view='conclusion'] { align-items: center; justify-content: center; }
.conclusion-todo { font: 500 clamp(90px,14vw,190px)/1 'Segoe UI',sans-serif; color: #52758c; letter-spacing: -5px; margin: 0; }
#stage[data-slide='12'] .heading h1, #stage[data-slide='12'] #subtitle, #stage[data-slide='12'] .takeaway { display: none; }
@media (min-width:761px) and (max-height:800px) {
  .benefit-heading h2 { font-size: 15px; margin-bottom: 5px; }
  .benefit-heading label { font-size: 10px; }
  .benefit-heading input { font-size: 12px; padding: 2px 5px; }
  .benefit-note { font-size: 8px; }
}
@media (max-width:760px) {
  .iso-benefit { border-left: 0; padding-left: 0; min-height: 300px; }
  .benefit-plot { min-height: 190px; }
}
