/* The blog's figures (blog/*.md): a framed figure holding a title, an inline SVG and a
   caption. Colours are roles, light by default and stepped for the dark scheme (slate). */
.bf-fig {
  --bf-ink: var(--md-default-fg-color);
  --bf-muted: var(--md-default-fg-color--light);
  --bf-frame: #e1e0d9;
  --bf-surface: #f4f3ef;
  --bf-track: #e9e8e3;
  --bf-green: #1f9a72;
  --bf-green-ink: #12805a;
  --bf-green-tint: #dcefe7;
  --bf-steel: #4687a8;
  --bf-steel-tint: #d6e5ec;
  --bf-blue: #4a8fe8;
  --bf-blue-tint: #dce9fa;
  --bf-amber: #b26b00;
  --bf-amber-tint: #f8ead0;
  --bf-claude: #d97757;
  --bf-claude-tint: #f8e8e0;
  --bf-openai: #10a37f;
  --bf-openai-tint: #e2f3ec;
  --bf-xh: #b26b00;
  --bf-xh-tint: #f8ead0;
  --bf-ultra: #7b4fd6;
  --bf-ultra-tint: #ece4fb;
}
[data-md-color-scheme="slate"] .bf-fig {
  --bf-frame: #34342f;
  --bf-surface: #23231f;
  --bf-track: #34342f;
  --bf-green: #22a87c;
  --bf-green-ink: #4fd1a1;
  --bf-green-tint: #1b3a2f;
  --bf-steel: #5199bd;
  --bf-steel-tint: #1f3440;
  --bf-blue: #3d86e0;
  --bf-blue-tint: #1d2f47;
  --bf-amber: #f2b544;
  --bf-amber-tint: #3b3020;
  --bf-claude: #e08a6d;
  --bf-claude-tint: #3a2821;
  --bf-openai: #19c37d;
  --bf-openai-tint: #16302a;
  --bf-xh: #f2b544;
  --bf-xh-tint: #3b3020;
  --bf-ultra: #b195f2;
  --bf-ultra-tint: #2d2543;
}

.md-typeset .bf-fig {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 1.4rem 0;
  padding: 0.8rem 0.9rem 0.7rem;
  border: 1px solid var(--bf-frame);
  border-radius: 0.6rem;
  text-align: left;
}
.md-typeset .bf-fig .bf-title {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.md-typeset .bf-fig svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  font-family: var(--md-text-font-family);
}
.md-typeset .bf-fig figcaption {
  max-width: none;
  margin: 0.7rem 0 0;
  color: var(--bf-muted);
  font-size: 0.64rem;
  font-style: normal;
}

/* text */
.bf-fig .bf-t { fill: var(--bf-ink); font-size: 13px; }
.bf-fig .bf-t-strong { fill: var(--bf-ink); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-fig .bf-t-green { fill: var(--bf-green-ink); font-size: 14px; font-weight: 600; }
.bf-fig .bf-ts { fill: var(--bf-ink); font-size: 14px; font-weight: 600; }
.bf-fig .bf-tm { fill: var(--bf-muted); font-size: 11.5px; }
.bf-fig .bf-tl { fill: var(--bf-muted); font-size: 15px; }
.bf-fig .bf-ttiny { fill: var(--bf-ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.bf-fig .bf-num { fill: var(--bf-ink); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-fig .bf-big { fill: var(--bf-ink); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-fig .bf-big-green { fill: var(--bf-green-ink); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* shapes */
.bf-fig .bf-card,
.bf-fig .bf-cell,
.bf-fig .bf-panel,
.bf-fig .bf-pill { fill: var(--bf-surface); }
.bf-fig .bf-pill { stroke: var(--bf-frame); stroke-width: 1; }
.bf-fig .bf-card-hi,
.bf-fig .bf-pill-hi { fill: var(--bf-green-tint); stroke: var(--bf-green); stroke-width: 2; }
.bf-fig .bf-cell-hi { fill: var(--bf-green-tint); }
.bf-fig .bf-box { fill: none; stroke: var(--bf-frame); stroke-width: 1; }
.bf-fig .bf-slot { fill: var(--bf-steel-tint); }
.bf-fig .bf-track { fill: var(--bf-track); }
.bf-fig .bf-green { fill: var(--bf-green); }
.bf-fig .bf-steel { fill: var(--bf-steel); }
.bf-fig .bf-bar { fill: var(--bf-blue); }
.bf-fig .bf-bar-est { fill: var(--bf-blue-tint); stroke: var(--bf-blue); stroke-width: 1.5; stroke-dasharray: 5 4; }
.bf-fig .bf-dot { fill: var(--bf-surface); stroke: var(--bf-frame); stroke-width: 1; }
.bf-fig .bf-dot-hi { fill: var(--bf-green-tint); stroke: var(--bf-green); stroke-width: 1.5; }

/* lines */
.bf-fig .bf-rule,
.bf-fig .bf-axis { stroke: var(--bf-frame); stroke-width: 1; fill: none; }
.bf-fig .bf-grid { stroke: var(--bf-frame); stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
.bf-fig .bf-arrow,
.bf-fig .bf-link,
.bf-fig .bf-icon { stroke: var(--bf-muted); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bf-fig .bf-icon-green { stroke: var(--bf-green); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* status pills (the roadmap) */
.bf-fig .bf-pill-done,
.bf-fig .bf-pill-later { fill: var(--bf-surface); stroke: var(--bf-frame); stroke-width: 1; }
.bf-fig .bf-pill-ready { fill: var(--bf-amber-tint); stroke: var(--bf-amber); stroke-width: 1; }
.bf-fig .bf-pill-next { fill: var(--bf-blue-tint); stroke: var(--bf-blue); stroke-width: 1; }
.bf-fig .bf-dot-ready { fill: var(--bf-amber-tint); stroke: var(--bf-amber); stroke-width: 1.5; }
.bf-fig .bf-pill-done-t,
.bf-fig .bf-pill-later-t { fill: var(--bf-muted); font-size: 11px; font-weight: 600; }
.bf-fig .bf-pill-ready-t { fill: var(--bf-amber); font-size: 11px; font-weight: 600; }
.bf-fig .bf-pill-next-t { fill: var(--bf-blue); font-size: 11px; font-weight: 600; }

/* the interactive pointer chain (blog.js): cards, then the walk */
.bf-chain [hidden] { display: none !important; }
.md-typeset .bf-chain .bf-cards {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.md-typeset .bf-chain .bf-cards li { margin: 0; padding: 0; }
.md-typeset .bf-chain .bf-cardx {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.45rem 0.2rem 0.35rem;
  border: 2px solid transparent;
  border-radius: 0.45rem;
  background: var(--bf-surface);
  transition: background-color 0.2s, border-color 0.2s;
}
.bf-chain .bf-cl { color: var(--bf-muted); font-size: 0.55rem; }
.bf-chain .bf-cv { font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.3; }
.bf-chain .bf-ca { color: var(--bf-muted); font-size: 0.6rem; line-height: 1; }
.md-typeset .bf-chain .bf-cardx.is-current { background: var(--bf-green-tint); border-color: var(--bf-green); }
.bf-chain .is-visited .bf-ca { color: var(--bf-green); }
.bf-chain .bf-walk {
  margin-top: 0.7rem;
  padding: 0.75rem 0.85rem 0.65rem;
  border-radius: 0.5rem;
  background: var(--bf-surface);
}
.bf-chain .bf-walk-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.8rem;
}
.bf-chain .bf-count { color: var(--bf-muted); font-size: 0.62rem; }
.md-typeset .bf-fig:has(.bf-anim-controls) { position: relative; }
.md-typeset .bf-fig:has(.bf-anim-controls) .bf-title { padding-right: 4.5rem; }
.bf-anim-controls { position: absolute; top: 0.55rem; right: 0.7rem; display: flex; gap: 0.3rem; }
.bf-anim-controls[hidden] { display: none; }
.md-typeset .bf-fig .bf-anim-btn {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 1px solid var(--bf-frame);
  border-radius: 999px;
  background: transparent;
  color: var(--bf-muted);
  cursor: pointer;
}
.md-typeset .bf-fig .bf-anim-btn:hover,
.md-typeset .bf-fig .bf-anim-btn:focus-visible { color: var(--bf-ink); border-color: var(--bf-muted); }
.md-typeset .bf-fig .bf-anim-btn svg { display: block; width: 0.75rem; height: 0.75rem; fill: currentColor; }
.md-typeset .bf-fig .bf-anim-btn[data-state="playing"] .i-play,
.md-typeset .bf-fig .bf-anim-btn[data-state="paused"] .i-pause { display: none; }
.bf-chain .bf-buttons, .bf-bitbuf .bf-buttons { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.bf-chain .bf-btn, .bf-bitbuf .bf-btn {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--bf-frame);
  border-radius: 999px;
  background: transparent;
  color: var(--bf-ink);
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, opacity 0.15s;
}
.bf-chain .bf-btn:hover, .bf-bitbuf .bf-btn:hover { background: var(--bf-track); }
.bf-chain .bf-follow, .bf-bitbuf .bf-read {
  flex: 1;
  border-color: var(--bf-ink);
  background: var(--bf-ink);
  color: var(--md-default-bg-color);
}
.bf-bitbuf .bf-read:hover, .bf-chain .bf-follow:hover { opacity: 0.88; background: var(--bf-ink); }
.bf-bitbuf .bf-read:disabled, .bf-chain .bf-follow:disabled {
  border-color: var(--bf-track);
  background: var(--bf-track);
  color: var(--bf-muted);
  opacity: 1;
  cursor: default;
}
.bf-bitbuf .bf-btn:focus-visible, .bf-chain .bf-btn:focus-visible { outline: 2px solid var(--md-accent-fg-color); outline-offset: 2px; }
.md-typeset .bf-chain .bf-path { margin: 0.55rem 0 0; color: var(--bf-muted); font-size: 0.62rem; }
@media (prefers-reduced-motion: reduce) {
  .md-typeset .bf-chain .bf-cardx, .bf-chain .bf-btn { transition: none; }
}

/* A post's header: the kicker, the title, the summary and the date, beside the home page's
   illustration, on a panel with the accent bar the social cards have. */
.md-typeset .post-hero {
  --post-hero-bg: #f6f4ee;
  clear: both;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 2rem;
  padding: 1.5rem 1.2rem 1.3rem 1.6rem;
  border-bottom: 5px solid var(--md-primary-fg-color);
  border-radius: 0.8rem;
  background: var(--post-hero-bg);
  overflow: hidden;
}
[data-md-color-scheme="slate"] .md-typeset .post-hero {
  --post-hero-bg: #22221f;
}
.md-typeset .post-hero-text {
  flex: 1 1 auto;
  min-width: 0;
}
.md-typeset .post-hero .post-kicker {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.md-typeset .post-hero .post-kicker a {
  color: var(--md-primary-fg-color);
  text-decoration: none;
}
.md-typeset .post-hero .post-kicker a:hover {
  text-decoration: underline;
}
.md-typeset .post-hero h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--md-default-fg-color);
}
.md-typeset .post-hero h1 .headerlink {
  display: none;
}
.md-typeset .post-hero .post-dek {
  max-width: 32rem;
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--md-default-fg-color--light);
}
.md-typeset .post-hero .post-meta {
  margin: 1.1rem 0 0;
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset .post-meta a,
.post-card-date {
  --pill: #b26b00;
  --pill-bg: #f8ead0;
}
[data-md-color-scheme="slate"] .md-typeset .post-meta a,
[data-md-color-scheme="slate"] .post-card-date {
  --pill: #f2b544;
  --pill-bg: #3b3020;
}
.md-typeset .post-hero .post-meta a {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--pill);
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill);
  font-weight: 600;
  text-decoration: none;
}
/* the illustration's own margin is wide: the negative margins take some of it back */
.md-typeset .post-hero-art {
  flex: none;
  width: 11.5rem;
  margin: -1.2rem -0.6rem -1.2rem -0.8rem;
}
.md-typeset .post-hero-art img {
  display: block;
  width: 100%;
  height: auto;
}
@media screen and (max-width: 44.9375em) {
  .md-typeset .post-hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1.1rem 1rem 1.1rem;
  }
  .md-typeset .post-hero-art {
    width: 7.5rem;
    margin: -0.3rem 0 -0.9rem -0.9rem;
  }
  .md-typeset .post-hero h1 {
    font-size: 1.45rem;
  }
}

/* The blog index: each post as a card, its social card beside its title and summary. */
.md-typeset .post-list {
  display: grid;
  gap: 1rem;
  margin: 1.4rem 0;
}
.md-typeset .post-card {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
  padding: 0.8rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.8rem;
  color: var(--md-default-fg-color);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.md-typeset .post-card * {
  text-decoration: none;
}
.md-typeset .post-card:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.08);
  color: var(--md-default-fg-color);
}
.md-typeset .post-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.md-typeset .post-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.md-typeset .post-card-date {
  align-self: flex-start;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill);
  font-size: 0.62rem;
  font-weight: 600;
}
.md-typeset .post-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}
.md-typeset .post-card-dek {
  color: var(--md-default-fg-color--light);
  font-size: 0.72rem;
  line-height: 1.5;
}
@media screen and (max-width: 44.9375em) {
  .md-typeset .post-card {
    grid-template-columns: minmax(0, 1fr);
  }
}
.bf-fig .bf-pill-pass { fill: var(--bf-green-tint); stroke: var(--bf-green); stroke-width: 1; }
.bf-fig .bf-pill-pass-t { fill: var(--bf-green-ink); font-size: 11px; font-weight: 600; }

/* the room-walk post: overlap bands, lane slots, latency bars and lane chips */
.bf-fig .bf-band { fill: var(--bf-green-tint); fill-opacity: 0.6; stroke: var(--bf-green); stroke-width: 1.5; stroke-dasharray: 5 4; }
.bf-fig .bf-slot-hi { fill: var(--bf-green); }
.bf-fig .bf-lat { fill: var(--bf-steel-tint); }
.bf-fig .bf-lat-hi { fill: var(--bf-steel); }
.bf-fig .bf-cut { stroke: var(--bf-green); stroke-width: 2; fill: none; }
.bf-fig .bf-chip-on { fill: var(--bf-green); }
.bf-fig .bf-chip-off { fill: var(--bf-track); }

/* screenshots (the MLP post): one excerpt at a readable size, the rest as thumbnails that open
   at full size; never inverted in the dark theme */
.md-typeset .bf-shots img {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--bf-frame);
  border-radius: 0.4rem;
}
.md-typeset .bf-shot-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.6rem;
  align-items: start;
  margin: 0.6rem 0 1rem;
}
.md-typeset .bf-shot-row img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 0.3rem;
}

/* A post's roadmap: its numbered sections as links, grouped into parts, centred. */
.md-typeset .post-roadmap {
  --rm-line: var(--md-default-fg-color--lightest);
  --rm-dot: #f4f3ef;
  --rm-dot-ink: var(--md-default-fg-color);
  --rm-hi: #1f9a72;
  --rm-hi-tint: #dcefe7;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.6rem;
  margin: 1.6rem 0 2rem;
  font-size: 0.8rem;
}
@media (max-width: 44em) {
  .md-typeset .post-roadmap {
    grid-template-columns: minmax(0, 1fr);
    max-width: 25rem;
    margin-left: auto;
    margin-right: auto;
  }
}
[data-md-color-scheme="slate"] .md-typeset .post-roadmap {
  --rm-dot: #23231f;
  --rm-hi: #22a87c;
  --rm-hi-tint: #1b3a2f;
}
.md-typeset .post-roadmap-part {
  margin: 1.1rem 0 0.4rem 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}
.md-typeset .post-roadmap ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.md-typeset .post-roadmap li {
  position: relative;
  margin: 0;
}
.md-typeset .post-roadmap li + li::before {
  content: "";
  position: absolute;
  left: 1.3rem;
  top: -0.5rem;
  height: 1rem;
  border-left: 1.5px solid var(--rm-line);
}
.md-typeset .post-roadmap a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.6rem 0.45rem 0.25rem;
  border-radius: 0.6rem;
  color: var(--md-default-fg-color);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.md-typeset .post-roadmap .rm-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.md-typeset .post-roadmap .rm-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1.5px solid var(--rm-line);
  background: var(--rm-dot);
  font-weight: 700;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.md-typeset .post-roadmap .rm-ours .rm-n {
  border-color: var(--rm-hi);
}
.md-typeset .post-roadmap .rm-t {
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.3;
}
.md-typeset .post-roadmap .rm-d {
  font-size: 0.88em;
  line-height: 1.35;
  color: var(--md-default-fg-color--light);
}
.md-typeset .post-roadmap a {
  position: relative;
  padding-right: 1.8rem;
}
.md-typeset .post-roadmap a::after {
  content: "→";
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rm-hi);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.md-typeset .post-roadmap a:hover,
.md-typeset .post-roadmap a:focus-visible {
  background: var(--rm-hi-tint);
  transform: translateX(0.2rem);
}
.md-typeset .post-roadmap a:hover .rm-n,
.md-typeset .post-roadmap a:focus-visible .rm-n {
  background: var(--rm-hi);
  border-color: var(--rm-hi);
  color: #fff;
}
.md-typeset .post-roadmap a:hover .rm-t,
.md-typeset .post-roadmap a:focus-visible .rm-t {
  color: var(--rm-hi);
}
.md-typeset .post-roadmap a:hover::after,
.md-typeset .post-roadmap a:focus-visible::after {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .md-typeset .post-roadmap a,
  .md-typeset .post-roadmap .rm-n,
  .md-typeset .post-roadmap a::after {
    transition: none;
  }
  .md-typeset .post-roadmap a:hover,
  .md-typeset .post-roadmap a:focus-visible {
    transform: none;
  }
}

/* A results table whose last column is a summary (a mean): set apart by a rule and a tint. */
.md-typeset .bf-rates th:last-child,
.md-typeset .bf-rates td:last-child {
  border-left: 2px solid var(--md-default-fg-color--lighter);
  background-color: var(--md-code-bg-color);
}
.md-typeset .bf-rates th:last-child {
  font-style: italic;
}
.md-typeset .bf-rates table:not([class]) th,
.md-typeset .bf-rates table:not([class]) td {
  min-width: 0;
  padding: 0.55em 0.7em;
}

/* Data tables in a post: centred in the column, compact cells. */
.md-typeset .bf-data,
.md-typeset .bf-rates {
  text-align: center;
}
.md-typeset .bf-data table:not([class]),
.md-typeset .bf-rates table:not([class]) {
  text-align: left;
}
.md-typeset .bf-data table:not([class]) th,
.md-typeset .bf-data table:not([class]) td {
  padding: 0.55em 0.8em;
}
/* In the rates table, the second column is memory, a property of the algorithm, not a result. */
.md-typeset .bf-rates th:nth-child(2),
.md-typeset .bf-rates td:nth-child(2) {
  border-right: 2px solid var(--md-default-fg-color--lighter);
  color: var(--md-default-fg-color--light);
}

/* the agent-team post: product marks, the agent families and the Codex lane */
.bf-fig .bf-logo-ink { fill: var(--bf-ink); }
.bf-fig .bf-logo-claude { fill: var(--bf-claude); }
.bf-fig .bf-card-claude { fill: var(--bf-claude-tint); stroke: var(--bf-claude); stroke-width: 1.5; }
.bf-fig .bf-group { fill: none; stroke: var(--bf-frame); stroke-width: 1.5; }
.bf-fig .bf-lane { fill: var(--bf-surface); stroke: var(--bf-frame); stroke-width: 1.5; stroke-dasharray: 6 5; }
.bf-fig .bf-group-astra { fill: var(--bf-openai-tint); stroke: var(--bf-openai); stroke-width: 1.5; }
.bf-fig .bf-card-astra-in { fill: var(--bf-surface); stroke: var(--bf-openai); stroke-width: 1; }
.bf-fig .bf-card-astra { fill: var(--bf-openai-tint); stroke: var(--bf-openai); stroke-width: 1.5; }
.bf-fig .bf-lane-astra { fill: var(--bf-openai-tint); stroke: var(--bf-openai); stroke-width: 1.5; stroke-dasharray: 6 5; }
.bf-fig .bf-pill-xh { fill: var(--bf-xh-tint); stroke: var(--bf-xh); stroke-width: 1; }
.bf-fig .bf-pill-xh-t { fill: var(--bf-xh); font-size: 10px; font-weight: 600; }
.bf-fig .bf-pill-ultra { fill: var(--bf-ultra-tint); stroke: var(--bf-ultra); stroke-width: 1; }
.bf-fig .bf-pill-ultra-t { fill: var(--bf-ultra); font-size: 10px; font-weight: 600; }

/* the agent-team post: product and effort colours in running text and tables */
.md-typeset .ag-claude { color: #c15f3c; font-weight: 600; }
.md-typeset .ag-astra { color: #0b8a68; font-weight: 600; }
.md-typeset .ag-chip { display: inline-block; padding: 0 0.5em; border-radius: 0.7em; font-size: 0.85em; font-weight: 600; white-space: nowrap; }
.md-typeset .ag-xh { color: #8a5300; background: #f8ead0; box-shadow: inset 0 0 0 1px #b26b00; }
.md-typeset .ag-ultra { color: #5b33b8; background: #ece4fb; box-shadow: inset 0 0 0 1px #7b4fd6; }
.md-typeset .ag-high { color: #2f6f8f; background: #d6e5ec; box-shadow: inset 0 0 0 1px #4687a8; }
.md-typeset .ag-session { color: #c15f3c; background: #f8e8e0; box-shadow: inset 0 0 0 1px #d97757; }
[data-md-color-scheme="slate"] .md-typeset .ag-claude { color: #e9967a; }
[data-md-color-scheme="slate"] .md-typeset .ag-astra { color: #3fd69c; }
[data-md-color-scheme="slate"] .md-typeset .ag-xh { color: #f2b544; background: #3b3020; box-shadow: inset 0 0 0 1px #f2b544; }
[data-md-color-scheme="slate"] .md-typeset .ag-ultra { color: #c4adf6; background: #2d2543; box-shadow: inset 0 0 0 1px #b195f2; }
[data-md-color-scheme="slate"] .md-typeset .ag-high { color: #8cc3df; background: #1f3440; box-shadow: inset 0 0 0 1px #5199bd; }
[data-md-color-scheme="slate"] .md-typeset .ag-session { color: #e9967a; background: #3a2821; box-shadow: inset 0 0 0 1px #e08a6d; }

/* The bit buffer read one code at a time (.bf-bitbuf, blog.js) */
.md-typeset .bf-bitbuf .bf-bits { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.3rem; margin: 0.4rem 0 0.2rem; padding: 0; list-style: none; }
.md-typeset .bf-bitbuf .bf-bit { margin: 0; padding: 0.45rem 0; border: 1px solid var(--bf-frame); border-radius: 6px; background: var(--bf-surface); color: var(--bf-ink); font-family: var(--md-code-font-family); font-size: 0.8rem; text-align: center; transition: background-color 0.15s, border-color 0.15s; }
.md-typeset .bf-bitbuf .bf-bit.is-next { background: var(--bf-green-tint); border-color: var(--bf-green); font-weight: 700; }
.md-typeset .bf-bitbuf .bf-bit.is-empty { color: var(--bf-muted); background: transparent; border-style: dashed; }
.md-typeset .bf-bitbuf .bf-bits-note { margin: 0; color: var(--bf-muted); font-size: 0.62rem; }
.md-typeset .bf-bitbuf .bf-buf-state { display: grid; grid-template-columns: max-content 1fr; gap: 0.15rem 0.8rem; margin: 0.6rem 0 0; font-size: 0.7rem; }
.md-typeset .bf-bitbuf .bf-buf-state dt { color: var(--bf-muted); }
.md-typeset .bf-bitbuf .bf-buf-state dd { margin: 0; color: var(--bf-ink); }
.md-typeset .bf-bitbuf .bf-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.3rem 0 0.5rem; font-size: 0.7rem; }
.md-typeset .bf-bitbuf .bf-keys-label { color: var(--bf-muted); margin-right: 0.2rem; }
.md-typeset .bf-bitbuf .bf-key { padding: 0.15rem 0.5rem; border: 1px solid var(--bf-frame); border-radius: 6px; background: var(--bf-surface); color: var(--bf-ink); transition: background-color 0.15s, border-color 0.15s; }
.md-typeset .bf-bitbuf .bf-key.is-next { background: var(--bf-green-tint); border-color: var(--bf-green); font-weight: 700; }
.md-typeset .bf-bitbuf .bf-buf-step { margin: 0.6rem 0 0; padding: 0.55rem 0.7rem; border-left: 3px solid var(--bf-green); background: var(--bf-surface); color: var(--bf-ink); font-size: 0.74rem; line-height: 1.55; }
.md-typeset .bf-bitbuf .bf-buf-static { margin: 0.55rem 0 0; color: var(--bf-muted); font-size: 0.66rem; }
@media (prefers-reduced-motion: reduce) {
  .md-typeset .bf-bitbuf .bf-bit, .md-typeset .bf-bitbuf .bf-key, .bf-bitbuf .bf-btn { transition: none; }
}

/* A numbered equation (KaTeX \tag) on a phone: the theme sizes a displayed formula to its
   content and scrolls it sideways, and KaTeX pins the number to the right edge, so the number
   would cover the formula's end. Set it after the formula instead, where it scrolls with it. */
@media screen and (max-width: 44.9375em) {
  .md-typeset div.arithmatex .katex-display .tag { position: static; display: inline-block; margin-left: 1.2em; }
}

/* Frames (the inverse-BWT post): one art-directed sequence of small static frames, each drawn
   on the same 230-unit width so every figure has the same scale. Typeset rails of letters, small
   indices, smooth connectors with small heads; green marks the one run being matched, ink the
   active interval, everything else is quiet. Three across on a wide screen, stacked on a phone. */
.bf-fig .bf-ch { fill: var(--bf-ink); font-size: 18px; font-weight: 600; }
.bf-fig .bf-ch-dim { fill: var(--bf-muted); font-size: 18px; }
.bf-fig .bf-sub { fill: var(--bf-green-ink); font-size: 10px; font-weight: 600; }
.bf-fig .bf-ix { fill: var(--bf-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bf-fig .bf-lab { fill: var(--bf-muted); font-size: 14px; font-style: italic; font-weight: 600; }
.bf-fig .bf-cap { fill: var(--bf-muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.bf-fig .bf-eq { fill: var(--bf-ink); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-fig .bf-eq-l { fill: var(--bf-ink); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-fig .bf-val { fill: var(--bf-ink); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-fig .bf-state { fill: var(--bf-ink); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bf-fig .bf-note { fill: var(--bf-ink); font-size: 12.5px; font-weight: 600; }
.bf-fig .bf-halo { paint-order: stroke; stroke: var(--md-default-bg-color); stroke-width: 5px; stroke-linejoin: round; }
.bf-fig .bf-tint { fill: var(--bf-green-tint); }
.bf-fig .bf-act { fill: none; stroke: var(--bf-green); stroke-width: 2; stroke-linecap: round; }
.bf-fig .bf-quiet { fill: none; stroke: var(--bf-muted); stroke-width: 1.2; stroke-linecap: round; opacity: 0.5; }
.bf-fig .bf-quiet-ink { fill: none; stroke: var(--bf-ink); stroke-width: 1.5; stroke-linecap: round; }
.bf-fig .bf-head { fill: var(--bf-green); }
.bf-fig .bf-head-q { fill: var(--bf-muted); opacity: 0.5; }
.bf-fig .bf-head-ink { fill: var(--bf-ink); }
.bf-fig .bf-pin { fill: var(--bf-green); }
.bf-fig .bf-pin-q { fill: var(--bf-muted); opacity: 0.5; }
.bf-fig .bf-ribbon { fill: var(--bf-green); fill-opacity: 0.2; stroke: var(--bf-green); stroke-width: 1; }
.bf-fig .bf-seg { fill: none; stroke: var(--bf-muted); stroke-width: 1.2; opacity: 0.7; }
.bf-fig .bf-seg-a { fill: none; stroke: var(--bf-green); stroke-width: 1.5; }
.bf-fig .bf-seg-on { fill: none; stroke: var(--bf-ink); stroke-width: 2.2; }
.bf-fig .bf-seg-a-on { fill: none; stroke: var(--bf-green); stroke-width: 2.4; }
.bf-fig .bf-segl { fill: var(--bf-muted); font-size: 12.5px; font-weight: 600; }
.bf-fig .bf-segl-on { fill: var(--bf-ink); font-size: 13.5px; font-weight: 700; }
.bf-fig .bf-ring { fill: none; stroke: var(--bf-ink); stroke-width: 1.6; }
.bf-fig .bf-ring-a { fill: none; stroke: var(--bf-green); stroke-width: 2; }
.bf-fig .bf-tick { fill: none; stroke: var(--bf-ink); stroke-width: 1.5; stroke-linecap: round; }
.md-typeset .bf-frames { display: grid; gap: 1.4rem 1.6rem; margin: 0.2rem 0 0; }
.md-typeset .bf-frames-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md-typeset .bf-frames-pair { grid-template-columns: repeat(2, minmax(0, calc((100% - 3.2rem) / 3))); justify-content: center; }
.md-typeset .bf-frame { min-width: 0; margin: 0; }
.md-typeset .bf-frame svg { max-width: 13rem; margin: 0 auto; }
.md-typeset .bf-frame .bf-step { margin: 0.5rem 0 0; color: var(--bf-ink); font-size: 0.68rem; line-height: 1.5; }
.md-typeset .bf-frame .bf-step code { font-size: 0.92em; }
@media screen and (max-width: 44.9375em) {
  .md-typeset .bf-frames { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
}

/* A playful figure in the logo's language (the service-threads post's "A block's path", a race
   circuit): translucent, interlocking bands in the logo's three hues, numbered rounded-triangle
   stops, and a block that drives the circuit as a car. With reduced motion the car is not
   shown; parked cars show the way instead. */
.bf-fig .bf-play { --bf-play-bg: var(--md-default-bg-color); }
.bf-fig .bf-play-coral { color: rgb(255, 92, 74); }
.bf-fig .bf-play-blue { color: rgb(40, 92, 255); }
.bf-fig .bf-play-green { color: rgb(40, 190, 135); }
[data-md-color-scheme="slate"] .bf-fig .bf-play-coral { color: rgb(255, 112, 96); }
[data-md-color-scheme="slate"] .bf-fig .bf-play-blue { color: rgb(92, 132, 255); }
[data-md-color-scheme="slate"] .bf-fig .bf-play-green { color: rgb(52, 206, 150); }
.bf-fig .bf-play-glow path { fill: none; stroke: currentColor; stroke-linecap: round; opacity: 0.3; }
.bf-fig .bf-play-band path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-opacity: 0.42; }
.bf-fig .bf-play-shine { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 0.1 14; opacity: 0.75; }
[data-md-color-scheme="slate"] .bf-fig .bf-play-shine { opacity: 0.4; }
.bf-fig .bf-play-start { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: 0.9; }
.bf-fig .bf-play-checkl { fill: #fff; }
.bf-fig .bf-play-checkd { fill: #1d1d1b; }
.bf-fig .bf-play-rim { fill: currentColor; stroke: currentColor; stroke-width: 23; stroke-linejoin: round; }
.bf-fig .bf-play-badge {
  fill: color-mix(in srgb, currentColor 22%, var(--bf-play-bg));
  stroke: color-mix(in srgb, currentColor 22%, var(--bf-play-bg));
  stroke-width: 16;
  stroke-linejoin: round;
}
.bf-fig .bf-play-num { fill: var(--bf-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.bf-fig .bf-play-tag { fill: color-mix(in srgb, currentColor 20%, var(--bf-play-bg)); stroke: color-mix(in srgb, currentColor 70%, var(--bf-play-bg)); stroke-width: 1.5; }
.bf-fig .bf-play-tagt { fill: var(--bf-ink); font-weight: 600; letter-spacing: 0.02em; }
.bf-fig .bf-play-key { fill: color-mix(in srgb, currentColor 30%, transparent); stroke: currentColor; stroke-width: 3.5; stroke-linejoin: round; }
.bf-fig .bf-play-chip { fill: var(--bf-surface); stroke: var(--bf-ink); stroke-width: 2.5; }
.bf-fig .bf-play-wheel, .bf-fig .bf-play-wing { fill: var(--bf-ink); }
.bf-fig .bf-play-stripe { fill: none; stroke: rgb(255, 92, 74); stroke-width: 3; stroke-linecap: round; }
.bf-fig .bf-play-helmet { fill: rgb(40, 92, 255); stroke: var(--bf-ink); stroke-width: 1.5; }
.bf-fig .bf-play-token { offset-rotate: auto; animation: bf-play-ride 18.1s linear infinite; }
.bf-fig .bf-play-still { display: none; }
@media (prefers-reduced-motion: reduce) {
  .bf-fig .bf-play-token { display: none; animation: none; }
  .bf-fig .bf-play-still { display: inline; }
}
@supports not (offset-path: path("M0 0")) {
  .bf-fig .bf-play-token { display: none; }
  .bf-fig .bf-play-still { display: inline; }
}
@keyframes bf-play-ride {
  0.0% { offset-distance: 0.00%; }
  2.0% { offset-distance: 3.15%; }
  6.4% { offset-distance: 3.15%; }
  10.4% { offset-distance: 9.40%; }
  14.9% { offset-distance: 9.40%; }
  18.6% { offset-distance: 15.19%; }
  23.0% { offset-distance: 15.19%; }
  50.4% { offset-distance: 57.90%; }
  54.8% { offset-distance: 57.90%; }
  73.7% { offset-distance: 87.33%; }
  78.1% { offset-distance: 87.33%; }
  81.8% { offset-distance: 93.12%; }
  86.2% { offset-distance: 93.12%; }
  90.2% { offset-distance: 99.37%; }
  94.6% { offset-distance: 99.37%; }
  95.0% { offset-distance: 100.00%; }
  100% { offset-distance: 100%; }
  0%, 100% { opacity: 0; }
  2%, 95.9% { opacity: 1; }
}


/* An annotated formal statement: black definitions, each with a coloured note on what it means
   here (the Rauzy–Veech post). Two columns on a wide screen; the note below its line on a phone. */
.md-typeset .bf-formal .bf-fstep {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 13rem);
  gap: 0.6rem 1rem;
  align-items: start;
  padding: 0.75rem 0;
  border-top: 1px solid var(--bf-frame);
}
.md-typeset .bf-formal .bf-fbody { color: var(--bf-ink); font-size: 0.74rem; line-height: 1.6; }
.md-typeset .bf-formal .bf-fbody p { margin: 0 0 0.4rem; }
.md-typeset .bf-formal .bf-fbody .arithmatex { overflow-x: auto; overflow-y: hidden; }
.md-typeset .bf-formal .bf-fnote {
  --c: var(--bf-blue); --c-tint: var(--bf-blue-tint);
  border-left: 3px solid var(--c);
  background: var(--c-tint);
  border-radius: 0.3rem;
  padding: 0.45rem 0.65rem;
  color: var(--bf-ink);
  font-size: 0.68rem;
  line-height: 1.5;
}
.md-typeset .bf-formal .bf-fnote p { margin: 0; }
.md-typeset .bf-formal .bf-fnote-h { display: block; margin-bottom: 0.2rem; color: var(--c); font-weight: 700; }
.md-typeset .bf-formal .bf-fterm { border-bottom: 2px solid var(--c); font-weight: 600; }
.md-typeset .bf-formal .bf-c-blue { --c: var(--bf-blue); --c-tint: var(--bf-blue-tint); }
.md-typeset .bf-formal .bf-c-green { --c: var(--bf-green-ink); --c-tint: var(--bf-green-tint); }
.md-typeset .bf-formal .bf-c-amber { --c: var(--bf-amber); --c-tint: var(--bf-amber-tint); }
.md-typeset .bf-formal .bf-c-ultra { --c: var(--bf-ultra); --c-tint: var(--bf-ultra-tint); }
.md-typeset .bf-formal .bf-c-claude { --c: var(--bf-claude); --c-tint: var(--bf-claude-tint); }
.md-typeset .bf-formal .bf-c-steel { --c: var(--bf-steel); --c-tint: var(--bf-steel-tint); }
@media screen and (max-width: 44.9375em) {
  .md-typeset .bf-formal .bf-fstep { grid-template-columns: minmax(0, 1fr); }
}

/* .bf-stepper: a process shown one step at a time (blog.js). The controls and the live text
   appear only with JavaScript; without it the static summary shows. */
.bf-stepper [hidden] { display: none !important; }
.md-typeset .bf-stepper .bf-step-stages { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.6rem; }
.md-typeset .bf-stepper .bf-step-text { min-height: 4.6em; margin: 0.6rem 0 0; color: var(--bf-ink); font-size: 0.72rem; line-height: 1.55; }
.md-typeset .bf-stepper .bf-step-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.md-typeset .bf-stepper .bf-step-controls input[type="range"] { flex: 1 1 8rem; min-width: 6rem; accent-color: var(--bf-green); }
.bf-stepper .bf-btn {
  padding: 0.45rem 1rem;
  border: 1px solid var(--bf-frame);
  border-radius: 999px;
  background: transparent;
  color: var(--bf-ink);
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}
.bf-stepper .bf-btn:hover { background: var(--bf-track); }
.bf-stepper .bf-btn:disabled { color: var(--bf-muted); opacity: 0.5; cursor: default; background: transparent; }
.bf-stepper .bf-btn[aria-pressed="true"], .bf-stepper .bf-btn.bf-step-main { border-color: var(--bf-ink); background: var(--bf-ink); color: var(--md-default-bg-color); }
.bf-stepper .bf-btn:focus-visible { outline: 2px solid var(--md-accent-fg-color); outline-offset: 2px; }
.bf-stepper .bf-arrow { stroke: var(--bf-muted); }
