/* Art prototype: a promise, an example and a reference. */
:root {
  --fd-ink: #111827;
  --fd-paper: #f8faf9;
  --fd-surface: #ffffff;
  --fd-soft: #f0f5f2;
  --fd-border: #d5ded8;
  --fd-muted: #53635b;
  --fd-accent: #1f6b3d;
  --fd-tint: #a7e8bd;
  --fd-danger: #a52828;
  --fd-body: "Hanken Grotesk", system-ui, sans-serif;
  --fd-mono: "JetBrains Mono", ui-monospace, monospace;
  --fd-radius: 2px;
  --fd-header-height: 64px;
  /* Grid texture: one size, one line (ink at a low alpha) per scheme. */
  --fd-grid-size: 24px;
}
[data-md-color-scheme="default"] {
  --fd-grid-line: rgba(17, 24, 39, 0.045);
  --md-default-bg-color: var(--fd-paper);
  --md-default-fg-color: var(--fd-ink);
  --md-default-fg-color--light: var(--fd-muted);
  --md-default-fg-color--lighter: #7a8780;
  --md-primary-fg-color: var(--fd-paper);
  --md-primary-bg-color: var(--fd-ink);
  --md-accent-fg-color: var(--fd-accent);
  --md-typeset-a-color: var(--fd-accent);
  --md-code-bg-color: var(--fd-soft);
  --md-code-fg-color: var(--fd-ink);
  --md-footer-bg-color: var(--fd-paper);
  --md-footer-fg-color: var(--fd-ink);
  --md-footer-bg-color--dark: var(--fd-paper);
  --md-footer-fg-color--light: var(--fd-muted);
}
[data-md-color-scheme="slate"] {
  --fd-grid-line: rgba(237, 243, 239, 0.05);
  --fd-ink: #edf3ef;
  --fd-paper: #151b19;
  --fd-surface: #1a221e;
  --fd-soft: #202a25;
  --fd-border: #35433b;
  --fd-muted: #a9b7af;
  --fd-accent: #a7e8bd;
  --fd-tint: #264b34;
  --fd-danger: #ff9696;
  --md-default-bg-color: var(--fd-paper);
  --md-default-fg-color: var(--fd-ink);
  --md-default-fg-color--light: var(--fd-muted);
  --md-default-fg-color--lighter: #91a097;
  --md-primary-fg-color: var(--fd-paper);
  --md-primary-bg-color: var(--fd-ink);
  --md-accent-fg-color: var(--fd-accent);
  --md-typeset-a-color: var(--fd-accent);
  --md-code-bg-color: var(--fd-soft);
  --md-code-fg-color: var(--fd-ink);
  --md-footer-bg-color: var(--fd-paper);
  --md-footer-fg-color: var(--fd-ink);
  --md-footer-bg-color--dark: var(--fd-paper);
  --md-footer-fg-color--light: var(--fd-muted);
}
html {
  font-size: 17px;
  scroll-padding-top: 88px;
}
body {
  font-family: var(--fd-body);
  font-feature-settings: "kern", "liga", "calt";
}
/* The grid: the page background on every page, and the figure panels. */
body,
.md-typeset .fdx {
  background-image:
    linear-gradient(var(--fd-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--fd-grid-line) 1px, transparent 1px);
  background-size: var(--fd-grid-size) var(--fd-grid-size);
}
@media print {
  body,
  .md-typeset .fdx { background-image: none; }
}
::selection { color: #111827; background: #a7e8bd; }
a, button, summary, input { -webkit-tap-highlight-color: transparent; }
:focus-visible {
  outline: 2px solid var(--fd-accent) !important;
  outline-offset: 4px;
  border-radius: var(--fd-radius);
}

/* One global navigation. No patterned rails, cards or page-fact badges. */
header.md-header,
header.md-header.fd-scrolled {
  height: var(--fd-header-height);
  color: var(--fd-ink);
  background: var(--fd-paper) !important;
  border-bottom: 1px solid var(--fd-border);
  box-shadow: none;
}
.md-header__inner { height: 100%; }
.md-grid { max-width: 1400px; }
.md-header__title,
.md-header__topic:first-child {
  font-family: var(--fd-body);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
/* Keep one stable brand label; the theme's cross-fading page title overlaps it. */
.md-header__topic:first-child { opacity: 1 !important; transform: none !important; transition: none !important; }
.md-header__topic:not(:first-child) { display: none; }
.md-header__button.md-logo img,
.md-header__button.md-logo svg { width: 30px; height: 30px; }
.md-header__button { color: inherit; }
.md-header__button:hover { opacity: 1; color: var(--fd-accent); }
.md-source { font-size: 12px; }
.md-search__form {
  color: var(--fd-ink);
  background: var(--fd-soft);
  border: 1px solid transparent;
  border-radius: var(--fd-radius);
  box-shadow: none;
}
.md-search__input { font: 14px var(--fd-body); }
.md-search__input::placeholder { color: var(--fd-muted); }
.md-search__form:hover { border-color: var(--fd-border); }
.md-search__scrollwrap,
.md-search__output { border-radius: var(--fd-radius); box-shadow: none; }
.md-main__inner { margin-top: 0; }
.md-content { min-width: 0; }
.md-content__inner {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 56px 40px 96px;
}
.md-content__inner::before { display: none; }
.md-sidebar { padding-top: 40px; }
.md-sidebar--primary { width: 216px; }
.md-sidebar--secondary { width: 176px; }
.md-nav,
.md-nav__title,
.md-nav__link { font-family: var(--fd-body); font-size: 14px; }
.md-nav__title {
  color: var(--fd-ink);
  background: transparent;
  box-shadow: none;
}
.md-nav__link { padding: 4px 8px; line-height: 1.5; }
.md-nav__item--section > .md-nav__link {
  margin-top: 24px;
  color: var(--fd-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.md-nav__link--active,
.md-nav__link--active:hover {
  color: var(--fd-accent);
  font-weight: 650;
  background: transparent;
}
.md-nav__link:hover { color: var(--fd-accent); }
.md-sidebar--secondary .md-nav__title {
  color: var(--fd-muted);
  font-size: 12px;
  font-weight: 500;
}
.md-sidebar--secondary .md-nav__link {
  padding: 6px 0 6px 12px;
  color: var(--fd-muted);
  font-size: 12px;
  border-left: 1px solid var(--fd-border);
}
.md-sidebar--secondary .md-nav__link--active {
  color: var(--fd-accent);
  border-left-color: var(--fd-accent);
}

/* Reading rhythm: 17px, 1.6, a 68-character prose measure. */
.md-typeset {
  color: var(--fd-ink);
  font-family: var(--fd-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: 0;
}
.md-typeset > p,
.md-typeset > ul,
.md-typeset > ol,
.fd-home > p,
.fd-home > ul { max-width: 68ch; }
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--fd-ink);
  font-family: var(--fd-body);
  font-weight: 600;
  letter-spacing: -0.025em;
}
.md-typeset h1 { margin: 0 0 24px; font-size: 40px; line-height: 1.15; }
.md-typeset h2 {
  margin: 48px 0 24px;
  padding: 0;
  font-size: 24px;
  line-height: 1.25;
  border: 0;
}
.md-typeset h3 { margin: 32px 0 16px; font-size: 20px; }
.md-typeset p { margin: 16px 0; }
.md-typeset ul,
.md-typeset ol { margin: 16px 0; }
.md-typeset li { margin: 8px 0; }
.md-typeset strong { font-weight: 650; }
.md-typeset a {
  color: var(--fd-accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--fd-accent) 45%, transparent);
  text-underline-offset: 3px;
}
.md-typeset a:hover { text-decoration-color: currentColor; }
.md-typeset blockquote {
  margin: 24px 0;
  padding: 0 0 0 20px;
  color: var(--fd-muted);
  background: transparent;
  border-left: 1px solid var(--fd-border);
}
.md-typeset hr { margin: 48px 0; border-color: var(--fd-border); }

/* Let Material style Pygments tokens. Use contrast-safe colors on fd-soft. */
[data-md-color-scheme="default"] {
  --md-code-hl-keyword-color: #6b21a8;
  --md-code-hl-function-color: #075985;
  --md-code-hl-special-color: #075985;
  --md-code-hl-name-color: var(--fd-ink);
  --md-code-hl-string-color: #166534;
  --md-code-hl-number-color: #9a3412;
  --md-code-hl-constant-color: #9a3412;
  --md-code-hl-operator-color: var(--fd-ink);
  --md-code-hl-punctuation-color: var(--fd-ink);
  --md-code-hl-comment-color: var(--fd-muted);
  --md-code-hl-variable-color: #075985;
  --md-code-hl-generic-color: #075985;
}
[data-md-color-scheme="slate"] {
  --md-code-hl-keyword-color: #e0b8ff;
  --md-code-hl-function-color: #a5dbf8;
  --md-code-hl-special-color: #a5dbf8;
  --md-code-hl-name-color: var(--fd-ink);
  --md-code-hl-string-color: var(--fd-accent);
  --md-code-hl-number-color: #ffc5a4;
  --md-code-hl-constant-color: #ffc5a4;
  --md-code-hl-operator-color: var(--fd-ink);
  --md-code-hl-punctuation-color: var(--fd-ink);
  --md-code-hl-comment-color: var(--fd-muted);
  --md-code-hl-variable-color: #a5dbf8;
  --md-code-hl-generic-color: #a5dbf8;
}
.md-typeset code {
  padding: 2px 4px;
  color: var(--fd-ink);
  font-family: var(--fd-mono);
  font-size: 0.82em;
  background: var(--fd-soft);
  border: 0;
  border-radius: var(--fd-radius);
  overflow-wrap: anywhere;
}
.md-typeset .highlight,
.md-typeset pre {
  margin: 32px 0;
  color: var(--fd-ink);
  background: var(--fd-soft);
  border: 0;
  border-radius: var(--fd-radius);
  box-shadow: none;
}
.md-typeset .highlight > pre { margin: 0; }
.md-typeset pre > code {
  display: block;
  padding: 24px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}
.md-clipboard { color: var(--fd-muted); }
.md-clipboard:hover,
.md-clipboard:focus-visible { color: var(--fd-accent); }

/* Reference tables scroll locally. Rules separate rows; no outer box. */
.md-typeset__scrollwrap { margin: 32px 0; }
.md-typeset__table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--fd-border) transparent;
}
.md-typeset table:not([class]) {
  display: table;
  width: 100%;
  min-width: 560px;
  max-width: none;
  margin: 0;
  color: var(--fd-ink);
  font-size: 15px;
  line-height: 1.6;
  background: transparent;
  border: 0;
  border-collapse: collapse;
  border-radius: 0;
  box-shadow: none;
}
.md-typeset table:not([class]) th {
  color: var(--fd-muted);
  font-family: var(--fd-body);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--fd-border);
}
.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: 8px 16px 8px 0;
  vertical-align: top;
}
.md-typeset table:not([class]) td { border-bottom: 1px solid var(--fd-border); }
.md-typeset table:not([class]) tbody tr:hover { background: transparent; }
.md-typeset table:not([class]) td:first-child { min-width: 120px; }
.md-typeset table:not([class]) td:last-child,
.md-typeset table:not([class]) th:last-child { padding-right: 0; }
.md-typeset .fd-ref td:nth-child(2) {
  font-family: var(--fd-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* Ordered checks (step, check, outcome): <div class="fd-ladder" markdown> around the table.
 * Each outcome cell names its own condition ("Missing: ..."), so phones can stack each row
 * as "step | check, then -> outcome" and hide the header row visually only. */
.md-typeset .fd-ladder table:not([class]) { table-layout: fixed; }
.md-typeset .fd-ladder table:not([class]) th:first-child { width: 4.5em; }
.md-typeset .fd-ladder table:not([class]) th:last-child { width: 40%; }
.md-typeset .fd-ladder table:not([class]) td:first-child { min-width: 0; color: var(--fd-muted); font-family: var(--fd-mono); font-size: 13px; }
.md-typeset .fd-ladder > p { margin: 24px 0 -16px; font-size: 14px; }
@media screen and (max-width: 700px) {
  .md-typeset .fd-ladder table:not([class]) { min-width: 0; }
  .md-typeset .fd-ladder table:not([class]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .md-typeset .fd-ladder table:not([class]) tr { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); padding: 8px 0; border-bottom: 1px solid var(--fd-border); }
  .md-typeset .fd-ladder table:not([class]) td { display: block; position: static; padding: 0; background: none; border: 0; }
  .md-typeset .fd-ladder table:not([class]) td:first-child { grid-row: span 2; }
  .md-typeset .fd-ladder table:not([class]) td:last-child { color: var(--fd-muted); }
  .md-typeset .fd-ladder table:not([class]) td:last-child::before { content: "\2192\00a0"; }
  .md-typeset .fd-ladder table:not([class]) td:last-child:empty { display: none; }
}
.md-typeset td.fd-number { font-family: var(--fd-mono); font-variant-numeric: tabular-nums; text-align: right; }
.md-typeset .fd-ref td:first-child code { overflow-wrap: normal; }
.md-typeset .fd-ref--defaults td:first-child { min-width: 210px; }
.md-typeset .fd-ref--defaults td:nth-child(2) { min-width: 96px; }

/* The full workflow is available, but it does not occupy six screens. */
.md-typeset details:not(.fd-copy-menu) {
  margin: 32px 0;
  padding: 0;
  font-size: 16px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.md-typeset details:not(.fd-copy-menu) > summary {
  margin: 0;
  padding: 16px 32px 16px 0;
  color: var(--fd-accent);
  font-family: var(--fd-body);
  font-size: 16px;
  font-weight: 600;
  background: transparent;
  border-top: 1px solid var(--fd-border);
  border-bottom: 1px solid var(--fd-border);
}
.md-typeset details:not(.fd-copy-menu) > summary::before { display: none; }
.md-typeset details:not(.fd-copy-menu) > summary::after { color: var(--fd-accent); }
.md-typeset details[open]:not(.fd-copy-menu) > summary { margin-bottom: 24px; }
.md-typeset .admonition {
  margin: 24px 0;
  padding: 0 0 0 20px;
  color: var(--fd-ink);
  font-size: 16px;
  background: transparent;
  border: 0;
  border-left: 2px solid var(--fd-border);
  border-radius: 0;
  box-shadow: none;
}
.md-typeset .admonition-title { background: transparent; }
.md-typeset .admonition-title::before { display: none; }
.md-typeset .admonition.danger,
.md-typeset .admonition.warning { border-left-color: var(--fd-danger); }

/* Page tools stay available without competing with the title. */
.fd-page-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.fd-page-heading h1 { min-width: 0; }
.fd-page-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.fd-copy-page,
.fd-copy-menu > summary {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 4px 8px;
  color: var(--fd-muted);
  font: 12px var(--fd-body);
  background: transparent;
  border: 0;
  border-radius: var(--fd-radius);
  cursor: pointer;
}
.fd-copy-menu { position: relative; margin: 0 !important; border: 0 !important; box-shadow: none !important; }
.fd-copy-menu > summary { list-style: none; }
.fd-copy-menu > summary::-webkit-details-marker { display: none; }
.md-typeset .fd-copy-menu { padding: 0; background: transparent; }
.md-typeset .fd-copy-menu > summary { margin: 0; padding: 4px 8px; color: var(--fd-muted); background: transparent; border: 0; }
.md-typeset .fd-copy-menu > summary::before,
.md-typeset .fd-copy-menu > summary::after { display: none; }
.fd-copy-menu__panel {
  position: absolute;
  top: 100%; right: 0;
  z-index: 20;
  width: 248px;
  padding: 8px;
  background: var(--fd-paper);
  border: 1px solid var(--fd-border);
}
.fd-copy-menu__item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 8px;
  font-size: 12px;
  text-decoration: none !important;
}
.fd-copy-menu__item span:last-child { color: var(--fd-muted); }
.fd-copy-menu__item:hover { background: var(--fd-soft); }

/* Render Mermaid source with Pele. Keep the source readable without JS. */
.fd-pele-render {
  --pele-bg: var(--fd-paper);
  --pele-fg: var(--fd-ink);
  --pele-muted: var(--fd-muted);
  --pele-line: var(--fd-muted);
  --pele-surface: var(--fd-soft);
  --pele-surface-alt: var(--fd-surface);
  --pele-border: var(--fd-border);
  --pele-accent: var(--fd-accent);
  --pele-series-1: var(--fd-accent);
  --pele-series-2: var(--fd-muted);
  --pele-critical: var(--fd-danger);
  --pele-error: var(--fd-danger);
  --pele-font: var(--fd-body);
  --pele-font-mono: var(--fd-mono);
  --pele-radius: var(--fd-radius);
  margin: 32px 0;
  max-width: 100%;
  min-width: 0;
}
.fd-pele-render > svg { display: block; max-width: 100%; height: auto; }
.fd-pele-render .pele-node.service > rect,
.fd-pele-render .pele-task.pele-done > rect { fill: var(--fd-tint); stroke: var(--fd-accent); }
.md-typeset pre.fd-pele-source[hidden], .fd-pele-render[hidden] { display: none; }

/* The source and the SVG use the same slot from the first paint. */
.fd-pele-slot {
  container: fd-pele / inline-size;
  display: grid;
  margin: 32px 0;
}
.fd-pele-slot--path { --fd-pele-height: 264px; }
.fd-pele-slot--timeline { --fd-pele-height: 168px; }
.fd-pele-slot--deploy { --fd-pele-height: 408px; }
.md-typeset .fd-pele-slot > :is(.fd-pele-source, .fd-pele-render) {
  grid-area: 1 / 1;
  min-inline-size: 0;
  block-size: var(--fd-pele-height);
  margin: 0;
  overflow: auto;
}
.fd-pele-slot > .fd-pele-render > svg { max-block-size: 100%; }
@container fd-pele (min-width: 460px) {
  .fd-pele-slot--path > * { --fd-pele-height: 72px; }
}
@container fd-pele (min-width: 780px) {
  .fd-pele-slot--deploy > * { --fd-pele-height: 250px; }
}
.fv-chart-link { font-size: 14px; }

/* Home shares the document surface. Its example is visible before scrolling. */
.fd-home { max-width: none; }
.fd-home > h1, .fd-home > div.highlight, .fd-home > h2 { max-width: 68ch; }
.fd-home h1 { font-size: 48px; margin-bottom: 24px; }
.fd-home > p:first-of-type { font-size: 21px; line-height: 1.55; letter-spacing: -0.01em; }
.fd-home ul { padding-left: 20px; }
.fd-home li { margin-bottom: 16px; }
.md-typeset .md-button {
  padding: 10px 16px;
  color: var(--fd-paper);
  font: 600 15px var(--fd-body);
  text-decoration: none;
  background: var(--fd-accent);
  border: 1px solid var(--fd-accent);
  border-radius: var(--fd-radius);
}
.md-typeset .md-button:hover { color: var(--fd-ink); background: var(--fd-tint); border-color: var(--fd-tint); }
.fd-eo-note { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.fd-eo-note img { width: 40px; height: 40px; }
.fd-eo-note strong { font-size: 14px; }
.fd-eo-note p { margin: 0; }
.md-footer { background: var(--fd-paper); border-top: 1px solid var(--fd-border); }
.md-footer-meta { color: var(--fd-muted); background: var(--fd-paper); }
.md-footer__title { font-size: 16px; }
.md-top { color: var(--fd-ink); background: var(--fd-paper); border: 1px solid var(--fd-border); box-shadow: none; }

@media screen and (min-width: 76.25em) {
  .md-sidebar--primary .md-sidebar__scrollwrap { padding-right: 16px; }
  .md-sidebar--primary .md-nav__link--active { color: var(--fd-accent); }
}
@media screen and (max-width: 76.234375em) {
  .md-sidebar--primary { width: min(320px, calc(100vw - 48px)); padding: 0; background: var(--fd-paper); }
  [dir="ltr"] .md-sidebar--primary { left: 0; transform: translateX(-100%); }
  [dir="rtl"] .md-sidebar--primary { right: 0; transform: translateX(100%); }
  [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary { transform: translateX(0); }
  .md-nav--primary { display: block; overflow-y: auto; }
  .md-nav--primary > .md-nav__title { display: flex; min-height: 64px; align-items: center; padding: 16px; border-bottom: 1px solid var(--fd-border); }
  .md-nav--primary > .md-nav__title .md-logo { position: static; margin: 0; padding: 0 16px 0 0; }
  .md-nav--primary .md-nav { position: static; width: auto; height: auto; visibility: visible; opacity: 1; transform: none; }
  .md-nav--primary .md-nav > .md-nav__title,
  .md-nav--primary .md-nav--secondary,
  .md-nav--primary label[for="__toc"] { display: none !important; }
  .md-nav--primary label[for="__toc"] + a.md-nav__link { display: flex; }
  .md-nav--primary .md-nav__list { transform: none; background: var(--fd-paper); }
  .md-nav--primary .md-nav__link { min-height: 36px; padding: 8px 16px; font-size: 15px; }
  .md-nav--primary .md-nav__item--section > .md-nav__link .md-nav__icon,
  .md-nav--primary .md-nav__item--section > .md-nav__container > label { display: none; }
}
@media screen and (max-width: 600px) {
  :root { --fd-header-height: 56px; }
  .md-content__inner { padding: 32px 24px 64px; }
  .md-typeset h1 { font-size: 34px; }
  .md-typeset h2 { font-size: 23px; }
  .fd-home h1 { font-size: 42px; }
  .fd-home > p:first-of-type { font-size: 19px; }
  .fd-page-heading { display: block; }
  .fd-page-tools { position: relative; margin: -8px 0 24px; }
  .fd-copy-menu { position: static; }
  .fd-copy-menu__panel { left: 0; right: auto; width: min(248px, calc(100vw - 48px)); }
  .md-typeset pre > code { padding: 20px; font-size: 12px; }
  .md-typeset table:not([class]) { min-width: 560px; }
  /* Two columns fit a phone: wrap them instead of scrolling sideways. */
  .md-typeset table:not([class]):has(th:nth-child(2):last-child) { min-width: 0; }
  .md-typeset table:not([class]) td:first-child,
  .md-typeset table:not([class]) th:first-child { position: sticky; left: 0; z-index: 1; background: var(--fd-paper); }
  .md-typeset .fd-ref td:first-child { max-width: 160px; }
  .md-typeset .fd-ref td:first-child code { white-space: normal; overflow-wrap: anywhere; }
  .md-footer__inner { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===================================================================
 * Explorables: one visual system for every interactive figure.
 * Each FoundationDB subspace has one colour everywhere on the site:
 *   item (i) green · index (x) blue · stream (v) amber · receipt violet.
 * =================================================================== */
:root,
[data-md-color-scheme="default"] {
  --fdx-item: #14804a;
  --fdx-index: #2f5bd3;
  --fdx-stream: #b45309;
  --fdx-receipt: #8b3fc9;
  --fdx-dir: #64748b;
  --fdx-bad: #c42b2b;
  --fdx-panel: #ffffff;
  --fdx-glow: rgba(20, 128, 74, 0.16);
}
[data-md-color-scheme="slate"] {
  --fdx-item: #5ee09a;
  --fdx-index: #8fb0ff;
  --fdx-stream: #fbbf5a;
  --fdx-receipt: #d3a6ff;
  --fdx-dir: #94a3b8;
  --fdx-bad: #ff8a8a;
  --fdx-panel: #1a221e;
  --fdx-glow: rgba(94, 224, 154, 0.18);
}
.fdx-c-item { --fdx-c: var(--fdx-item); }
.fdx-c-index { --fdx-c: var(--fdx-index); }
.fdx-c-stream { --fdx-c: var(--fdx-stream); }
.fdx-c-receipt { --fdx-c: var(--fdx-receipt); }
.fdx-c-dir { --fdx-c: var(--fdx-dir); }

/* Placeholder slots reserve the figure's height so nothing shifts. */
.md-typeset [data-fdx] { position: relative; margin: 32px 0; }
.md-typeset [data-fdx]:not([data-fdx-mounted]) > .fdx-fallback { opacity: 1; }
.md-typeset [data-fdx="putitem"] { min-height: 780px; }
.md-typeset .fdx-fallback {
  display: grid;
  place-items: center;
  min-height: inherit;
  padding: 24px;
  color: var(--fd-muted);
  font-size: 14px;
  border: 1px solid var(--fd-border);
  border-radius: 8px;
  background: var(--fd-surface);
}

.md-typeset figure.fdx {
  display: block;
  width: auto;
  max-width: none;
  text-align: left;
}
.md-typeset .fdx {
  position: relative;
  margin: 0;
  padding: 20px 22px 14px;
  color: var(--fd-ink);
  font-size: 14px;
  line-height: 1.45;
  background-color: var(--fd-surface);
  border: 1px solid var(--fd-border);
  border-radius: 8px;
}
.md-typeset .fdx:focus-visible { outline-offset: 2px; }
.md-typeset .fdx code {
  padding: 0 3px;
  font-size: 0.86em;
  background: var(--fd-soft);
  border-radius: 3px;
}
.fdx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 14px; }
.fdx-title { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.fdx-hint { margin-left: auto; color: var(--fd-muted); font: 11px var(--fd-mono); }
.fdx-space { position: relative; padding-left: 0; transition: padding 0.3s; }
.fdx-space::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 4px;
  left: 0;
  width: 3px;
  background: var(--fd-accent);
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s ease-out;
}
.fdx-space.is-committed { padding-left: 10px; }
.fdx-space.is-committed::before { transform: scaleY(1); }
.fdx-kicker {
  color: var(--fd-accent);
  font: 600 11px/1 var(--fd-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.md-typeset .fdx h4 {
  margin: 0 0 10px;
  color: var(--fd-muted);
  font: 600 11px/1 var(--fd-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fdx-tag {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  color: var(--fd-paper);
  font: 700 11px/1 var(--fd-mono);
  background: var(--fdx-c, var(--fdx-dir));
  border-radius: 4px;
}
.fdx-pill {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 6px;
  color: var(--fd-muted);
  font: 600 11px/18px var(--fd-mono);
  border: 1px solid var(--fd-border);
  border-radius: 999px;
}
.fdx-pill.is-ok { color: var(--fdx-item); border-color: var(--fdx-item); }
.fdx-pill.is-bad { color: var(--fdx-bad); border-color: var(--fdx-bad); }

/* Controls shared by every step-through. */
.fdx-caption {
  min-height: 66px;
  margin: 14px 0 10px;
  font-size: 15px;
  line-height: 1.5;
}
.fdx-caption strong { font-weight: 650; }
.fdx-controls { display: flex; align-items: center; gap: 8px; }
.md-typeset .fdx-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--fd-ink);
  font: 600 14px/1 var(--fd-body);
  background: var(--fd-paper);
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  cursor: pointer;
}
.md-typeset .fdx-btn:hover:not(:disabled) { border-color: var(--fd-accent); color: var(--fd-accent); }
.md-typeset .fdx-btn:disabled { opacity: 0.35; cursor: default; }
.md-typeset .fdx-btn--play { color: var(--fd-paper); background: var(--fd-accent); border-color: var(--fd-accent); }
.md-typeset .fdx-btn--play:hover:not(:disabled) { color: var(--fd-paper); filter: brightness(1.1); }
.fdx-scrub { position: relative; flex: 1; min-width: 0; height: 34px; }
.fdx-scrub input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.fdx-ticks {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}
.md-typeset .fdx-tick {
  flex: 1;
  height: 6px;
  padding: 0;
  background: var(--fd-border);
  border: 0;
  border-radius: 3px;
  transition: background 0.25s;
}
.fdx-tick span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fdx-tick.is-done { background: color-mix(in srgb, var(--fd-accent) 45%, var(--fd-border)); }
.fdx-tick.is-current { background: var(--fd-accent); }
.fdx-scrub:has(input:focus-visible) { outline: 2px solid var(--fd-accent); outline-offset: 3px; border-radius: 4px; }
.fdx-count { flex: none; min-width: 40px; color: var(--fd-muted); font: 12px var(--fd-mono); text-align: right; }
.md-typeset .fdx-sources {
  margin: 12px 0 0;
  padding-top: 10px;
  color: var(--fd-muted);
  font-size: 12px;
  border-top: 1px dashed var(--fd-border);
}
.md-typeset .fdx-sources a { color: var(--fd-muted); }
.md-typeset .fdx-sources a:hover { color: var(--fd-accent); }

/* 1. PutItem hero. */
.fdx-stage {
  display: grid;
  /* The request column is never narrower than its JSON lines. */
  grid-template-columns: minmax(min-content, 0.95fr) 28px minmax(0, 1.05fr) 28px minmax(0, 1.35fr);
  align-items: stretch;
  min-height: 300px;
}
.fdx-lane {
  min-width: 0;
  padding: 12px;
  background: var(--fdx-panel);
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.fdx-lane.is-active { border-color: var(--fd-accent); box-shadow: 0 0 0 4px var(--fdx-glow); }
.md-typeset .fdx-code {
  margin: 0;
  font-size: 12px;
}
.md-typeset .fdx-code code {
  display: block;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}
.fdx-code .t-k { color: var(--fd-accent); font-weight: 700; }
.fdx-code .t-s { color: var(--fdx-index); }
.fdx-reply {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px dashed var(--fd-border);
  border-radius: 6px;
  opacity: 0.35;
  transition: opacity 0.3s, border-color 0.3s;
}
.fdx-reply.is-on { opacity: 1; border-style: solid; border-color: var(--fdx-item); }
.fdx-status { color: var(--fdx-item); font: 700 14px var(--fd-mono); }
.fdx-note { margin-left: auto; color: var(--fd-muted); font: 11px var(--fd-mono); }
.md-typeset .fdx-phases { margin: 0 0 10px; padding: 0; list-style: none; }
.md-typeset .fdx-phases li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 3px 0;
  color: var(--fd-muted);
  font-size: 12.5px;
  transition: color 0.3s;
}
.fdx-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--fd-border);
  border-radius: 50%;
  transition: background 0.3s, border-color 0.3s;
}
.md-typeset .fdx-phases li.is-done { color: var(--fd-ink); }
.fdx-phases li.is-done .fdx-dot { background: var(--fd-accent); border-color: var(--fd-accent); }
.fdx-phases li.is-current .fdx-dot { box-shadow: 0 0 0 4px var(--fdx-glow); }
.md-typeset .fdx-phases li.is-current { font-weight: 650; }
.fdx-txn {
  position: relative;
  padding: 18px 8px 8px;
  border: 1.5px dashed var(--fd-border);
  border-radius: 6px;
}
.fdx-txn-label {
  position: absolute;
  top: -8px;
  left: 8px;
  padding: 0 4px;
  color: var(--fd-muted);
  font: 600 10px/16px var(--fd-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--fdx-panel);
}
.fdx-rv, .fdx-cv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--fd-muted);
  font: 11px var(--fd-mono);
  opacity: 0.3;
  transition: opacity 0.3s;
}
.fdx-rv.is-on, .fdx-cv.is-on { opacity: 1; color: var(--fd-ink); }
.fdx-cv { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--fd-border); }
.fdx-cv.is-on code { color: var(--fd-paper); background: var(--fd-accent); }
.md-typeset .fdx-wset { margin: 8px 0 0; padding: 0; list-style: none; }
.md-typeset .fdx-mut {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  padding: 3px 5px;
  font-size: 11px;
  border: 1px dashed color-mix(in srgb, var(--fdx-c) 70%, transparent);
  border-radius: 4px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s, transform 0.35s;
}
.md-typeset .fdx .fdx-mut code { padding: 0; background: none; }
.fdx-mut .fdx-tag { min-width: 16px; height: 16px; font-size: 10px; }
.fdx-wset.is-on .fdx-mut { opacity: 1; transform: none; }
.fdx-wset.is-on .fdx-mut:nth-child(2) { transition-delay: 0.12s; }
.fdx-wset.is-on .fdx-mut:nth-child(3) { transition-delay: 0.24s; }
.fdx-wset.is-on .fdx-mut:nth-child(4) { transition-delay: 0.36s; }
.fdx-wset.is-on .fdx-mut:nth-child(5) { transition-delay: 0.48s; }
.fdx-wset.is-flushed .fdx-mut { opacity: 0.18; transform: translateX(8px); }
.fdx-dir { margin-bottom: 10px; }
.fdx-dir-name {
  margin-bottom: 4px;
  color: var(--fdx-dir);
  font: 600 11px var(--fd-mono);
}
.fdx-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "tag key" "tag val";
  column-gap: 8px;
  align-items: center;
  margin: 4px 0;
  padding: 5px 7px;
  background: var(--fd-paper);
  border: 1px dashed var(--fd-border);
  border-radius: 5px;
  outline: none;
  opacity: 0.4;
  filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s, border-color 0.2s, background 0.2s;
}
.fdx-row .fdx-tag { grid-area: tag; }
.md-typeset .fdx .fdx-key { grid-area: key; padding: 0; font-size: 11.5px; background: none; }
.fdx-val { grid-area: val; color: var(--fd-muted); font-size: 11px; }
.fdx-row.is-on {
  opacity: 1;
  filter: none;
  border-style: solid;
  border-color: color-mix(in srgb, var(--fdx-c) 55%, var(--fd-border));
  background: color-mix(in srgb, var(--fdx-c) 7%, var(--fd-paper));
  animation: fdx-land 0.7s ease-out;
}
.fdx-row:hover, .fdx-row:focus-visible { border-color: var(--fdx-c); }
@keyframes fdx-land {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fdx-c) 55%, transparent); }
  100% { box-shadow: 0 0 0 10px transparent; }
}
.fdx-wire { position: relative; align-self: center; height: 2px; margin: 0 2px; background: var(--fd-border); }
.fdx-packet {
  position: absolute;
  top: -4px;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--fd-accent);
  border-radius: 50%;
  opacity: 0;
}
.fdx-wire.is-fwd .fdx-packet { animation: fdx-fwd 0.9s ease-in-out 2; }
.fdx-wire.is-back .fdx-packet { animation: fdx-back 0.9s ease-in-out 2; }
@keyframes fdx-fwd { 0% { left: 0; opacity: 1; } 100% { left: calc(100% - 10px); opacity: 1; } }
@keyframes fdx-back { 0% { left: calc(100% - 10px); opacity: 1; } 100% { left: 0; opacity: 1; } }
.fdx-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; font-size: 13px; }
.md-typeset .fdx-detail { margin: 0; min-height: 40px; color: var(--fd-muted); }
.fdx-detail .fdx-tag { margin-right: 4px; }

@media screen and (max-width: 700px) {
  .md-typeset .fdx { padding: 14px 12px 10px; }
  .fdx-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 22px auto 22px auto; }
  /* Phones: the write set shows its six tags in one row; the FoundationDB lane below spells out each key. */
  .md-typeset .fdx-put .fdx-wset { display: flex; flex-wrap: wrap; gap: 4px; }
  .md-typeset .fdx-put .fdx-mut { margin: 0; padding: 3px; }
  .md-typeset .fdx .fdx-mut code { display: none; }
  .fdx-wire { justify-self: center; width: 2px; height: 100%; margin: 0; }
  .fdx-packet { left: -4px; }
  .fdx-wire.is-fwd .fdx-packet { animation-name: fdx-down; }
  .fdx-wire.is-back .fdx-packet { animation-name: fdx-up; }
  .fdx-foot { grid-template-columns: 1fr; }
  .fdx-caption { min-height: 112px; }
  .fdx-hint { display: none; }
  /* Phones: a step's text and its controls stay on screen while the reader scrolls through the figure. */
  .fdx-stepfoot {
    display: flow-root;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -12px;
    padding: 0 12px 8px;
    background: var(--fd-surface);
    box-shadow: 0 -1px 0 var(--fd-border);
  }
}
@keyframes fdx-down { 0% { top: 0; opacity: 1; } 100% { top: calc(100% - 10px); opacity: 1; } }
@keyframes fdx-up { 0% { top: calc(100% - 10px); opacity: 1; } 100% { top: 0; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .fdx *, .fdx *::before, .fdx *::after { animation: none !important; transition: none !important; }
}

/* 2. Key layout explorer. */
.md-typeset [data-fdx="keys"] { min-height: 1120px; }
.fdx-c-attr { --fdx-c: var(--fd-ink); }
.fdx-c-num { --fdx-c: var(--fdx-stream); }
.md-typeset .fdx-lede { margin: 0 0 12px; color: var(--fd-muted); font-size: 14px; }
.fdx-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fdx-field { display: grid; gap: 4px; }
.fdx-field-name { color: var(--fd-muted); font: 600 11px var(--fd-mono); }
.fdx-field-name em { margin-left: 2px; color: var(--fd-accent); font-style: normal; }
.fdx-field-name small { display: block; font-weight: 400; }
.md-typeset .fdx-field input {
  width: 100%;
  padding: 7px 9px;
  color: var(--fd-ink);
  font: 13px var(--fd-mono);
  background: var(--fd-paper);
  border: 1px solid var(--fd-border);
  border-radius: 5px;
}
.fdx-field input:focus { border-color: var(--fd-accent); outline: none; box-shadow: 0 0 0 3px var(--fdx-glow); }
.fdx-field input[aria-invalid="true"] { border-color: var(--fdx-bad); }
.md-typeset .fdx-err { min-height: 20px; margin: 6px 0; color: var(--fdx-bad); font-size: 12px; }
.fdx-keyrow { margin: 6px 0 14px; }
.fdx-keyrow-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.fdx-keylen { margin-left: auto; color: var(--fd-muted); font: 11px var(--fd-mono); }
.fdx-keyscroll { overflow-x: auto; padding: 4px 2px 8px; }
.fdx-keyline { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px 4px; }
.fdx-plus { align-self: flex-end; padding: 0 2px 6px; color: var(--fd-muted); font: 12px var(--fd-mono); }
.fdx-grp {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid transparent;
  border-top: 3px solid var(--fdx-c);
  border-radius: 4px;
  background: color-mix(in srgb, var(--fdx-c) 6%, transparent);
  cursor: default;
  outline: none;
}
.fdx-grp:hover, .fdx-grp:focus-visible { border-color: var(--fdx-c); background: color-mix(in srgb, var(--fdx-c) 12%, transparent); }
.fdx-grp.is-prefix { border-top-style: dashed; }
.md-typeset .fdx-grp-label code { padding: 0; font-size: 11px; white-space: nowrap; background: none; }
.fdx-bytes { display: flex; gap: 2px; }
.fdx-byte {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 24px;
  padding: 0 2px;
  font: 11.5px var(--fd-mono);
  background: var(--fd-paper);
  border: 1px solid var(--fd-border);
  border-radius: 3px;
}
.fdx-byte.r-type { color: var(--fd-paper); background: var(--fdx-dir); border-color: var(--fdx-dir); }
.fdx-byte.r-end { color: var(--fdx-dir); border-style: dashed; }
.fdx-byte.r-escape { color: var(--fd-paper); background: var(--fdx-bad); border-color: var(--fdx-bad); }
.fdx-byte.r-sign, .fdx-byte.r-zero { color: var(--fd-paper); background: var(--fdx-stream); border-color: var(--fdx-stream); }
.fdx-byte.r-exp { border-color: var(--fdx-stream); background: color-mix(in srgb, var(--fdx-stream) 16%, var(--fd-paper)); }
.fdx-byte.r-digit { border-color: color-mix(in srgb, var(--fdx-stream) 50%, var(--fd-border)); }
.fdx-byte.r-numend { color: var(--fdx-stream); border: 1px dashed var(--fdx-stream); }
.fdx-byte.r-prefix { min-width: 64px; color: var(--fd-muted); border-style: dashed; }
.md-typeset .fdx-keynote { margin: 2px 0 0; color: var(--fd-muted); font-size: 12.5px; }
.fdx-kdetail {
  min-height: 112px;
  padding: 10px 12px;
  font-size: 13.5px;
  background: var(--fdx-panel);
  border: 1px solid var(--fd-border);
  border-radius: 6px;
}
.md-typeset .fdx-kdetail p { margin: 0 0 8px; }
.fdx-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--fd-muted); font-size: 12px; }
.fdx-leg { display: inline-flex; align-items: center; gap: 2px; }
.fdx-leg .fdx-byte { min-width: 18px; height: 18px; font-size: 9px; }
.fdx-leg.is-hot { color: var(--fd-ink); font-weight: 650; }
.fdx-sort { margin-top: 14px; }
.md-typeset .fdx-sort-title { margin: 0 0 8px; font-size: 13.5px; }
.fdx-sortcols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.fdx-sortcol { padding: 10px 12px; background: var(--fdx-panel); border: 1px solid var(--fd-border); border-radius: 6px; }
.fdx-sortcol.is-ok { border-color: color-mix(in srgb, var(--fdx-item) 50%, var(--fd-border)); }
.md-typeset .fdx-sortcol ol { margin: 0; padding-left: 22px; font-size: 12.5px; }
.md-typeset .fdx-sortcol li { margin: 2px 0; }
.fdx-sortcol li.is-user code { color: var(--fd-paper); background: var(--fd-accent); }
.fdx-sortbytes { margin-left: 8px; color: var(--fd-muted); font: 11px var(--fd-mono); }
@media screen and (max-width: 700px) {
  .md-typeset [data-fdx="keys"] { min-height: 1990px; }
  .fdx-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fdx-sortcols { grid-template-columns: 1fr; }
}

/* Shared step-through parts: tabs, attempts, scope note. */
.fdx-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.md-typeset .fdx-tab {
  padding: 6px 10px;
  color: var(--fd-ink);
  font: 600 12.5px var(--fd-body);
  background: var(--fd-paper);
  border: 1px solid var(--fd-border);
  border-radius: 999px;
  cursor: pointer;
}
.md-typeset .fdx-tab[aria-selected="true"] { color: var(--fd-paper); background: var(--fd-ink); border-color: var(--fd-ink); }
.md-typeset .fdx-tab.is-bad[aria-selected="true"] { background: var(--fdx-bad); border-color: var(--fdx-bad); }
.fdx-tab-code { font: 600 10.5px var(--fd-mono); opacity: 0.7; }
.fdx-hstatus { margin-top: 10px; font-size: 12.5px; }
.fdx-hstatus.is-ok { color: var(--fdx-item); font-weight: 650; }
.fdx-hstatus.is-bad { color: var(--fdx-bad); font-weight: 650; }
.md-typeset .fdx-budget { margin: 8px 0 0; color: var(--fd-muted); font: 11px var(--fd-mono); }
.fdx-attempt {
  position: relative;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--fd-border);
  border-radius: 6px;
  background: var(--fd-paper);
}
.fdx-attempt.is-past { opacity: 0.55; }
.fdx-att-name { color: var(--fd-muted); font: 600 10.5px var(--fd-mono); text-transform: uppercase; letter-spacing: 0.06em; }
.md-typeset .fdx-alines { margin: 4px 0 0; padding: 0; list-style: none; }
.md-typeset .fdx-alines li {
  margin: 2px 0;
  padding-left: 14px;
  font: 12px var(--fd-mono);
  position: relative;
  animation: fdx-in 0.35s ease-out;
}
.fdx-alines li::before { content: "›"; position: absolute; left: 2px; color: var(--fd-muted); }
.fdx-alines li.is-go { color: var(--fd-accent); font-weight: 600; }
.fdx-alines li.is-ok { color: var(--fdx-item); font-weight: 600; }
.fdx-alines li.is-warn { color: var(--fdx-stream); font-weight: 600; }
.fdx-alines li.is-bad { color: var(--fdx-bad); font-weight: 600; }
@keyframes fdx-in { from { opacity: 0; transform: translateY(-3px); } }
.fdx-nval { grid-area: val; font: 700 16px var(--fd-mono); }
.fdx-row.is-hot { animation: fdx-land 0.8s ease-out; }
.fdx-row.is-absent { opacity: 0.55; filter: grayscale(1); }
.fdx-row.is-wrong { border-color: var(--fdx-bad); }
.fdx-row.is-wrong .fdx-nval { color: var(--fdx-bad); }
.md-typeset .fdx-dbnote { margin: 4px 0 0; color: var(--fd-muted); font-size: 11.5px; }
.md-typeset .fdx-dbnote.is-bad { color: var(--fdx-bad); }
.md-typeset .fdx-scope {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  background: color-mix(in srgb, var(--fdx-receipt) 7%, var(--fdx-panel));
  border-left: 3px solid var(--fdx-receipt);
  border-radius: 4px;
}

/* 4. GRV grant queue. */
.md-typeset [data-fdx="grvqueue"] { min-height: 770px; }
.fdx-glegend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 8px; color: var(--fd-muted); font-size: 12px; }
.fdx-glegend span { display: inline-flex; align-items: center; gap: 6px; }
.fdx-glegend i { display: inline-block; width: 9px; height: 9px; }
.fdx-glegend .g-live { background: var(--fdx-index); }
.fdx-glegend .g-retry { background: var(--fdx-stream); }
.fdx-glegend .g-dead { border: 1px solid var(--fd-muted); background: linear-gradient(135deg, transparent 45%, var(--fd-muted) 45%, var(--fd-muted) 55%, transparent 55%); }
.fdx-glegend .g-gate { width: 4px; height: 12px; background: var(--fdx-item); }
.fdx-gcanvas { display: block; width: 100%; height: 260px; }
.fdx-gcounters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 12px; }
.fdx-gcount { display: grid; gap: 2px; padding: 10px 12px; background: var(--fdx-panel); border: 1px solid var(--fd-border); border-radius: 6px; }
.fdx-gname { color: var(--fd-muted); font: 600 11px var(--fd-mono); text-transform: uppercase; letter-spacing: 0.05em; }
.fdx-gbig strong { font: 700 28px/1.1 var(--fd-mono); font-variant-numeric: tabular-nums; }
.fdx-gbig small { color: var(--fd-muted); font-size: 12px; }
.fdx-g-wait .fdx-gbig strong { color: var(--fdx-item); }
.fdx-g-cancel .fdx-gbig strong { color: var(--fdx-bad); }
.fdx-gsmall { color: var(--fd-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.fdx-scrub--time { height: 34px; }
.fdx-scrub--time input[type="range"] { opacity: 1; accent-color: var(--fd-accent); background: transparent; }
.fdx-gphase { position: absolute; inset: 0 0 auto; display: flex; height: 6px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.fdx-gphase span { height: 100%; overflow: hidden; color: transparent; font-size: 0; }
.fdx-gphase .is-stall { background: color-mix(in srgb, var(--fdx-bad) 40%, transparent); border-radius: 3px 0 0 3px; }
.fdx-gphase .is-flow { flex: 1; background: color-mix(in srgb, var(--fdx-item) 30%, transparent); border-radius: 0 3px 3px 0; }
.fdx-clock { min-width: 56px; }
@media screen and (max-width: 700px) {
  .md-typeset [data-fdx="grvqueue"] { min-height: 1130px; }
  .fdx-gcounters { grid-template-columns: 1fr; }
}

/* 5. Evidence charts. Series colours: s0 index blue, s1 item green,
 * s2 receipt violet, s3 stream amber. */
.md-typeset [data-fdx="scaleout"] { min-height: 670px; }
.md-typeset [data-fdx="streamlag"] { min-height: 560px; }
.md-typeset [data-fdx="ttl"] { min-height: 380px; }
.md-typeset [data-fdx="dr5tb"] { min-height: 850px; }
.fdx-chart .s0 { --fdx-c: var(--fdx-index); }
.fdx-chart .s1 { --fdx-c: var(--fdx-item); }
.fdx-chart .s2 { --fdx-c: var(--fdx-receipt); }
.fdx-chart .s3 { --fdx-c: var(--fdx-stream); }
.fdx-chart-body { position: relative; }
.fdx-clegend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; color: var(--fd-muted); font-size: 12px; }
.fdx-clegend span { display: inline-flex; align-items: center; gap: 6px; }
.fdx-clegend i { width: 10px; height: 10px; border-radius: 2px; background: var(--fdx-c); }
.md-typeset .fdx-tab[aria-checked="true"] { color: var(--fd-paper); background: var(--fd-ink); border-color: var(--fd-ink); }
.fdx-vplot { position: relative; height: 300px; margin: 8px 0 34px 44px; }
.fdx-vgrid { position: absolute; inset: 0; }
.fdx-vline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--fd-border); }
.fdx-vline span { position: absolute; left: -48px; top: -8px; width: 42px; color: var(--fd-muted); font: 10.5px var(--fd-mono); text-align: right; }
.fdx-vgroups { position: absolute; inset: 0; display: flex; justify-content: space-around; }
.fdx-vgroup { position: relative; display: flex; flex-direction: column; justify-content: flex-end; width: 26%; }
.fdx-vbars { display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 100%; }
.fdx-vbar {
  position: relative;
  width: 40%;
  max-width: 64px;
  background: var(--fdx-c);
  border-radius: 4px 4px 0 0;
  outline: none;
  transition: height 0.45s ease-out, filter 0.15s;
}
.fdx-vbar:hover, .fdx-vbar:focus-visible { filter: brightness(1.15); box-shadow: 0 0 0 3px var(--fdx-glow); }
.fdx-vval { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 3px; color: var(--fd-ink); font: 600 10.5px var(--fd-mono); white-space: nowrap; }
.fdx-vx { position: absolute; top: 100%; left: 0; right: 0; padding-top: 8px; color: var(--fd-muted); font: 11.5px var(--fd-mono); text-align: center; }
.fdx-hbars { display: grid; gap: 6px; margin-bottom: 8px; }
.fdx-hgroup { margin-top: 6px; color: var(--fd-muted); font: 600 11px var(--fd-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.fdx-hrow {
  display: grid;
  grid-template-columns: minmax(120px, 30%) 1fr 104px;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  outline: none;
}
.fdx-hrow:hover, .fdx-hrow:focus-visible { background: var(--fd-soft); }
.fdx-hlabel { font-size: 12.5px; line-height: 1.25; }
.fdx-hlabel small { display: block; color: var(--fd-muted); font: 10.5px var(--fd-mono); }
.fdx-hbar { height: 18px; background: color-mix(in srgb, var(--fd-border) 40%, transparent); border-radius: 3px; overflow: hidden; }
.fdx-hfill { display: block; height: 100%; background: var(--fdx-c); border-radius: 3px; transition: width 0.5s ease-out; }
.fdx-hval { font: 600 12px var(--fd-mono); font-variant-numeric: tabular-nums; text-align: right; }
.fdx-haxis { display: grid; grid-template-columns: minmax(120px, 30%) 1fr 104px; gap: 10px; padding: 0 4px; }
.fdx-hticks { position: relative; height: 16px; border-top: 1px solid var(--fd-border); }
.fdx-hticks span { position: absolute; top: 2px; transform: translateX(-50%); color: var(--fd-muted); font: 10px var(--fd-mono); }
.fdx-hunit { color: var(--fd-muted); font: 10.5px var(--fd-mono); text-align: right; }
.fdx-tip {
  position: absolute;
  z-index: 5;
  max-width: 320px;
  padding: 8px 10px;
  color: var(--fd-ink);
  font-size: 12px;
  background: var(--fd-surface);
  border: 1px solid var(--fd-ink);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.fdx-tip.is-on { opacity: 1; }
.md-typeset .fdx-tiptable { display: table; margin: 4px 0 0; font-size: 11.5px; border: 0; }
.md-typeset .fdx-tiptable th, .md-typeset .fdx-tiptable td { padding: 1px 8px 1px 0; color: var(--fd-ink); font-weight: 400; background: none; border: 0; }
.md-typeset .fdx-tiptable th { color: var(--fd-muted); }
.md-typeset .fdx-tiptable td { font-family: var(--fd-mono); }
.md-typeset .fdx-caveat { margin: 10px 0 0; color: var(--fd-muted); font-size: 12.5px; }
.md-typeset .fdx-check { margin: 8px 0 0; font-size: 13px; }
.md-typeset .fdx-subhead { margin: 18px 0 8px; }
.fdx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 6px; }
.fdx-stat { display: grid; gap: 2px; padding: 10px 12px; background: var(--fdx-panel); border: 1px solid var(--fd-border); border-radius: 6px; }
.fdx-stat strong { font: 700 22px/1.15 var(--fd-mono); }
.fdx-stat.is-ok strong { color: var(--fdx-item); }
.fdx-stat span { color: var(--fd-muted); font-size: 12px; }
@media screen and (max-width: 700px) {
  .md-typeset [data-fdx="scaleout"] { min-height: 780px; }
  .md-typeset [data-fdx="streamlag"] { min-height: 770px; }
  .md-typeset [data-fdx="ttl"] { min-height: 500px; }
  .md-typeset [data-fdx="dr5tb"] { min-height: 1200px; }
  .fdx-hrow, .fdx-haxis { grid-template-columns: 96px 1fr 76px; gap: 6px; }
  .fdx-vplot { margin-left: 40px; height: 260px; }
  .fdx-vbar { width: 44%; }
  .fdx-vval { font-size: 9px; }
  .fdx-stats { grid-template-columns: 1fr; }
}

/* Home: a bolder first screen. The promise list becomes five colour-keyed
 * claims, one per durable guarantee, in the explorables' subspace colours. */
.fd-home h1 {
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}
.fd-home > p:first-of-type { max-width: 34ch; font-size: clamp(19px, 2.1vw, 24px); line-height: 1.4; letter-spacing: -0.015em; }
.fd-home #what-you-can-rely-on + ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  max-width: none;
  padding: 0;
  list-style: none;
}
.fd-home #what-you-can-rely-on + ul > li {
  margin: 0;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.5;
  background: var(--fd-surface);
  border: 1px solid var(--fd-border);
  border-top: 3px solid var(--fdx-c, var(--fd-accent));
  border-radius: 6px;
}
.fd-home #what-you-can-rely-on + ul > li strong { display: block; margin-bottom: 4px; font-size: 16px; }
.fd-home #what-you-can-rely-on + ul > li:nth-child(1) { --fdx-c: var(--fdx-item); }
.fd-home #what-you-can-rely-on + ul > li:nth-child(2) { --fdx-c: var(--fdx-index); }
.fd-home #what-you-can-rely-on + ul > li:nth-child(3) { --fdx-c: var(--fdx-stream); }
.fd-home #what-you-can-rely-on + ul > li:nth-child(4) { --fdx-c: var(--fdx-receipt); }
.fd-home #what-you-can-rely-on + ul > li:nth-child(5) { --fdx-c: var(--fdx-dir); }
/* Clip the flushed write set sideways only: the "one transaction" label sits on the top border. */
.fdx-txn { overflow-x: clip; }
@media screen and (max-width: 700px) {
  .fdx-byte { min-width: 19px; height: 22px; padding: 0 1px; font-size: 10px; }
  .fdx-bytes { gap: 1px; flex-wrap: wrap; }
  .fdx-grp { max-width: 100%; }
}


/* A table-driven figure keeps its source table folded under it (figures/phases, figures/lanes):
 * a plain disclosure, not an admonition. */
.md-typeset details.fdx-fold { margin: 8px 0 0; padding: 0; font-size: inherit; background: none; border: 0; box-shadow: none; }
.md-typeset details.fdx-fold > summary { padding: 4px 0; color: var(--fd-muted); font-size: 13px; font-weight: 400; background: none; border: 0; cursor: pointer; }
.md-typeset details.fdx-fold > summary::before, .md-typeset details.fdx-fold > summary::after { display: none; }
.md-typeset details.fdx-fold > summary:hover { color: var(--fd-accent); }

/* Figures in explorables/figures/ reserve their height from the slot:
 * <div data-fdx="NAME" data-fdx-src="NAME" style="--fdx-h: 900px; --fdx-h-sm: 1600px">. */
.md-typeset [data-fdx-src] { min-height: var(--fdx-h, 400px); }
@media screen and (max-width: 700px) {
  .md-typeset [data-fdx-src] { min-height: var(--fdx-h-sm, var(--fdx-h, 400px)); }
}

/* ------------------------------------------------------------------------
 * Home variant B: a full-bleed hero whose right half is the PutItem figure.
 * The four subspace colours carry the claim: the words in the lede and the
 * "one commit" bar light up together when the figure reaches its commit
 * step (data-step 4 and 5), because all keys commit at one version.
 * Everything here is scoped to .fd-home--b; dropping it restores variant A. */
body:has(.fd-home--b) .md-container { overflow-x: clip; }
.fd-home--b .fdb-hero {
  position: relative;
  width: 100vw;
  margin: -56px calc(50% - 50vw) 56px;
  padding: 64px max(48px, calc(50vw - 620px)) 56px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  /* The page grid shows through; the glow marks the hero. */
  background: radial-gradient(60% 70% at 78% 30%, var(--fdx-glow), transparent 70%);
  border-bottom: 1px solid var(--fd-border);
}
.fd-home--b .fdb-hero::after {
  /* The four subspace colours as one full-width band. */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 4px;
  background: linear-gradient(90deg, var(--fdx-item) 0 25%, var(--fdx-index) 25% 50%, var(--fdx-stream) 50% 75%, var(--fdx-receipt) 75% 100%);
}
.fd-home--b .fdb-hero > * { position: relative; }
.fd-home--b .fdb-hero__copy { position: sticky; top: 88px; }
.md-typeset .fd-home--b .fdb-kicker {
  margin: 0 0 18px;
  font: 600 12px var(--fd-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fd-muted);
}
.md-typeset .fd-home--b h1 {
  margin: 0 0 22px;
  font-size: clamp(64px, 8.4vw, 116px);
  font-weight: 750;
  line-height: 0.92;
  letter-spacing: -0.06em;
}
.md-typeset .fd-home--b h1 .headerlink { display: none; }
.md-typeset .fd-home--b .fdb-lede {
  max-width: 22ch;
  margin: 0 0 28px;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.32;
  letter-spacing: -0.02em;
}
.fd-home--b .fdb-w {
  --c: var(--fd-ink);
  padding: 0 0.12em;
  margin: 0 -0.04em;
  border-radius: 4px;
  font-weight: 650;
  color: var(--c);
  box-shadow: inset 0 -0.14em 0 color-mix(in srgb, var(--c) 45%, transparent);
  transition: background-color 0.45s ease, box-shadow 0.45s ease;
}
.fd-home--b .fdb-w--item { --c: var(--fdx-item); }
.fd-home--b .fdb-w--index { --c: var(--fdx-index); }
.fd-home--b .fdb-w--stream { --c: var(--fdx-stream); }
/* Light scheme: ink text over the glow and grid (AA); the colour is the underline and border. */
[data-md-color-scheme="default"] .fd-home--b .fdb-w,
[data-md-color-scheme="default"] .fd-home--b .fdb-atom,
[data-md-color-scheme="default"] .fd-home--b .fdb-atoms__label { color: var(--fd-ink); }
[data-md-color-scheme="default"] .fd-home--b .fdb-w { box-shadow: inset 0 -0.14em 0 var(--c); }
.md-typeset .fd-home--b .fdb-hero .md-button { margin: 0 8px 10px 0; font-size: 15px; padding: 12px 20px; }
.md-typeset .fd-home--b .fdb-hero .md-button:not(.md-button--primary) {
  color: var(--fd-ink);
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--fd-ink) 35%, transparent);
}
.md-typeset .fd-home--b .fdb-hero .md-button:not(.md-button--primary):hover { border-color: var(--fd-accent); color: var(--fd-accent); }

/* "One commit": four cells that light at the same moment. */
.fd-home--b .fdb-atoms {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 340px;
  margin-top: 26px;
}
.fd-home--b .fdb-atom {
  --c: var(--fd-muted);
  padding: 8px 0 7px;
  font: 600 11px var(--fd-mono);
  text-align: center;
  color: var(--c);
  border: 1.5px dashed color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 5px;
  transition: background-color 0.45s ease, color 0.45s ease, border-color 0.45s ease, transform 0.45s ease;
}
.fd-home--b .fdb-atom--item { --c: var(--fdx-item); }
.fd-home--b .fdb-atom--index { --c: var(--fdx-index); }
.fd-home--b .fdb-atom--stream { --c: var(--fdx-stream); }
.fd-home--b .fdb-atoms__label {
  grid-column: 1 / -1;
  margin-top: 4px;
  font: 600 11px var(--fd-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fd-muted);
  text-align: center;
}
/* Default (no figure, JavaScript off, before mount): only "one commit".
 * A mounted figure before its commit step says "not yet visible";
 * at the commit and reply steps it says "visible together". */
.fd-home--b .fdb-hero:has(.fdx[data-step="0"], .fdx[data-step="1"], .fdx[data-step="2"], .fdx[data-step="3"]) .fdb-atoms__label::before { content: "not yet visible\00a0\2014\00a0"; }
.fd-home--b .fdb-hero:has(.fdx[data-step="4"], .fdx[data-step="5"]) .fdb-atoms__label::before { content: "visible together\00a0\2014\00a0"; }
.fd-home--b .fdb-hero:has(.fdx[data-step="4"], .fdx[data-step="5"]) .fdb-atom {
  color: #fff;
  background: var(--c);
  border-style: solid;
  border-color: var(--c);
  transform: translateY(-2px);
}
[data-md-color-scheme="slate"] .fd-home--b .fdb-hero:has(.fdx[data-step="4"], .fdx[data-step="5"]) .fdb-atom { color: #0d1410; }
.fd-home--b .fdb-hero:has(.fdx[data-step="4"], .fdx[data-step="5"]) .fdb-w {
  background: color-mix(in srgb, var(--c) 16%, transparent);
  box-shadow: inset 0 -0.14em 0 var(--c);
}

/* The figure is the hero's right half: no second frame inside the band. */
.md-typeset .fd-home--b .fdb-hero [data-fdx="putitem"] { margin: 0; min-height: 820px; }
.fd-home--b .fdb-hero .fdx {
  margin: 0;
  background: color-mix(in srgb, var(--fd-surface) 88%, transparent);
  box-shadow: 0 24px 60px -28px rgba(10, 40, 24, 0.35);
  backdrop-filter: blur(2px);
}

/* Entrance: copy rises once. Reduced motion keeps everything still. */
@keyframes fdb-rise { from { opacity: 0; transform: translateY(14px); } }
.fd-home--b .fdb-hero__copy > * { animation: fdb-rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.fd-home--b .fdb-hero__copy > :nth-child(2) { animation-delay: 0.06s; }
.fd-home--b .fdb-hero__copy > :nth-child(3) { animation-delay: 0.12s; }
.fd-home--b .fdb-hero__copy > :nth-child(4) { animation-delay: 0.18s; }
.fd-home--b .fdb-hero__copy > :nth-child(5) { animation-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .fd-home--b .fdb-hero__copy > * { animation: none; }
  .fd-home--b .fdb-w, .fd-home--b .fdb-atom { transition: none; }
}

/* Below the hero: larger type, fuller colour on the promise cards. */
.md-typeset .fd-home--b > p:first-of-type { max-width: 68ch; font-size: inherit; line-height: inherit; letter-spacing: normal; }
.md-typeset .fd-home--b h2 { margin-top: 56px; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -0.03em; }
.fd-home--b #what-you-can-rely-on + ul > li {
  padding: 18px 20px;
  font-size: 15.5px;
  background: color-mix(in srgb, var(--fdx-c, var(--fd-accent)) 9%, var(--fd-surface));
  border: 1px solid color-mix(in srgb, var(--fdx-c, var(--fd-accent)) 30%, var(--fd-border));
  border-left: 5px solid var(--fdx-c, var(--fd-accent));
  border-top-width: 1px;
}
.fd-home--b #what-you-can-rely-on + ul > li strong { font-size: 18px; letter-spacing: -0.01em; color: var(--fdx-c); }

@media screen and (max-width: 1240px) {
  .md-typeset .fd-home--b .fdb-hero [data-fdx="putitem"] { min-height: 763px; }
  .fd-home--b .fdb-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .fd-home--b .fdb-hero__copy { position: static; }
  .md-typeset .fd-home--b .fdb-lede { max-width: 30ch; }
}
@media screen and (max-width: 700px) {
  .fd-home--b .fdb-hero { margin-top: -32px; padding: 40px 16px 40px; }
  .md-typeset .fd-home--b h1 { font-size: 64px; }
  .md-typeset .fd-home--b .fdb-hero [data-fdx="putitem"] { min-height: 1438px; }
}
