/* TheHUB brand
 * ============================================================================
 * Applies TheHUB's Brand & Media Kit to the documentation site (color slide
 * updated 2026-09-09).
 * Source of truth: knowledge/project/brand.md (restating the kit).
 *
 * The kit specifies print and deck usage in detail and says almost nothing
 * about web interfaces: its one web measurement is the body setting (20px /
 * 36px, ~66 character measure). Everything a documentation site needs beyond
 * that is DERIVED from the five values, never invented as a sixth. Each
 * derivation is commented with its reason. If marketing later publishes web
 * guidance, re-check the commented derivations first.
 *
 * 2026-09-09 palette update: the kit's color slide dropped the pure-black "Core
 * Black" surface, renamed Ink to Graphite (#231F20, now explicitly a surface
 * colour, not just "the black used in logo artwork"), renamed Bone to Ivory
 * (same hex, label only), replaced Signal Grey with a two-step neutral ramp
 * (Neutral 01 #3E3A36, Neutral 03 #757166 -- the two neutral tokens currently
 * specified; no further steps are introduced here), and replaced Lime with
 * Green (#BBEA83 -- a new hex, not just a rename). Every hex below and every
 * contrast ratio in every comment was recomputed against these five values. Where the kit's dropped
 * Core Black and renamed Ink used to be two separate tokens, Graphite now
 * absorbs both roles: every place this file used to reach for
 * `--hub-core-black` OR `--hub-ink` now reaches for the single
 * `--hub-graphite` custom property. `--hub-signal-grey` had no single
 * successor and is split per-use below between `--hub-neutral-01` and
 * `--hub-neutral-03`, chosen per role by which one actually clears that
 * role's contrast requirement (see each derivation).
 *
 * IMPORTANT, caught during this pass: merging Core Black and Ink into one
 * Graphite token removes a distinction three rules relied on (dark-theme
 * table header band, dark-theme code-block background, dark-theme button
 * hover fill all used to differ subtly from the Core-Black page background
 * because they were Ink, a different token). Reusing Graphite for those
 * would put each at 1.0:1 against its own page background -- an invisible
 * surface, not merely a fainter one. All three are re-derived below as a
 * wash or an inversion rather than a flat Graphite reuse; each is commented
 * where it happens.
 *
 * Fonts are self-hosted. The kit chose three free faces specifically so any
 * recipient can reproduce the brand exactly, and `theme.font = false` in
 * zensical.toml disables the generator's Google Fonts link so this page makes
 * no third-party requests. The type section below is UNCHANGED by the
 * 2026-09-09 update: the kit's typography, name, tone, logos, and boilerplate
 * were not touched by this revision, only the color slide was.
 * ==========================================================================*/

/* ── Self-hosted brand fonts ─────────────────────────────────────────────── */

/* IBM Plex Sans 400 italic (latin-ext) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexSans-400-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Sans 400 italic (latin) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexSans-400-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans 400 normal (latin-ext) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexSans-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Sans 400 normal (latin) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexSans-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Sans 600 normal (latin-ext) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexSans-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Sans 600 normal (latin) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexSans-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono 400 normal (latin-ext) */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexMono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono 400 normal (latin) */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexMono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* IBM Plex Mono 600 normal (latin-ext) */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexMono-600-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* IBM Plex Mono 600 normal (latin) */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/IBMPlexMono-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Playfair Display 400 normal (latin-ext) */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/PlayfairDisplay-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Playfair Display 400 normal (latin) */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/PlayfairDisplay-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Brand values. These are the whole palette. ──────────────────────────── */
/* Five values ship. See knowledge/project/brand.md. */

:root {
  --hub-graphite:    #231F20;  /* surface + absorbed the old Core Black AND Ink roles */
  --hub-ivory:       #F6F6EA;  /* was Bone; identical hex, renamed only */
  --hub-neutral-01:  #3E3A36;  /* darker of the two currently specified neutral tokens */
  --hub-neutral-03:  #757166;  /* lighter of the two currently specified neutral tokens */
  --hub-green:       #BBEA83;  /* was Lime; new hex, not just a rename */

  --hub-font-body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --hub-font-mono:    "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
  /* Playfair Display is the web substitute the kit names for its title face. */
  --hub-font-display: "Playfair Display", Georgia, serif;
}

/* ── Type ────────────────────────────────────────────────────────────────── */
/* UNCHANGED by the 2026-09-09 color update: the kit's typography rules were not
   touched by this revision. Kept verbatim from the prior pass. */

:root {
  /* VERIFIED: the theme sets --md-text-font-family and --md-code-font-family on
     `body`, deriving them from --md-text-font / --md-code-font. A direct
     declaration on body beats an inherited one from :root regardless of
     specificity, so setting the *-family pair here would be dead. Set the two
     the theme actually reads through, and let its own fallback stack follow. */
  --md-text-font: var(--hub-font-body);
  --md-code-font: var(--hub-font-mono);
}

/* Body type: 0.85rem (17px; 18.7px above 100em, because the theme raises the
 * rem base there). The theme default of 0.75rem (15px) leaves too much of the
 * column unused. The brand kit's 20px (1rem) is not used: 0.85rem already fills
 * the column, and 1rem would crowd tables and code at laptop widths.
 *
 * The kit's one web measurement is "live site sets 20px / 36px", and 36/20 is a
 * line-height of 1.8, which is already this theme's default, so line-height is
 * left alone and only the absolute size is set.
 *
 * VERIFIED: `html` is set to `font-size: 125%` by the theme, so 1rem is 20px
 * here, NOT the browser default 16px, and it rises again above 100em. Check the
 * rem base before converting any pixel value from the kit: assuming 16px here
 * overshoots by a quarter, and `zensical build --strict` will not catch it.
 *
 * The theme sets several surfaces in fixed rem, not relative to the body, so
 * raising `.md-typeset` alone leaves them behind. Each is raised in the same
 * proportion (about 0.87 of body): tables, admonitions and footnotes 0.74rem
 * (theme 0.64rem), the sidebar and table of contents 0.76rem (theme 0.7rem),
 * content tab labels 0.76rem. Inline and block code are `em`-relative to their
 * container and follow on their own.
 *
 * The kit's "measure around 66 characters" is left to the theme. Capping `p`
 * and `li` at `66ch` while headings, tables, and admonitions keep the full
 * column produced a ragged edge down the page, because the constraint belongs
 * to the content column and not to individual elements. The theme already caps
 * its grid at 61rem.
 */
.md-typeset {
  font-size: 0.85rem;
}

.md-typeset table:not([class]),
.md-typeset .admonition,
.md-typeset details,
.md-typeset .footnote {
  font-size: 0.74rem;
}

.md-nav,
.md-nav__link .md-typeset {
  font-size: 0.76rem;
}

.md-tabs__link {
  font-size: 0.74rem;
}

/* Admonitions, within the closed palette. The theme gives each type its own
   hue (blue note, teal tip, green success, orange warning); none is a brand
   colour, so every type takes the same treatment and is told apart by its
   title and icon: a faint neutral wash (--hub-wash), a 3px Green left rule
   drawn as an inset shadow (so it follows the rounded corners, matching the
   cards), and a sentence-case semibold title in the body face. The rule is a
   border, so the 1.27:1 Green-on-Ivory figure that governs text does not
   apply; the icons stay neutral because a Green glyph on Ivory is too faint.
   The warning keeps a stronger, neutral edge so it stays distinct: a 4px
   full-strength foreground rule and a 1px frame. Wash and neutral colours
   come from the scheme's own foreground variables, so they flip per scheme.
   Selectors repeat the theme's own `details` and `summary` forms so the
   collapsible variants (`???`) take the same treatment. */
/* The theme's per-type rules (`.md-typeset .admonition.note`, and the other
   eleven) carry their own wash at specificity (0,3,0), so the reset repeats
   the type list to match it; the bare form covers an untyped block. */
.md-typeset :is(.admonition, details),
.md-typeset :is(.admonition, details):is(.note, .abstract, .info, .tip, .success, .question, .warning, .failure, .danger, .bug, .example, .quote) {
  margin: 1.4em 0;
  padding: 0.65rem 1rem 0.65rem 1.1rem;
  border: 0;
  border-radius: 0.3rem;
  background-color: var(--hub-wash);
  box-shadow: inset 3px 0 0 var(--hub-green);
}

.md-typeset :is(.admonition, details) > :is(.admonition-title, summary) {
  position: relative;
  margin: 0 0 0.3rem;
  padding: 0 0 0 1.5rem;
  font-family: var(--hub-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
  color: var(--md-default-fg-color);
}

.md-typeset :is(.admonition, details) > summary {
  padding-right: 1.8rem;
}

.md-typeset :is(.admonition, details) > :is(.admonition-title, summary):before {
  top: 0.2rem;
  left: 0;
  height: 0.9rem;
  width: 0.9rem;
}

html .md-typeset :is(.admonition, details) > :last-child {
  margin-bottom: 0;
}

.md-typeset :is(.admonition, details).warning {
  border: 1px solid var(--md-default-fg-color--lighter);
  box-shadow: inset 4px 0 0 var(--md-default-fg-color);
}

/* Icons and the collapsible arrow. */
.md-typeset :is(.admonition, details):is(.note, .tip) > :is(.admonition-title, summary):before {
  background-color: var(--md-default-fg-color--light);
}

.md-typeset :is(.admonition, details).success > :is(.admonition-title, summary):before {
  background-color: var(--md-default-fg-color--light);
}

.md-typeset :is(.admonition, details).warning > :is(.admonition-title, summary):before {
  background-color: var(--md-default-fg-color);
}

.md-typeset :is(.admonition, details):is(.note, .tip, .success, .warning) > :is(.admonition-title, summary):after {
  color: var(--md-default-fg-color--light);
}

/* Titles: display face, uppercase, light positive tracking, regular weight.
   DERIVATION: the kit's "titles" rule is applied to the page title only. On a
   technical documentation site, h2 to h6 are navigation furniture a reader
   scans, not titles, and uppercase serif at that density costs more in
   scannability than it returns in brand. Section headings stay in the body
   face. */
.md-typeset h1,
.md-header__topic > .md-ellipsis:first-child {
  font-family: var(--hub-font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: var(--hub-font-body);
  font-weight: 600;
  letter-spacing: 0;
}

/* Labels and UI: mono, uppercase, wide tracking, used deliberately and
   sparingly. The kit names exactly these surfaces: eyebrows, navigation,
   buttons, data labels and metadata. Tracking is in em so it scales with the
   size, and is chosen so the result lands in the kit's 1.5 to 2px at the
   20px rem base: 0.11em for the 0.74rem+ labels here (1.6px at 14.8px), 0.14em
   for the 0.58rem to 0.62rem small labels set below (1.6px to 1.7px). The
   theme raises the root size above 100em, which scales both in proportion. */
.md-nav__title,
.md-typeset .md-button,
.md-tabs__link,
.md-footer__direction {
  font-family: var(--hub-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.11em;   /* 1.5-2px at these sizes, per the kit */
  font-weight: 600;
}

/* The fixed header label ("Docs", the first header topic) is navigation, so it
   takes the label setting like the header tabs beside it. The rule above that
   gives `.md-header__topic > .md-ellipsis:first-child` the display face matches
   BOTH header topics (each is the first child of its own topic); the second
   topic, the page title swapped in on scroll, keeps the display face, and this
   rule overrides the first only. */
.md-header__topic:first-child > .md-ellipsis:first-child {
  font-family: var(--hub-font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.11em;   /* 1.6px at 14.8px */
}

/* Detail text: the same face untracked, for captions and small print. */
.md-typeset figcaption,
.md-typeset .footnote,
.md-source__repository,
.md-copyright {
  font-family: var(--hub-font-mono);
  letter-spacing: 0;
  text-transform: none;
}

/* ── Color: light theme ──────────────────────────────────────────────────── */
/* Kit: "Predominantly [dark], inverting to [light] where contrast calls for
   it." The light theme is the ivory surface; the dark theme is the graphite
   one. (2026-09-09 update: the kit dropped the pure-black surface entirely, so
   "dark theme = Core Black" from the prior pass is now "dark theme = Graphite".) */

:root,
[data-md-color-scheme="default"] {
  --md-default-bg-color:            var(--hub-ivory);
  --md-default-bg-color--light:     #F6F6EAd9;

  --md-default-fg-color:            var(--hub-graphite);
  /* DERIVATION: secondary text needs the same >=4.5:1 body-text threshold this
     file applies everywhere else. Neutral 03 on Ivory measures 4.475:1 -- just
     UNDER 4.5:1, a real (if narrow) fail, not a rounding artifact. Neutral 01
     on Ivory measures 10.35:1, comfortably clear. So this uses Neutral 01, not
     Neutral 03, even though Neutral 01 sits visually closer to Graphite
     (.043 relative luminance vs Graphite's .014) than the old Signal Grey sat
     to Ink (.102 vs .017) -- the old pair had more visual separation between
     primary and secondary text than this one does. That is a consequence of
     the two specified neutral tokens sitting where they do, not a choice
     available to avoid here: the alternative fails contrast outright. Do not
     "fix" by swapping to Neutral 03 without a documented reason it's
     acceptable to fall narrowly under 4.5:1. */
  --md-default-fg-color--light:     var(--hub-neutral-01);
  --md-default-fg-color--lighter:   #3E3A3680;
  --md-default-fg-color--lightest:  #3E3A361f;

  /* DERIVATION: link text is Graphite, not Green. Green on Ivory measures
     1.27:1 -- even further below the 4.5:1 body-text threshold than the old
     Lime-on-Bone figure (1.77:1) it replaces, because Green is a materially
     lighter, more saturated hex than Lime was, not just a renamed swatch. So
     Green as a link colour here would be unreadable, more so than before.
     Green still carries the affordance as the underline and the hover
     colour, which is the kit's own "line graphics and active states" role.
     Graphite on Ivory measures 14.97:1. */
  --md-typeset-a-color:             var(--hub-graphite);

  --md-primary-fg-color:            var(--hub-graphite);
  /* --md-primary-fg-color--dark is unused by the modern variant but IS read by
     the classic one; kept so a variant switch does not silently lose it. */
  --md-primary-fg-color--dark:      var(--hub-graphite);
  --md-primary-bg-color:            var(--hub-ivory);

  /* DERIVATION, light theme only: --md-accent-fg-color is Graphite here, not
     Green. Green on Ivory measures 1.27:1 and cannot carry text or an icon
     glyph on this surface. This is not only the link/mermaid case: verified
     2026-08-26 (pre-dates the 2026-09-09 palette swap, unaffected by it) against
     site/assets/stylesheets/modern/main.20815dad.min.css that ~30 distinct
     theme selectors (nav active/focus in both primary and secondary nav,
     headerlink, footnote-backref, breadcrumbs, clipboard and code buttons,
     tag chips, back-to-top, sidebar toggle) read --md-accent-fg-color or
     --md-accent-bg-color directly for hover/focus/active colour. Patching
     each consumer selector is unsafe, because a selector this file does not
     enumerate still renders Green-on-Ivory; redefining the variable itself is
     safe by construction, because every consumer inherits the corrected value
     regardless of its own selector specificity.
     The handful of consumers that use the accent as a FILL rather than as
     text (tag chips, back-to-top, sidebar toggle) are re-asserted explicitly
     further down with literal colour values, so the Green chip is not lost by
     this redefinition. */
  --md-accent-fg-color:             var(--hub-graphite);
  --md-accent-fg-color--transparent: #BBEA831f;
  --md-accent-bg-color:             var(--hub-ivory);

  /* Graphite at 5% over the ivory surface, not a new colour. An opaque "ivory
     one step down" would be a sixth value, which the kit forbids outright. */
  --md-code-bg-color:               #231F200d;
  --md-code-fg-color:               var(--hub-graphite);

  /* DERIVATION: the kit says nothing about tables. Unset, these two default
     to black at 12% and 3.5% (the library's own hardcoded default, unrelated
     to our palette), which is why the borders and row hover read as
     barely-there even on Ivory; the failure only becomes obvious in dark
     mode, where the same two unset defaults sit on a near-black Graphite
     surface and are close to invisible (see the dark block below).
     Border: Graphite at 12% (0x1f), chosen to match the dark side's reused
     Ivory 12% token at comparable visual weight: Ivory 12% over Graphite
     measures 1.430:1 against the page surface; Graphite 12% over Ivory
     measures 1.269:1 against Ivory. These two no longer sit as close together
     as the prior pass's 1.257 vs 1.264 (Graphite's luminance differs more
     from Ivory's complement than Core Black's did), so the two themes' table
     borders may read as very slightly different weights now, not re-tuned
     here without seeing it rendered.
     Row hover: reuses --md-code-bg-color's own value (Graphite 5%) rather
     than inventing a neighbouring one. */
  --md-typeset-table-color:          #231F201f;
  --md-typeset-table-color--light:   #231F200d;

  /* Two surfaces derived from Graphite alpha, shared by tables, callouts and
     cards: a row/edge rule that stays visible on Ivory, and a faint wash
     (distinct from the 12% --lightest used for hover and the table hairline). */
  --hub-rule: #231F2040;
  --hub-wash: #231F200a;
}

/* ── Color: dark theme ───────────────────────────────────────────────────── */

[data-md-color-scheme="slate"] {
  --md-hue: 0;

  --md-default-bg-color:            var(--hub-graphite);
  --md-default-bg-color--light:     #231F20d9;

  --md-default-fg-color:            var(--hub-ivory);
  /* DERIVATION: secondary text on Graphite is Ivory at reduced opacity, not
     either neutral ramp step. Neutral 01 on Graphite measures 1.45:1 and
     Neutral 03 on Graphite measures 3.35:1 -- both well below the body-text
     threshold (3.35:1 would clear a 3:1 non-text/UI-component bar but not
     4.5:1 for text). Reducing Ivory's opacity keeps the value inside the
     palette instead of introducing a sixth one, same approach as before. */
  --md-default-fg-color--light:     #F6F6EAb3;
  --md-default-fg-color--lighter:   #F6F6EA80;
  --md-default-fg-color--lightest:  #F6F6EA1f;

  /* Green on Graphite measures 11.81:1 (up from Lime-on-Core-Black's 10.89:1,
     because Green is a lighter hex than Lime, not just a rename), so here it
     can carry link text directly, which is the kit's "CTAs and active
     states" role at full strength. */
  --md-typeset-a-color:             var(--hub-green);

  --md-primary-fg-color:            var(--hub-graphite);
  /* --md-primary-fg-color--dark is unused by the modern variant but IS read by
     the classic one; kept so a variant switch does not silently lose it. */
  --md-primary-fg-color--dark:      var(--hub-graphite);
  --md-primary-bg-color:            var(--hub-ivory);

  --md-accent-fg-color:             var(--hub-green);
  --md-accent-fg-color--transparent: #BBEA831f;
  --md-accent-bg-color:             var(--hub-graphite);

  /* DERIVATION, same collision the table header band hits below: the old
     palette had two distinct dark tokens (Core Black page surface, Ink code
     surface, 1.336:1 apart) and this used Ink directly as an opaque fill.
     The 2026-09-09 update merges both into the single Graphite token, so a flat
     var(--hub-graphite) here would sit at 1.0:1 against the page background:
     no visible code-block surface at all. Caught the same way as the table
     header, by computing the ratio rather than trusting the strict build.
     Uses Ivory at 5% over Graphite, the alpha already established for the
     lighter of the two washes in this file (matches --md-typeset-table-color
     --light below and the light theme's own code-bg treatment, which is
     Graphite at the same 5% over Ivory). 1.149:1 against the page background
     -- fainter than the table header's 12% wash on purpose, a code block is
     meant to read as a subtle surface change, not a banded one -- and Ivory
     code text on this wash measures 13.03:1. */
  --md-code-bg-color:               #F6F6EA0d;
  --md-code-fg-color:               var(--hub-ivory);

  /* Same failure as the light side, but total rather than merely faint:
     unset, both table variables default to black at 12%/3.5% (the library
     default), which on a Graphite page (relative luminance .014, very close
     to true black) is nearly black on black. Ivory 12% (0x1f) is the exact
     token already used above for --md-default-fg-color--lightest; reused
     rather than restated. Ivory 5% (0x0d) for hover is the same alpha the
     light side uses for Graphite, kept symmetric across the two themes. */
  --md-typeset-table-color:          #F6F6EA1f;
  --md-typeset-table-color--light:   #F6F6EA0d;

  --hub-rule: #F6F6EA40;
  --hub-wash: #F6F6EA0f;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
/* VERIFIED against Zensical 0.0.55 and re-checked on 0.1.1, modern variant:
   .md-footer colours itself from --md-default-bg-color and
   --md-default-fg-color. The --md-footer-*
   variables exist in the palette stylesheet but nothing in the modern variant
   reads them, so setting them here would look deliberate and do nothing. The
   footer therefore takes the page surface: ivory on light, graphite on dark,
   which is the kit's inversion rule either way. */

/* ── Green as the accent, used the way the kit describes ─────────────────── */

.md-typeset a {
  text-decoration-color: var(--md-default-fg-color--lighter);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Dark scheme: link text is Green (below), so its underline stays Green to
   match the text; light keeps the neutral underline set above. */
[data-md-color-scheme="slate"] .md-typeset a {
  text-decoration-color: var(--hub-green);
}

/* Resolves per theme via --md-accent-fg-color: Graphite in light (set above,
   because Green on Ivory measures 1.27:1), Green in dark (11.81:1 on
   Graphite, untouched). No longer hardcoded to Green here.
   Consequence to know about: in the dark scheme every link whose colour comes
   from the theme's link rule resolves through the accent variable to Green
   TEXT. That is the accent's active-state role applied to links, and it is
   retained as is; the contrast is not the issue (11.81:1), the role is. To
   change it, redefine the dark-scheme link colour; no per-selector patch is
   needed elsewhere. */
.md-typeset a:hover,
.md-typeset a:focus {
  color: var(--md-accent-fg-color);
}

[data-md-color-scheme="default"] .md-typeset a:hover,
[data-md-color-scheme="default"] .md-typeset a:focus {
  /* Hover colour no longer changes in light mode (base and hover are both
     Graphite now), so the underline thickening is the entire hover affordance
     here and is not redundant with the color rule above. */
  text-decoration-thickness: 3px;
}

/* Calls to action: green fill with Graphite text measures 11.81:1 (up from
   the prior pass's lime-fill/ink-text 8.15:1, because Green is lighter than
   Lime -- more margin, not less). */
.md-typeset .md-button--primary {
  background-color: var(--hub-green);
  border-color: var(--hub-green);
  color: var(--hub-graphite);
}

.md-typeset .md-button--primary:hover,
.md-typeset .md-button--primary:focus {
  background-color: var(--hub-graphite);
  border-color: var(--hub-graphite);
  color: var(--hub-ivory);
}

/* DERIVATION: dark-theme-only override, for the same reason as the table
   header band and code-block background above. The unscoped hover rule just
   above inverts the button to a Graphite fill, which reads fine on the
   Ivory light-theme page (14.97:1, a plainly visible dark pill) but on the
   Graphite dark-theme page it would sit at 1.0:1 against the page itself:
   the button's fill and border would vanish on hover, leaving only the
   Ivory text floating with no visible shape around it. The prior pass had a
   related but non-zero version of this problem (Ink-fill hover on a
   Core-Black page measured 1.336:1, weak but nonzero); merging Core Black
   and Ink into the single Graphite token removes that margin entirely.
   Fixed by inverting the OTHER direction in dark mode specifically: Ivory
   fill with Graphite text, using only the two tokens already in play here
   (no new hex). Ivory fill against the Graphite page measures 14.97:1
   (clearly visible as a shape), and Graphite text on Ivory measures the
   same 14.97:1 (comfortably readable). */
[data-md-color-scheme="slate"] .md-typeset .md-button--primary:hover,
[data-md-color-scheme="slate"] .md-typeset .md-button--primary:focus {
  background-color: var(--hub-ivory);
  border-color: var(--hub-ivory);
  color: var(--hub-graphite);
}

/* Green chip, light theme only: back-to-top, tag chips, and the secondary
   sidebar toggle all pair --md-accent-fg-color as a BACKGROUND with
   --md-accent-bg-color as the paired text/icon colour. Left to the variable
   redefinition above, that pairing would become Graphite-fill/Ivory-text
   instead of the intended Green-fill/Graphite-text (11.81:1), so it is
   reasserted here with literal values rather than through the variables.
   Dark theme is untouched: the variables there are still Green fill /
   Graphite text natively. */
[data-md-color-scheme="default"] .md-top:hover,
[data-md-color-scheme="default"] .md-top:focus,
[data-md-color-scheme="default"] .md-typeset .md-tag[href]:hover,
[data-md-color-scheme="default"] .md-typeset .md-tag[href]:focus,
[data-md-color-scheme="default"] .md-sidebar--secondary .md-sidebar-button:hover,
[data-md-color-scheme="default"] .md-sidebar--secondary .md-sidebar-button:focus {
  background-color: var(--hub-green);
  color: var(--hub-graphite);
}

/* The tag chip's icon is a masked background-color, not text; it pairs with
   the chip's text colour (Graphite) rather than its fill, so the icon reads
   against the Green chip background instead of disappearing into it. */
[data-md-color-scheme="default"] .md-typeset .md-tag-icon[href]:hover:before,
[data-md-color-scheme="default"] .md-typeset .md-tag-icon[href]:focus:before {
  background-color: var(--hub-graphite);
}

/* Active states and line graphics. The nav-active highlight needs no rule
   here: it reads --md-accent-fg-color directly, which the light-theme
   redefinition above already resolves to Graphite. */
.md-typeset blockquote {
  border-left-color: var(--md-default-fg-color--lighter);
}

/* DERIVATION: border-only use, so this needs the 3:1 non-text/UI-component
   threshold, not 4.5:1. It is also UNSCOPED (applies to both themes), so it
   needs one value that clears 3:1 on both Ivory and Graphite. Neutral 01 on
   Graphite measures only 1.45:1 (fails badly, would read as nearly invisible
   in dark mode); Neutral 03 measures 4.475:1 on Ivory and 3.35:1 on Graphite,
   clearing 3:1 in both (the old Signal-Grey unscoped rule was similarly
   marginal on its darker side, at 3.04:1 on Core Black). Neutral 03 is the
   one that actually meets the need here, even though Neutral 01 was the pick
   for the light-theme secondary-text role above -- two different roles read
   the same source ramp at different steps because they have different
   thresholds. */
.md-typeset hr {
  border-bottom-color: var(--hub-neutral-03);
}

/* Focus ring: the scheme foreground (Graphite on Ivory, Ivory on Graphite).
   Green on Ivory is 1.27:1, below the 3:1 a focus indicator needs, and the
   accent is reserved for the primary button and the schematic. The header and
   its tab bar are Graphite in both schemes, so they take Ivory. */
:focus-visible {
  outline: 2px solid var(--md-default-fg-color);
  outline-offset: 2px;
}

.md-header :focus-visible,
.md-tabs :focus-visible {
  outline-color: var(--hub-ivory);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
/* The kit is silent on tables. The surface is bare: no outer frame, no header
   band. Legibility comes from type and rules rather than decoration: the
   header is the body face in semibold sentence case (small mono caps at
   tracking read as noise at table density), the first column is semibold so
   a row's subject is findable, and rows are separated by a rule at 25% of the
   foreground (--hub-rule), which stays visible on both surfaces where the
   12% hairline did not. A 2px Green rule closes the header: a border, so the
   1.27:1 Green-on-Ivory figure that governs text does not apply to it.

   Borders are on the TH and TD cells, not the TR or THEAD: in the default
   (non-collapsed) table border model a border declared on a row or row-group
   is not guaranteed to render, only on the cells. Zero border-spacing on this
   theme's tables keeps the per-cell borders reading as one unbroken line. */
.md-typeset table:not([class]) {
  border: 0;
  border-radius: 0;
  font-size: 0.76rem;
}

[data-md-color-scheme="default"] .md-typeset table > thead > tr,
[data-md-color-scheme="slate"] .md-typeset table > thead > tr {
  background-color: transparent;
}

.md-typeset table:not([class]) th {
  padding: 0.6em 1em 0.7em;
  min-width: 0;
  vertical-align: bottom;
  font-family: var(--hub-font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
  color: var(--md-default-fg-color);
  border-bottom: 2px solid var(--hub-green);
}

.md-typeset table:not([class]) td {
  padding: 0.8em 1em;
  border-top: 1px solid var(--hub-rule);
  line-height: 1.6;
}

.md-typeset table:not([class]) tbody tr:first-child td {
  border-top: 0;
}

.md-typeset table:not([class]) tbody tr:last-child td {
  border-bottom: 1px solid var(--hub-rule);
}

.md-typeset table:not([class]) td:first-child {
  font-weight: 600;
}

/* First column flush with the text margin, since there is no frame. */
.md-typeset table:not([class]) :is(th, td):first-child {
  padding-left: 0.1rem;
}

.md-typeset table:not([class]) :is(th, td):last-child {
  padding-right: 0.1rem;
}

.md-typeset table:not([class]) tbody tr:hover {
  box-shadow: none;
}

/* ── Diagrams (mermaid) ──────────────────────────────────────────────────── */
/* Mermaid derives node borders and node text from --md-accent-fg-color
   directly, and node fill from --md-accent-fg-color--transparent (Green at
   12% over the surface). Now that --md-accent-fg-color is redefined to
   Graphite in the light theme above, both overrides below are technically
   redundant: node-fg would already inherit Graphite. They are kept explicit
   anyway, because explicit is safer than incidental here: if the accent
   variable is ever changed back or scoped differently, these two lines are
   what keep the diagrams on what-is-thehub.md and
   onboarding/computing-provider.md from silently reverting to
   Green-on-Ivory (1.27:1) without anyone touching this section. Graphite on
   the node fill measures 14.57:1.
   The dark theme needs no override: Green on Graphite is 11.81:1. */

:root,
[data-md-color-scheme="default"] {
  --md-mermaid-node-fg-color: var(--hub-graphite);

  /* Sequence-diagram numbers take their background from node-fg (Graphite,
     set above) and their text from --md-accent-bg-color, which is now Ivory
     in the light theme (also redefined above), so without this line they
     would already read correctly as Ivory-on-Graphite by accident. Kept
     explicit for the same reason as node-fg-color: safety against a future
     variable change, not because it is load-bearing today.
     computing-provider.md has a sequenceDiagram. */
  --md-mermaid-sequence-number-fg-color: var(--hub-ivory);
}

/* ── The mark ────────────────────────────────────────────────────────────── */
/* The header is Graphite in both themes, so one reversed (ivory) mark serves
   both and nothing needs recolouring. The kit assigns TheHUB_Left_Horiz to
   site headers and footers, and that is the file shipped as logo.svg. */

.md-header,
.md-tabs {
  background-color: var(--hub-graphite);
  color: var(--hub-ivory);
}

.md-header__button.md-logo :is(img, svg) {
  height: 1.5rem;
  width: auto;
}

/* The theme hides the header logo below 76.25em (the drawer carries it
   instead). The header title is the fixed label "Docs" (overrides/partials/
   header.html), so without the mark a phone header would read only "DOCS" and
   never say whose docs these are. Show the mark at every width. */
@media screen and (max-width: 76.234375em) {
  .md-header__button.md-logo {
    display: block;
  }

  /* Drawer button first, then mark, then label: the markup puts the logo link
     ahead of the drawer label, which would split the mark from "DOCS". */
  .md-header__button[for="__drawer"] {
    order: -1;
  }
}

/* On a phone the mark shares one row with the drawer button, "DOCS" and the
   two right-hand buttons; at 1.5rem the label truncates to "DO...". */
@media screen and (max-width: 30em) {
  .md-header__button.md-logo :is(img, svg) {
    height: 1.1rem;
  }
}

/* Header tabs (navigation.tabs): the type and the Graphite surface are set
   above. The active tab is Ivory at full opacity (inactive tabs are 0.7) with
   an Ivory underline. The theme draws its own active underline from
   `--md-default-fg-color`, which is scheme-dependent: Ivory (visible) in dark,
   Graphite (invisible on the Graphite tabs bar) in light, the same
   unscoped-surface trap as the search button below. Replace it outright. */
.md-tabs__item--active {
  border-bottom-color: var(--hub-ivory);
  border-bottom-width: 2px;
}

/* ── Search ──────────────────────────────────────────────────────────────── */
/* VERIFIED against Zensical 0.0.55 "modern" variant (class absence re-checked
   on 0.1.1's compiled stylesheet), real headless-Chromium
   render (Playwright), both `prefers-color-scheme`s, resting and hover/focus
   states: the selectors this section previously targeted (`.md-search__form`,
   `.md-search__input`, `.md-search__icon`) do not exist anywhere in the
   compiled stylesheet or the rendered page. Classic Material for MkDocs
   renders the collapsed search box as a `<form>` containing an `<input>`;
   Zensical's modern variant replaces the whole thing with a single
   `<button class="md-search__button">` that opens a shadow-DOM dialog on
   click (the open dialog is self-themed by its own component styles and
   renders correctly in both schemes already; unaffected by this section).
   `zensical build --strict` reports nothing for a selector matching zero
   elements, so this shipped broken through a full palette update without
   failing any check -- the same silent-selector-mismatch failure mode as the
   Mermaid shadow-DOM entry in docs-platform-expert's memory file.

   Root cause once retargeted at the real element: the theme's own
   `.md-search__button` rule colours the icon and the "Search" label from
   `--md-default-fg-color` (scheme-dependent: Graphite in light, Ivory in
   dark), on the assumption that the surface behind it flips with the scheme
   too. `.md-header` and `.md-tabs` above are hardcoded to Graphite in BOTH
   schemes by deliberate brand choice ("one reversed mark serves both"), so
   that assumption is false specifically here. Confirmed by computed style:
   in the light scheme the icon fill, the label text, and the pill background
   all resolved to the same near-black Graphite the header itself uses --
   Graphite-on-Graphite, effectively invisible. The dark scheme happened to
   compute Ivory-on-Graphite already, which is why only light mode was
   reported broken. The fix applies the same treatment already given to
   `.md-header` itself: unscope the header-search chrome from the page scheme
   and tie it to the header's own (constant) Graphite surface instead.
   Ivory-on-Graphite measures 14.97:1, the same ratio already relied on
   throughout this file's header and link-hover derivations.

   The pill wash values (12% resting, 20% hover) are UNCHANGED from the prior
   (dead) rule -- only the selector was wrong, so the previous author's
   derivation is kept rather than re-guessed. */

.md-search__button {
  background-color: #F6F6EA1f;
  color: var(--hub-ivory);
}

.md-search__button:hover,
.md-search__button:focus {
  background-color: #F6F6EA33;
  color: var(--hub-ivory);
}

.md-search__button:before {
  background-color: var(--hub-ivory);
}

/* The "Ctrl+K" hint chip is its own surface (`--md-default-bg-color--light`,
   already scheme-correct: Ivory-ish chip on the light scheme, Graphite-ish
   chip on the dark scheme) layered on top of the button rather than sitting
   directly on the header, so it does not share the bug above. Pinned
   explicitly to the original scheme-dependent foreground here, because
   without this rule it would otherwise inherit the unconditional Ivory set
   on `.md-search__button` above and invert to Ivory-on-Ivory in light mode. */
.md-search__button:after {
  color: var(--md-default-fg-color);
}

/* ── Landing page (docs/index.md) ────────────────────────────────────────── */
/* Every rule is scoped under .hub-hero, .hub-band, or .md-typeset .grid.cards
   (used only on the landing page today), so no other page changes. Colors come
   from the theme variables mapped above, which flip per scheme, so nothing here
   is hard-coded and neither scheme can be left with an unset value. Green
   on this page is the primary button fill and the schematic's equalized
   paths (line graphics), the short rule before each eyebrow, and nothing else:
   other rules, hairlines, card edges and focus rings are neutral. (Site-wide,
   Green also draws the table header rule and the left rule of note, tip and
   success callouts; both are borders, not text.) Green is never text on
   Ivory (1.27:1). The one
   place Green is text is links in the dark scheme, where the theme's accent
   variable resolves to Green on Graphite; that is a pre-existing rule, not
   set here.
   Sizes convert against the 20px rem base (22px above 100em), not 16px. */

.md-typeset .hub-hero {
  padding: 0.9rem 0 0.8rem;
}

/* Eyebrow: mono, uppercase, tracked (the kit's label setting), led by a short
   Green rule as the line graphic. */
.md-typeset .hub-hero .hub-eyebrow,
.md-typeset .hub-routes .hub-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.7rem;
  font-family: var(--hub-font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}

.md-typeset .hub-hero .hub-eyebrow::before,
.md-typeset .hub-routes .hub-eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background-color: var(--hub-green);
}

/* Home-page H1: about 41px on a desktop (2.05rem at 20px), stepping down to
   about 31px on a phone. Wide enough to wrap to two or three lines. */
.md-typeset .hub-hero h1 {
  max-width: 22em;
  margin: 0 0 0.8rem;
  font-size: clamp(1.55rem, 1rem + 2vw, 2.05rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--md-default-fg-color);
}

/* Lede at a readable measure (about 62 characters). */
.md-typeset .hub-hero > p:not(.hub-eyebrow) {
  max-width: 38em;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--md-default-fg-color--light);
}

/* The two buttons share one paragraph: lay it out as a wrapping row. */
.md-typeset .hub-hero > p:has(.md-button) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  max-width: none;
  margin: 0;
}

.md-typeset .hub-hero .md-button {
  margin: 0;
}

@media screen and (max-width: 30em) {
  .md-typeset .hub-hero > p:has(.md-button) {
    flex-direction: column;
    align-items: stretch;
  }

  .md-typeset .hub-hero .md-button {
    text-align: center;
  }
}

/* Capability band: a responsive grid, 3 columns desktop, 2 tablet, 1 mobile.
   The bold lead becomes a small heading; no rule or frame, the grid gaps keep the items reading as a row. */
.md-typeset .hub-band {
  margin: 0.8rem 0 1.4rem;
  padding: 1rem 0 0.2rem;
}

.md-typeset .hub-band > ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem 1.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.md-typeset .hub-band > ul > li {
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--md-default-fg-color--light);
}

.md-typeset .hub-band > ul > li > strong:first-child {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--md-default-fg-color);
}

@media screen and (max-width: 76.1875em) {
  .md-typeset .hub-band > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .hub-band > ul {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Two-panel comparison (What is TheHUB): two columns from 45em, one below.
   minmax(0, 1fr) lets a Mermaid diagram shrink instead of forcing the
   column wide. Panels are centred, so the page needs no inline style. */
.md-typeset .hub-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.md-typeset .hub-compare > div {
  min-width: 0;
  text-align: center;
}

@media screen and (min-width: 45em) {
  .md-typeset .hub-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Cards (landing "Start onboarding"): neutral frame and wash-free surface, the
   same radius as the callouts, a quiet hover (a stronger neutral edge and the
   faint wash). The title link is stretched over the whole card so the card is
   one target; its focus ring is drawn on the card. One icon size, in the
   foreground colour. */
.md-typeset .grid.cards > ul > li {
  position: relative;
  border: 1px solid var(--hub-rule);
  border-radius: 0.3rem;
  box-shadow: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.md-typeset .grid.cards > ul > li:hover {
  border-color: var(--md-default-fg-color--light);
  background-color: var(--hub-wash);
  box-shadow: none;
}

.md-typeset .grid.cards > ul > li > p:first-child a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.3rem;
}

.md-typeset .grid.cards > ul > li:has(a:focus-visible) {
  outline: 2px solid var(--md-default-fg-color);
  outline-offset: 2px;
}

.md-typeset .grid.cards > ul > li > p:first-child a:focus-visible {
  outline: 0;
}

.md-typeset .grid.cards > ul > li > p:first-child .twemoji {
  height: 1.2rem;
  width: 1.2rem;
  margin-right: 0.4rem;
  vertical-align: -0.25em;
  color: var(--md-default-fg-color--light);
}

.md-typeset .grid.cards > ul > li > p:first-child .twemoji svg {
  height: 100%;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .md-typeset .grid.cards > ul > li {
    transition: none;
  }
}

/* ── Content tabs as a segmented control ─────────────────────────────────── */
.md-typeset .tabbed-labels {
  box-shadow: none;
  gap: 0.15rem;
  padding: 0.15rem;
  border: 1px solid var(--md-default-fg-color--lighter);
  border-radius: 0.25rem;
  background-color: var(--md-default-fg-color--lightest);
}

/* The theme bleeds the label row 0.8rem past the column for scroll reasons;
   a boxed control sits on the column instead. */
.md-content__inner > .tabbed-set .tabbed-labels {
  margin: 0;
  padding-left: 0.15rem;
  max-width: 100%;
}

.md-content__inner > .tabbed-set .tabbed-labels:after {
  content: none;
}

.md-typeset .tabbed-labels > label {
  position: relative;
  z-index: 1;
  padding: 0.55em 1.1em 0.5em;
  border-bottom: 0;
  border-radius: 0.18rem;
  font-family: var(--hub-font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;   /* 1.7px at 12px */
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}

.md-typeset .tabbed-labels > label:hover {
  color: var(--md-default-fg-color);
  background-color: var(--md-default-fg-color--lightest);
}

/* The theme's sliding indicator becomes the active segment: page-coloured
   fill and a hairline shadow, positioned by the theme's own JavaScript. */
.js .md-typeset .tabbed-labels:before {
  top: 0.15rem;
  bottom: 0.15rem;
  height: auto;
  border-radius: 0.18rem;
  background-color: var(--md-default-bg-color);
  box-shadow: 0 1px 2px #231F2026;
}

/* The theme recolours the indicator with the accent on keyboard focus
   (Graphite in light, which would hide Graphite text). Keep the segment
   page-coloured; the Green ring below is the focus state. */
.md-typeset .tabbed-set > input.focus-visible ~ .tabbed-labels:before {
  background-color: var(--md-default-bg-color);
}

/* Keep the active label at the label weight (the theme asks for 500, which
   is not shipped and would fall back to 400, lighter than the inactive ones). */
.md-typeset .tabbed-set > input:nth-child(1):checked ~ .tabbed-labels > :nth-child(1),
.md-typeset .tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > :nth-child(2),
.md-typeset .tabbed-set > input:nth-child(3):checked ~ .tabbed-labels > :nth-child(3),
.md-typeset .tabbed-set > input:nth-child(4):checked ~ .tabbed-labels > :nth-child(4),
.md-typeset .tabbed-set > input:nth-child(5):checked ~ .tabbed-labels > :nth-child(5),
.md-typeset .tabbed-set > input:nth-child(6):checked ~ .tabbed-labels > :nth-child(6) {
  color: var(--md-default-fg-color);
  font-weight: 600;
}

/* Keyboard focus: the Green ring on the focused label, same as every other
   control on the site. */
.md-typeset .tabbed-set > input:nth-child(1).focus-visible ~ .tabbed-labels > :nth-child(1),
.md-typeset .tabbed-set > input:nth-child(2).focus-visible ~ .tabbed-labels > :nth-child(2),
.md-typeset .tabbed-set > input:nth-child(3).focus-visible ~ .tabbed-labels > :nth-child(3),
.md-typeset .tabbed-set > input:nth-child(4).focus-visible ~ .tabbed-labels > :nth-child(4),
.md-typeset .tabbed-set > input:nth-child(5).focus-visible ~ .tabbed-labels > :nth-child(5),
.md-typeset .tabbed-set > input:nth-child(6).focus-visible ~ .tabbed-labels > :nth-child(6) {
  color: var(--md-default-fg-color);
  outline: 2px solid var(--md-default-fg-color);
  outline-offset: -2px;
}

/* No-JS fallback: the theme draws the active border in fg colour. */
.md-typeset .no-js .tabbed-set > input:checked ~ .tabbed-labels > label {
  border-bottom: 2px solid transparent;
}

.md-typeset .tabbed-content > .tabbed-block {
  padding-top: 0.3rem;
}

/* ── Diagram zoom (a.hub-zoom + <dialog class="hub-lightbox">) ───────────── */
.md-typeset a.hub-zoom {
  display: block;   /* NOT inline-block: the theme sizes an SVG <img> at
                       width:100%, which collapses to 0 inside a
                       shrink-to-fit inline-block (verified by render). */
  cursor: zoom-in;
  text-decoration: none;
  border-radius: 0.2rem;
}

.md-typeset a.hub-zoom:focus-visible {
  outline: 2px solid var(--md-default-fg-color);
  outline-offset: 3px;
}

.hub-lightbox {
  box-sizing: border-box;
  width: min(94vw, 74rem);
  max-width: none;
  max-height: 92vh;
  margin: auto;
  padding: 2.6rem 1rem 1rem;
  border: 0;
  border-radius: 0.3rem;
  background-color: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  overflow: hidden;           /* the inner area scrolls, so Close stays put */
}

/* Only while open: an unconditional display would override the browser's
   dialog:not([open]) { display: none }, leaving the closed dialog drawn near
   the top of the page after the first open (verified by render). */
.hub-lightbox[open] {
  display: flex;
  flex-direction: column;
}

/* Dark scheme: the dialog is Graphite on a dimmed Graphite page, so give it
   an edge. The light scheme's Ivory panel needs none. */
[data-md-color-scheme="slate"] .hub-lightbox {
  border: 1px solid var(--md-default-fg-color--lighter);
}

.hub-lightbox__scroll {
  overflow: auto;
  max-height: calc(92vh - 3.6rem);
  -webkit-overflow-scrolling: touch;
}

/* Graphite at 70 %: the backdrop is a dimmed page, not a new colour. */
.hub-lightbox::backdrop {
  background-color: #231F20b3;
}

.hub-lightbox__img {
  display: block;
  width: max(88vw, 56rem);   /* on a phone this exceeds the dialog, so the
                                image scrolls, which is the zoom. */
  max-width: 70rem;
  height: auto;
  margin: 0 auto;
  border-radius: 0.2rem;
}

/* The one control: mono uppercase, 1 px rule, a Graphite/Ivory pair per
   scheme, a neutral focus ring (the kit's active state). */
.hub-lightbox__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.2rem;
  padding: 0 0.7rem;
  border: 1px solid currentColor;
  border-radius: 0.15rem;
  background: transparent;
  color: inherit;
  font-family: var(--hub-font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;   /* 1.7px at 12px */
  text-transform: uppercase;
  cursor: pointer;
}

.hub-lightbox__close:hover {
  background-color: var(--md-default-fg-color);
  color: var(--md-default-bg-color);
}

.hub-lightbox__close:focus-visible {
  outline: 2px solid var(--md-default-fg-color);
  outline-offset: 2px;
}

body:has(.hub-lightbox[open]) {
  overflow: hidden;
}

/* ── Landing: two-column hero with a schematic ──────────────────────────── */
.md-typeset .hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.5rem 3rem;
  align-items: center;
  padding: 1.2rem 0 1rem;
}

.md-typeset .hub-hero > .hub-hero__copy > p:not(.hub-eyebrow) {
  max-width: 34em;
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--md-default-fg-color--light);
}

.md-typeset .hub-hero > .hub-hero__copy > p:has(.md-button) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.8rem;
  max-width: none;
  margin: 0;
}

.md-typeset .hub-hero__art {
  margin: 0;
}

/* Narrower column, so one step down from the single-column size. */
.md-typeset .hub-hero h1 {
  font-size: clamp(1.45rem, 1rem + 1.5vw, 1.75rem);
}

.md-typeset .hub-hero__art svg,
.md-typeset .hub-hero__art img {
  display: block;
  width: 100%;
  height: auto;
}

/* The schematic draws in currentColor so it flips with the scheme; Green is
   the equalized paths only (line graphics). */
.md-typeset .hub-hero__art .hub-schematic {
  color: var(--md-default-fg-color);
  font-family: var(--hub-font-mono);
}

@media screen and (max-width: 59.9375em) {
  .md-typeset .hub-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .md-typeset .hub-hero__art {
    max-width: 28rem;
  }
}

/* ── Pre-rendered diagrams (div.hub-diagram > svg) ───────────────────────── */
/* Each Mermaid fence is rendered to SVG ahead of time and inlined here by
   tools/py/hub_diagrams.py. The SVG's colours are var(--md-mermaid-*)
   references, so one file follows the light/dark switch, and its text uses the
   page's web fonts because it is inline rather than an <img>. */
.hub-diagram {
  margin: 1em 0;
  text-align: center;
}

.hub-diagram svg {
  display: block;
  margin-inline: auto;
  height: auto;
}

/* The theme dims every <small> in .md-typeset to 75% opacity. Mermaid's
   two-tier node labels put their second line in <small>, and the dimmed
   result misses contrast on the tinted node fill, so restore full opacity. */
.hub-diagram small {
  opacity: 1;
}

/* ── Site overview diagram (what-is-thehub.md) ───────────────────────────── */
/* One drawing in two layouts, generated by tools/overview.py: wide above
   phone width, stacked below it. The theme's #only-light / #only-dark image
   suffixes choose the variant for the color scheme. */
.md-typeset .hub-overview--stacked {
  display: none;
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .hub-overview--wide {
    display: none;
  }
  .md-typeset .hub-overview--stacked {
    display: block;
    max-width: 22rem;
    margin-inline: auto;
  }
}
