@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/mokly-viewer/fonts/InterVariable.woff2") format("woff2");
}
/* @mokly/ui: the rules of every component, in the order of src/styles.css. */
/* The theme of every shell root and of the standalone stub's document: the
   tokens and the Light half of the one semantic palette, recorded in
   docs/protocol/mokly-viewer-palette.md. Every themed role is redeclared for
   Dark below, so a role never exists in one appearance only. The contract's
   role use sets three Light values: --chrome-muted is #676e6a, control
   boundaries use --chrome-control-edge, and an invalid field borders
   --mbk-danger-ink. */
.mbk,
.mbk-document {
  color-scheme: light;
  --chrome-bg: #f4f4f1;
  --chrome-surface: #ffffff;
  --chrome-raised: #fbfbfa;
  --chrome-hover: #f4f6f3;
  --chrome-ink: #1a1d1c;
  --chrome-ink-2: #4a4f4d;
  --chrome-muted: #676e6a;
  --chrome-border: #e3e5e0;
  --chrome-border-strong: #c8ccc4;
  --chrome-control-edge: #868e88;
  --chrome-accent: #2a4733;
  --chrome-brand: #2f5945;
  --chrome-count-bg: rgba(20, 28, 22, 0.08);
  --chrome-scrim: rgba(20, 28, 22, 0.45);
  --chrome-disabled-bg: #e6ebe7;
  --chrome-disabled-edge: #d7dfd9;
  --chrome-disabled-ink: #5d6f63;
  --chrome-shadow: 0 30px 90px rgba(20, 28, 22, 0.14);
  --chrome-shadow-soft: 0 1px 2px rgba(20, 28, 22, 0.1);
  --chrome-shadow-press: inset 0 1px 2px rgba(20, 28, 22, 0.14);
  --chrome-shadow-drawer: 0 18px 50px rgba(20, 28, 22, 0.3);
  --chrome-shadow-sheet: 0 6px 28px rgba(36, 55, 43, 0.15);
  --sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --_mokly-private-on-ink: #ffffff;
  --_mokly-private-on-accent-deep: #ffffff;
  --_mokly-private-accent-default: #4f7864;
  --_mokly-private-accent-contrast-default: #ffffff;
  --_mokly-private-accent-soft-default: rgba(79, 120, 100, 0.1);
  --mokly-accent: var(--_mokly-private-accent-default);
  --mokly-accent-contrast: var(--_mokly-private-accent-contrast-default);
  --mokly-accent-soft: var(--_mokly-private-accent-soft-default);
  --mbk-accent-deep: #2f5945;
  --mbk-accent-surface: #edf3ef;
  --mbk-accent-edge: #b9cfc2;
  --mbk-guide: #dbded8;
  --mbk-dot: rgba(20, 28, 22, 0.05);
  --mbk-browser-bar: #ecede9;
  --mbk-status-changed-bg: #fff7e6;
  --mbk-status-changed-edge: #ead6ac;
  --mbk-status-changed-ink: #805d1d;
  --mbk-status-removed-bg: #fcefee;
  --mbk-status-removed-edge: #ecc5c1;
  --mbk-status-removed-ink: #9b433c;
  --mbk-danger-bg: #fcf0ed;
  --mbk-danger-edge: #edcdc5;
  --mbk-danger-ink: #964334;
  --mb-radius: 10px;
  --mb-shadow: var(--chrome-shadow-soft);
  --mb-bg: var(--chrome-bg);
  --mb-surface: var(--chrome-surface);
  --mb-border: var(--chrome-border);
  --mb-text: var(--chrome-ink);
  --mb-muted: var(--chrome-muted);
  --mb-added: var(--mbk-accent-deep);
  --mb-added-soft: var(--mbk-accent-surface);
  --mb-changed: var(--mbk-status-changed-ink);
  --mb-changed-soft: var(--mbk-status-changed-bg);
  --mb-removed: var(--mbk-status-removed-ink);
  --mb-removed-soft: var(--mbk-status-removed-bg);
  --mb-ignored: var(--chrome-muted);
  --mb-ignored-soft: var(--chrome-hover);
}

/* Preview tokens describe what a device screen shows, so they never follow the
   interface appearance: a light preview inside a dark catalogue keeps its
   light surface, ink and status indicators. */
.mbk,
.mbk-document {
  --mbk-screen-bg: #ffffff;
  --mbk-screen-ink: #1a1d1c;
  --mbk-dark-screen-bg: #121514;
  --mbk-dark-screen-ink: #eef1ef;
  --mbk-device-body: #171a18;
  --mbk-device-notch: #0b0d0c;
  --mbk-device-home: rgba(20, 24, 20, 0.4);
  --mbk-device-light-close: #d9655b;
  --mbk-device-light-minimise: #dba43d;
  --mbk-device-light-expand: #50a86d;
  --mbk-highlight-scrim: rgba(244, 246, 244, 0.72);
  --mbk-highlight-edge: #336249;
}

/* The Dark half. Auto follows the reader's system through CSS alone, so a
   dark reader never sees a light first paint and no script decides the
   appearance. An explicit choice wins over the system in either direction.
   Each rule selects a root that states its appearance, never a host page.
   The stub's document states no appearance until the bundle runs, so it
   takes Auto; a shell root without the mark stays Light. */
@media (prefers-color-scheme: dark) {
  .mbk[data-mokly-theme="auto"],
  .mbk-document[data-mokly-theme="auto"],
  .mbk-document:not([data-mokly-theme]) {
    color-scheme: dark;
    --chrome-bg: #161512;
    --chrome-surface: #221f1b;
    --chrome-raised: #1c1b17;
    --chrome-hover: #2c2925;
    --chrome-ink: #f0ece4;
    --chrome-ink-2: #b2aba0;
    --chrome-muted: #b2aba0;
    --chrome-border: #302d28;
    --chrome-border-strong: #8b8478;
    --chrome-control-edge: #8b8478;
    --chrome-accent: #a5cdb6;
    --chrome-brand: #a3cdb4;
    --chrome-count-bg: rgba(240, 236, 228, 0.1);
    --chrome-scrim: rgba(0, 0, 0, 0.55);
    --chrome-disabled-bg: #1c1b17;
    --chrome-disabled-edge: #302d28;
    --chrome-disabled-ink: #b2aba0;
    --chrome-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
    --chrome-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5);
    --chrome-shadow-press: inset 0 1px 2px rgba(0, 0, 0, 0.55);
    --chrome-shadow-drawer: 0 18px 50px rgba(0, 0, 0, 0.6);
    --chrome-shadow-sheet: 0 6px 28px rgba(0, 0, 0, 0.55);
    --_mokly-private-on-ink: #221f1b;
    --_mokly-private-on-accent-deep: #0e1a14;
    --_mokly-private-accent-default: #86b79b;
    --_mokly-private-accent-contrast-default: #0e1a14;
    --_mokly-private-accent-soft-default: rgba(134, 183, 155, 0.16);
    --mokly-accent: var(--_mokly-private-accent-default);
    --mokly-accent-contrast: var(--_mokly-private-accent-contrast-default);
    --mokly-accent-soft: var(--_mokly-private-accent-soft-default);
    --mbk-accent-deep: #b6d8c4;
    --mbk-accent-surface: #24312a;
    --mbk-accent-edge: #3c5648;
    --mbk-guide: #302d28;
    --mbk-dot: rgba(240, 236, 228, 0.07);
    --mbk-browser-bar: #1c1b17;
    --mbk-status-changed-bg: #332a15;
    --mbk-status-changed-edge: #5d4d24;
    --mbk-status-changed-ink: #e6c179;
    --mbk-status-removed-bg: #331f1d;
    --mbk-status-removed-edge: #5e3b37;
    --mbk-status-removed-ink: #f1a99c;
    --mbk-danger-bg: #331f1d;
    --mbk-danger-edge: #5e3b37;
    --mbk-danger-ink: #f1a99c;
  }
}

.mbk[data-mokly-theme="dark"],
.mbk-document[data-mokly-theme="dark"] {
  color-scheme: dark;
  --chrome-bg: #161512;
  --chrome-surface: #221f1b;
  --chrome-raised: #1c1b17;
  --chrome-hover: #2c2925;
  --chrome-ink: #f0ece4;
  --chrome-ink-2: #b2aba0;
  --chrome-muted: #b2aba0;
  --chrome-border: #302d28;
  --chrome-border-strong: #8b8478;
  --chrome-control-edge: #8b8478;
  --chrome-accent: #a5cdb6;
  --chrome-brand: #a3cdb4;
  --chrome-count-bg: rgba(240, 236, 228, 0.1);
  --chrome-scrim: rgba(0, 0, 0, 0.55);
  --chrome-disabled-bg: #1c1b17;
  --chrome-disabled-edge: #302d28;
  --chrome-disabled-ink: #b2aba0;
  --chrome-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  --chrome-shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5);
  --chrome-shadow-press: inset 0 1px 2px rgba(0, 0, 0, 0.55);
  --chrome-shadow-drawer: 0 18px 50px rgba(0, 0, 0, 0.6);
  --chrome-shadow-sheet: 0 6px 28px rgba(0, 0, 0, 0.55);
  --_mokly-private-on-ink: #221f1b;
  --_mokly-private-on-accent-deep: #0e1a14;
  --_mokly-private-accent-default: #86b79b;
  --_mokly-private-accent-contrast-default: #0e1a14;
  --_mokly-private-accent-soft-default: rgba(134, 183, 155, 0.16);
  --mokly-accent: var(--_mokly-private-accent-default);
  --mokly-accent-contrast: var(--_mokly-private-accent-contrast-default);
  --mokly-accent-soft: var(--_mokly-private-accent-soft-default);
  --mbk-accent-deep: #b6d8c4;
  --mbk-accent-surface: #24312a;
  --mbk-accent-edge: #3c5648;
  --mbk-guide: #302d28;
  --mbk-dot: rgba(240, 236, 228, 0.07);
  --mbk-browser-bar: #1c1b17;
  --mbk-status-changed-bg: #332a15;
  --mbk-status-changed-edge: #5d4d24;
  --mbk-status-changed-ink: #e6c179;
  --mbk-status-removed-bg: #331f1d;
  --mbk-status-removed-edge: #5e3b37;
  --mbk-status-removed-ink: #f1a99c;
  --mbk-danger-bg: #331f1d;
  --mbk-danger-edge: #5e3b37;
  --mbk-danger-ink: #f1a99c;
}

/* The stub page around the standalone shell: no margin, the full viewport
   without scrolling, and the shell's background and type, also before the
   bundle runs and without JavaScript. */
.mbk-document,
.mbk-document > body {
  margin: 0;
  min-height: 100%;
}

.mbk-document > body {
  height: 100vh;
  overflow: hidden;
  background: var(--chrome-bg);
  color: var(--chrome-ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* The reset class, mbk-reset. Each package component puts it on every element
   that it renders, apart from the host slots, whose content stays the host's.
   The class gives its element border-box sizing and the reader's reduced
   motion, and resets links and text blocks. Element filters sit in :where(),
   so each reset rule weighs one class: it beats a host page's element rules,
   and every component rule, which follows it in styles.css, beats it. An SVG
   drawing carries the class on its <svg> element, and its shapes take the
   same sizing and motion. */
.mbk-reset,
.mbk-reset::before,
.mbk-reset::after,
.mbk-reset:where(svg) *,
.mbk-reset:where(svg) *::before,
.mbk-reset:where(svg) *::after {
  box-sizing: border-box;
}

.mbk-reset:where(a) {
  color: inherit;
}

.mbk-reset:where(h1, h2, h3, p) {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .mbk-reset,
  .mbk-reset::before,
  .mbk-reset::after,
  .mbk-reset:where(svg) *,
  .mbk-reset:where(svg) *::before,
  .mbk-reset:where(svg) *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* The standalone catalogue's Appearance control. The narrow query is the
   shell's one layout breakpoint, narrower than 900px. */
.mbk-appearance {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--chrome-control-edge);
  border-radius: 8px;
  background: var(--chrome-surface);
  color: var(--chrome-ink-2);
  cursor: pointer;
}

.mbk-appearance[hidden] {
  display: none;
}

.mbk-appearance:hover {
  border-color: var(--mbk-accent-deep);
  background: var(--mbk-accent-surface);
  color: var(--mbk-accent-deep);
}

.mbk-appearance:focus-within {
  outline: 2px solid var(--mbk-accent-deep);
  outline-offset: 2px;
}

.mbk-appearance svg {
  display: block;
  flex-shrink: 0;
}

/* All three faces are rendered and the current one is revealed by attribute,
   so the startup asset changes the visible glyph and word by setting one
   value rather than rewriting markup. */
.mbk-appearance-option {
  display: none;
  align-items: center;
  gap: 6px;
}

.mbk-appearance[data-appearance-value="auto"] > [data-appearance-option="auto"],
.mbk-appearance[data-appearance-value="light"]
  > [data-appearance-option="light"],
.mbk-appearance[data-appearance-value="dark"]
  > [data-appearance-option="dark"] {
  display: inline-flex;
}

.mbk-appearance-value {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.mbk-appearance > select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

/* Below the breakpoint the label collapses to its glyph, so search and the
   menu keep their room while the control stays reachable. */
@media (width < 56.25rem) {
  .mbk-appearance {
    padding: 0 7px;
  }

  .mbk-appearance-value {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}
/* Per-view change evidence on a view control: a 6px accent dot in the
   control's top-right corner, ringed so it stays legible over the icon, and
   the wording a screen reader hears as the control's description. The marked
   control is the dot's containing block. Both are hidden until the shown view
   is not the changed one, so the mark stays distinct from the control's
   pressed state and never draws an edge rail. */
.mbk-view-changed {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mokly-accent);
  box-shadow: 0 0 0 1.5px var(--chrome-surface);
  pointer-events: none;
}

.mbk-view-changed-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The comparison band: the mode group, Scroll together, and Refresh. The
   narrow query is the shell's one layout breakpoint, narrower than 900px. */
.mbk-diff-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--chrome-border);
  background: var(--chrome-surface);
}

/* The band and its parts show and hide through their hidden attributes. */
.mbk-diff-toolbar[hidden],
.mbk-diff-toolbar [hidden] {
  display: none;
}

/* A mode drawn as a link or as inert text takes the line box and the
   centring that a mode button has by default. The host's segmented control
   gives all three the same padding, type, and colours. */
.mbk-diff-toolbar .mbk-seg > :is(a, span) {
  line-height: normal;
  text-align: center;
}

/* Scroll together: a transparent native checkbox covers the whole control,
   so the label is its hit area and focus stays on the checkbox. */
.mbk-diff-sync {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--chrome-ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.mbk-diff-sync input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.mbk-diff-sync-track {
  position: relative;
  flex-shrink: 0;
  width: 30px;
  height: 18px;
  border: 1px solid var(--chrome-control-edge);
  border-radius: 999px;
  background: var(--chrome-bg);
}

/* The knob is drawn by its border, which forced colours keep, so the
   switch's state stays visible without opting out of the reader's colours. */
.mbk-diff-sync-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border: 6px solid var(--chrome-control-edge);
  border-radius: 50%;
}

/* On uses the deep accent and its private contrast, which equal the design's
   sage-deep and accent contrast in both appearances. The consumer's
   --mokly-accent-contrast override pairs only with its own accent, so the
   knob never reads it. */
.mbk-diff-sync input:checked + .mbk-diff-sync-track {
  border-color: var(--mbk-accent-deep);
  background: var(--mbk-accent-deep);
}

.mbk-diff-sync input:checked + .mbk-diff-sync-track::after {
  left: 14px;
  border-color: var(--_mokly-private-on-accent-deep);
}

.mbk-diff-sync input:focus-visible + .mbk-diff-sync-track {
  outline: 2px solid var(--mbk-accent-deep);
  outline-offset: 2px;
}

.mbk-diff-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--chrome-accent);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

/* The picture of Refresh in a band that is not interactive acts on nothing. */
span.mbk-diff-refresh {
  cursor: default;
}

@media (width < 56.25rem) {
  .mbk-diff-toolbar {
    padding: 8px 12px;
  }

  .mbk-diff-toolbar .mbk-seg {
    flex: 1 1 100%;
  }
}
/* The 48px top bar: the drawer menu, the brand, the catalogue search, and the
   end control. The narrow query is the shell's one layout breakpoint,
   narrower than 900px. */
.mbk-topbar {
  position: relative;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 48px;
  flex-shrink: 0;
  padding: 0 16px;
  background: var(--chrome-surface);
  border-bottom: 1px solid var(--chrome-border);
}

.mbk-menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: var(--chrome-surface);
  color: var(--chrome-ink-2);
  font-size: 14px;
  cursor: pointer;
}

/* The picture of the menu in a static depiction acts on nothing. */
span.mbk-menu {
  cursor: default;
}

.mbk-search-toggle,
.mbk-search-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: var(--chrome-surface);
  color: var(--chrome-ink-2);
  cursor: pointer;
}

.mbk-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.mbk-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--chrome-brand);
}

/* The brand mark's two rules take the surface colour behind the mark. */
.mbk-mark-rules {
  stroke: var(--chrome-surface);
}

.mbk-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.mbk-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  max-width: 440px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
  background: var(--chrome-bg);
  color: var(--chrome-muted);
}

.mbk-search > svg {
  flex-shrink: 0;
}

.mbk-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  color: var(--chrome-ink);
  font: inherit;
  outline: none;
}

.mbk-search input::placeholder {
  color: var(--chrome-muted);
}

/* Below the breakpoint the menu opens the drawer, the brand keeps only its
   mark, and the scheme switch moves to the screen header. */
@media (width < 56.25rem) {
  .mbk-menu {
    display: inline-flex;
  }

  .mbk-topbar[data-search] .mbk-name {
    display: none;
  }

  .mbk-search {
    position: static;
  }

  .mbk-topbar > [data-mokly-schemeswitch] {
    display: none;
  }
}
/* The tag button at the end of the catalogue search and the picker that it
   drops. The picker draws the package's tag chips. The narrow query is the
   shell's one layout breakpoint, narrower than 900px. */
.mbk-search-tag {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: -5px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--chrome-muted);
}

/* The pointer and the hover fill mark a link or a button. The picture of a
   static depiction acts on nothing, so it keeps the resting look. */
.mbk-search-tag:is(a, button) {
  cursor: pointer;
}

.mbk-search-tag:is(a, button):hover {
  background: var(--chrome-border);
  color: var(--chrome-ink-2);
}

.mbk-tag-picker {
  position: absolute;
  z-index: 1;
  top: calc(100% + 7px);
  right: -1px;
  left: -1px;
  padding: 9px 11px 11px;
  border: 1px solid var(--chrome-border);
  border-radius: 10px;
  background: var(--chrome-surface);
  box-shadow: var(--chrome-shadow);
}

.mbk-tag-picker-head {
  margin-bottom: 8px;
  color: var(--chrome-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mbk-tag-picker .mbk-chips {
  max-height: 210px;
  overflow-y: auto;
}

/* Below the breakpoint the search field no longer positions the picker, so it
   opens as a sheet under the top bar. */
@media (width < 56.25rem) {
  .mbk-tag-picker {
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    border-top: 0;
    border-radius: 0 0 12px 12px;
  }
}
/* The catalogue tree: sections and folders as disclosures, entry rows with
   their glyph, indent, and changed mark, and the lists that entries
   disclose. */
.mbk-nav-section + .mbk-nav-section {
  margin-top: 10px;
}

.mbk-nav-section > summary {
  list-style: none;
}

.mbk-nav-section > summary::-webkit-details-marker {
  display: none;
}

.mbk-nav-section-head {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px 4px;
  color: var(--chrome-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.mbk-nav-section-chevron {
  display: inline-grid;
  place-items: center;
  transition: transform 120ms ease;
}

.mbk-nav-section[open] > .mbk-nav-section-head .mbk-nav-section-chevron {
  transform: rotate(90deg);
}

.mbk-nav-row {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 5px 8px;
  color: var(--chrome-ink-2);
  text-decoration: none;
  font-size: 12.5px;
  line-height: 1.3;
  cursor: pointer;
}

.mbk-nav-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: var(--mbk-indent, 0);
  right: 0;
  border-radius: 6px;
}

.mbk-nav-row:hover::before {
  background: var(--mokly-accent-soft);
}

.mbk-nav-row.active,
.mbk-nav-row[aria-current="page"] {
  color: var(--mokly-accent-contrast);
  font-weight: 600;
}

.mbk-nav-row.active::before,
.mbk-nav-row[aria-current="page"]::before {
  background: var(--mokly-accent);
}

.mbk-nav-label {
  font-weight: 600;
  color: var(--chrome-ink);
}

.mbk-nav-ico {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--chrome-muted);
}

.mbk-nav-ico.flow {
  color: var(--mokly-accent);
}

.mbk-nav-ico.folder {
  color: var(--chrome-ink-2);
}

.mbk-nav-ico.folder > svg {
  grid-area: 1 / 1;
}

.mbk-nav-ico.folder > svg:nth-child(2) {
  display: none;
}

details.mbk-nav-group[open] > summary .mbk-nav-ico.folder > svg:nth-child(1) {
  display: none;
}

details.mbk-nav-group[open] > summary .mbk-nav-ico.folder > svg:nth-child(2) {
  display: block;
}

.mbk-nav-row.active .mbk-nav-ico,
.mbk-nav-row[aria-current="page"] .mbk-nav-ico {
  color: color-mix(in srgb, var(--mokly-accent-contrast) 90%, transparent);
}

.mbk-nav-row.active .mbk-nav-label,
.mbk-nav-row[aria-current="page"] .mbk-nav-label {
  color: var(--mokly-accent-contrast);
}

.mbk-nav-count {
  margin-left: auto;
  color: var(--chrome-muted);
  font-family: var(--mono);
  font-size: 10.5px;
}

.mbk-nav-row.active .mbk-nav-count,
.mbk-nav-row[aria-current="page"] .mbk-nav-count {
  color: color-mix(in srgb, var(--mokly-accent-contrast) 75%, transparent);
}

.mbk-nav-row[hidden],
details.mbk-nav-group[hidden] {
  display: none;
}

details.mbk-nav-section[hidden] {
  display: none;
}

details.mbk-nav-group > summary {
  list-style: none;
}

details.mbk-nav-group > summary::-webkit-details-marker {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .mbk-nav-section-chevron {
    transition: none;
  }
}

/* An entry row with a list: the link and the chevron that discloses the
   list. */
.mbk-nav-leaf {
  display: flex;
  align-items: center;
  gap: 2px;
}

.mbk-nav-leaf[hidden] {
  display: none;
}

.mbk-nav-leaf > .mbk-nav-row {
  flex: 1;
  min-width: 0;
}

/* The row's inset pill continues under the trailing disclosure, so one
   highlight covers the whole leaf without painting a second surface. */
.mbk-nav-leaf > .mbk-nav-row::before {
  right: -18px;
}

.mbk-nav-variants-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--chrome-muted);
  cursor: pointer;
}

.mbk-nav-variants-toggle:hover,
.mbk-nav-variants-toggle:focus-visible {
  color: var(--mbk-accent-deep);
}

.mbk-nav-variants-toggle:focus-visible {
  outline: 2px solid var(--mbk-accent-deep);
  outline-offset: 2px;
}

.mbk-nav-leaf:has(> .mbk-nav-row[aria-current="page"])
  .mbk-nav-variants-toggle {
  color: var(--mokly-accent-contrast);
}

.mbk-nav-variants-toggle svg {
  transition: transform 120ms ease;
}

.mbk-nav-variants-toggle[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.mbk-nav-variants[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .mbk-nav-variants-toggle svg {
    transition: none;
  }
}

/* The changed mark: a 6px accent dot at the row's trailing edge and the
   wording a screen reader hears beside it. Both are driven by the row's own
   attributes, so a client evidence refresh moves the mark by toggling them.
   A Removed row is never marked; its label already names its state. A row
   link and the picture of a row without an address carry the same mark. */
.mbk-nav-changed-text {
  display: none;
}

a[data-nav-row][data-changed="true"]:not([data-nav-removed]):where(
    .mbk-reset
  )::after,
a[data-nav-row][data-changed-variants="true"]:where(.mbk-reset)::after,
span[data-nav-row][data-changed="true"]:not([data-nav-removed]):where(
    .mbk-reset
  )::after,
span[data-nav-row][data-changed-variants="true"]:where(.mbk-reset)::after {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 50%;
  background: var(--mokly-accent);
}

a[data-nav-row][aria-current="page"][data-changed="true"]:where(
    .mbk-reset
  )::after,
a[data-nav-row][aria-current="page"][data-changed-variants="true"]:where(
    .mbk-reset
  )::after,
span[data-nav-row][aria-current="page"][data-changed="true"]:where(
    .mbk-reset
  )::after,
span[data-nav-row][aria-current="page"][data-changed-variants="true"]:where(
    .mbk-reset
  )::after {
  background: var(--mokly-accent-contrast);
}

a[data-nav-row][data-changed="true"]:not([data-nav-removed])
  .mbk-nav-changed-text,
a[data-nav-row][data-changed-variants="true"] .mbk-nav-changed-text,
span[data-nav-row][data-changed="true"]:not([data-nav-removed])
  .mbk-nav-changed-text,
span[data-nav-row][data-changed-variants="true"] .mbk-nav-changed-text {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* The catalogue navigation column: its head, the All and Changes filter, the
   scrolling pane, the status line, and the resize separator. The narrow query
   is the shell's one layout breakpoint, narrower than 900px, below which the
   column is a drawer. */
.mbk-nav {
  position: relative;
  display: flex;
  flex-direction: column;
  width: var(--mbk-nav-width, 248px);
  flex-shrink: 0;
  background: var(--chrome-raised);
  border-right: 1px solid var(--chrome-border);
  overflow: visible;
}

.mbk-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 9px;
  color: var(--chrome-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mbk-nav-collapse {
  padding: 0;
  border: none;
  background: none;
  color: var(--chrome-muted);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.mbk-nav-filter {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 8px 8px;
  padding: 3px;
  border-radius: 8px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
}

.mbk-nav-filter-opt {
  display: flex;
  align-items: center;
  padding: 4px 11px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--chrome-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.mbk-nav-filter-opt.active,
.mbk-nav-filter-opt[aria-pressed="true"] {
  background: var(--chrome-surface);
  color: var(--chrome-ink);
  box-shadow: var(--chrome-shadow-soft);
}

/* A static depiction draws Collapse all as text and a filter as a link or
   text. Each takes the line box that a button has by default, and text acts
   on nothing. */
span.mbk-nav-collapse,
.mbk-nav-filter > :is(a, span) {
  line-height: normal;
}

span.mbk-nav-collapse,
span.mbk-nav-filter-opt {
  cursor: default;
}

.mbk-nav-filter-count {
  margin-left: 6px;
  border-radius: 999px;
  background: var(--chrome-count-bg);
  color: var(--chrome-ink-2);
  font-family: var(--mono);
  font-size: 10px;
}

.mbk-nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 12px;
}

/* Below the breakpoint the column is a drawer under the top bar, over a scrim
   that dims the rest of the shell. */
@media (width < 56.25rem) {
  .mbk-nav {
    display: none;
    position: absolute;
    top: 48px;
    bottom: 0;
    left: 0;
    z-index: 10;
    width: 82%;
    max-width: 20rem;
    border-right: 1px solid var(--chrome-border);
    overflow: hidden;
    box-shadow: 0 0 0 100vmax var(--chrome-scrim);
  }

  .mbk[data-drawer="open"] .mbk-nav {
    display: flex;
  }
}

/* Loading and result counts occupy the same space; reduced motion stays
   legible. */
.mbk-nav-filter-count {
  display: inline-grid;
  place-items: center;
  width: 4ch;
  height: 15px;
  line-height: 1;
}

.mbk-nav-filter-count:has(.mbk-nav-spinner) {
  background: none;
}

.mbk-nav-spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border: 1.5px solid var(--chrome-border);
  border-top-color: var(--chrome-muted);
  border-radius: 50%;
  animation: mbk-nav-spin 0.8s linear infinite;
}

.mbk-nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  color: var(--chrome-muted);
  font-size: 12px;
  line-height: 1.5;
}

.mbk-nav-status[hidden] {
  display: none;
}

.mbk-nav-status:has(.mbk-nav-status-text) {
  align-items: flex-start;
}

.mbk-nav-status:has(.mbk-nav-status-text) .mbk-nav-spinner {
  margin-top: 3px;
}

.mbk-nav-status-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mbk-nav-status-title {
  color: var(--chrome-ink-2);
  font-weight: 600;
}

.mbk-nav-status-detail {
  color: var(--chrome-muted);
  font-size: 11.5px;
}

@keyframes mbk-nav-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mbk-nav-spinner {
    animation: none;
  }
}

/* The resize separator: absent from the drawer and until a script makes the
   column resizable. Its grip turns accent while hovered, focused, or dragged.
   The resizing class marks the shell root during a drag. */
.mbk-nav-resize {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -4px;
  bottom: 0;
  display: none;
  width: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  outline: none;
  touch-action: none;
}

.mbk .mbk-nav[data-resize-ready] .mbk-nav-resize {
  display: block;
}

.mbk-nav-resize::after {
  content: "";
  position: absolute;
  top: calc(50% - 16px);
  left: 3px;
  width: 2px;
  height: 32px;
  border-radius: 999px;
  background: var(--chrome-border-strong);
  transition:
    background 120ms ease,
    box-shadow 120ms ease;
}

.mbk-nav-resize:hover::after,
.mbk-nav-resize:focus-visible::after,
.mbk.mbk-nav-resizing .mbk-nav-resize::after {
  background: var(--mokly-accent);
  box-shadow: 0 0 0 3px var(--mokly-accent-soft);
}

.mbk-nav-resize:focus-visible {
  box-shadow: inset -2px 0 0 var(--mokly-accent);
}

@media (width < 56.25rem) {
  .mbk .mbk-nav[data-resize-ready] .mbk-nav-resize {
    display: none;
  }
}
/* The header above a catalogue view: the crumbs, the title row with the path
   chip, and the view's controls. The narrow query is the shell's one layout
   breakpoint, narrower than 900px; the 760px query is its device
   breakpoint. */
.mbk-screen-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 12px 24px;
  padding: 14px 24px 13px;
  border-bottom: 1px solid var(--chrome-border);
  background: var(--chrome-surface);
}

.mbk-screen-head-copy {
  min-width: 0;
}

.mbk-screen-head > .mbk-seg {
  margin-left: auto;
}

.mbk-screen-head > [data-mokly-schemeswitch] {
  display: none;
  margin-left: 0;
}

.mbk-crumbs {
  margin: 0;
  color: var(--chrome-muted);
  font-size: 11.5px;
}

.mbk-crumbs .sep {
  margin: 0 6px;
  opacity: 0.55;
}

.mbk-crumb-link {
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
}

.mbk-crumb-link:hover {
  color: var(--chrome-ink);
  text-decoration: underline;
}

/* A folder without its own page reveals its row instead of navigating, so
   its crumb is a button that reads exactly like the link crumbs. */
button.mbk-crumb-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.mbk-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 5px;
}

.mbk-title-row h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.01em;
}

@media (width < 56.25rem) {
  .mbk-title-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .mbk-title-row h2 {
    font-size: 17px;
  }
}

.mbk-pathchip {
  padding: 2px 8px;
  border: 1px solid var(--chrome-border);
  border-radius: 6px;
  background: var(--chrome-bg);
  color: var(--chrome-muted);
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  cursor: pointer;
}

.mbk-pathchip:active {
  background: var(--chrome-border);
  border-color: var(--chrome-border-strong);
  box-shadow: var(--chrome-shadow-press);
  color: var(--chrome-ink);
  transform: translateY(1px);
}

/* The picture of the path chip in a static depiction takes the line box that
   the chip button has by default, and acts on nothing. */
span.mbk-pathchip {
  line-height: normal;
  cursor: default;
}

/* Below the breakpoint the scheme switch leaves the top bar for the header. */
@media (width < 56.25rem) {
  .mbk-screen-head > [data-mokly-schemeswitch] {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  .mbk-screen-head {
    padding: 12px 16px 11px;
  }

  .mbk-screen-head > .mbk-seg {
    flex: 1 0 100%;
    margin-left: 0;
  }

  .mbk-screen-head > .mbk-seg button {
    flex: 1;
  }
}
/* The segmented control: segments on the shell background in a hairline
   frame, the shown one raised on the surface. A segment that is a link or
   inert text reads exactly like a segment button. */
.mbk-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: var(--chrome-bg);
  border: 1px solid var(--chrome-border);
}

.mbk-seg span,
.mbk-seg a,
.mbk-seg button {
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--chrome-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.mbk-seg span.active,
.mbk-seg a.active,
.mbk-seg button.active,
.mbk-seg [aria-pressed="true"],
.mbk-seg [aria-current="page"] {
  background: var(--chrome-surface);
  color: var(--chrome-ink);
  box-shadow: var(--chrome-shadow-soft);
}
/* A chip: a pill that names a tag, a use case, or a screen, in a group of
   chips. The tag picker and an entry's details draw the same chips. A tag chip
   is a toggle that fills with the accent while its tag filters the
   catalogue. */
.mbk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mbk-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid var(--chrome-border);
  border-radius: 999px;
  background: var(--chrome-bg);
  color: var(--chrome-ink-2);
  font-size: 11.5px;
  text-decoration: none;
}

.mbk-chip.flow svg {
  flex-shrink: 0;
  color: var(--mokly-accent);
}

.mbk-chip.screen svg {
  flex-shrink: 0;
  color: var(--chrome-muted);
}

.mbk-chip.tag:is(a, button) {
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.mbk-chip.tag svg {
  flex-shrink: 0;
  color: var(--chrome-muted);
}

/* The hover fill marks a resting link or button, so a selected chip keeps the
   accent under the pointer. */
.mbk-chip.tag:is(a, button):not(.active):hover {
  background: var(--mokly-accent-soft);
}

/* The selection draws on every form of the chip: a link, a toggle button, and
   the picture of a static depiction. */
.mbk-chip.tag.active {
  background: var(--mokly-accent);
  border-color: var(--mokly-accent);
  color: var(--mokly-accent-contrast);
}

.mbk-chip.tag.active svg {
  color: var(--mokly-accent-contrast);
}

.mbk-chip.tag:is(a, button):active {
  box-shadow: var(--chrome-shadow-press);
  transform: translateY(1px);
}
/* The workspace's 34px icon controls: a button drawn as one glyph, and a
   select whose transparent native control lies over a glyph and the 12px down
   chevron. A pressed toggle and a selected tab fill with the accent. A static
   depiction draws a toggle as a label with the button's look, whose
   transparent native switch lies over the glyph and takes the pressed,
   disabled, and focus states of the button, and a tab as the summary of a
   disclosure, which the open disclosure selects. */
.mbk-icon-button,
.mbk-icon-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--chrome-ink-2);
  cursor: pointer;
}

.mbk-icon-button svg,
.mbk-icon-select svg {
  display: block;
  flex: none;
}

.mbk-icon-select {
  width: 48px;
}

.mbk-icon-select svg:last-of-type {
  width: 12px;
}

.mbk-icon-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}

.mbk-icon-button > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.mbk-icon-button > input:disabled {
  pointer-events: none;
}

.mbk-icon-button:hover,
.mbk-icon-select:hover {
  background: var(--chrome-bg);
}

.mbk-icon-button:focus-visible,
.mbk-icon-select:focus-within,
.mbk-icon-button:has(> input:focus-visible) {
  outline: 2px solid var(--mokly-accent);
  outline-offset: 2px;
}

.mbk-icon-button[aria-selected="true"],
.mbk-icon-button[aria-pressed="true"],
.mbk-icon-button:has(> input:checked),
details[open] > summary.mbk-icon-button {
  color: var(--mokly-accent);
  background: var(--mokly-accent-soft);
  border-color: var(--chrome-border);
}

.mbk-icon-button:disabled,
.mbk-icon-button:has(> input:disabled) {
  opacity: 0.42;
  cursor: default;
}
/* The view controls: one group of icon controls at the end of the screen
   header. */
.mbk-view-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* A disabled view control mutes the dot of its change mark. */
.mbk-icon-button:disabled .mbk-view-changed,
.mbk-icon-select:has(select:disabled) .mbk-view-changed {
  background: var(--chrome-muted);
}
/* The change status beside an entry's title. Added, Changed, and Removed take
   the colour of their status; Unmodified keeps the neutral ink. */
.mbk-entry-status {
  border: 1px solid var(--chrome-border);
  border-radius: 5px;
  padding: 3px 7px;
  font-weight: 600;
  color: var(--chrome-ink-2);
}

.mbk-entry-status[data-status="Added"] {
  color: var(--mb-added);
  background: var(--mb-added-soft);
}

.mbk-entry-status[data-status="Changed"] {
  color: var(--mb-changed);
  background: var(--mb-changed-soft);
}

.mbk-entry-status[data-status="Removed"] {
  color: var(--mb-removed);
  background: var(--mb-removed-soft);
}
/* The collapsible Details panel below a page's stage, whose bar stays in view
   while the open panel scrolls, and the two-column body that it and the
   inspector's Details tab show. Comparison details inside the panel keep the
   panel's margins. Below the breakpoint, the body is one column. */
.mbk-details {
  flex-shrink: 0;
  border-top: 1px solid var(--chrome-border);
  background: var(--chrome-surface);
}

details.mbk-details[open] {
  max-height: 60%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

details.mbk-details[open] > summary.mbk-details-bar {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--chrome-surface);
}

.mbk-details-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 24px;
  border: none;
  background: none;
  color: var(--chrome-ink);
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.mbk-details-bar .chev {
  display: inline-grid;
  place-items: center;
  color: var(--chrome-muted);
}

.mbk-details-bar .chev svg {
  transition: transform 0.15s ease;
}

summary.mbk-details-bar {
  list-style: none;
}

summary.mbk-details-bar::-webkit-details-marker {
  display: none;
}

details.mbk-details[open] > summary.mbk-details-bar .chev svg {
  transform: rotate(90deg);
}

.mbk-details-hint {
  margin-left: auto;
  color: var(--chrome-muted);
  font-weight: 400;
}

.mbk-details-body {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 30px;
  padding: 6px 24px 20px;
}

.mbk-details > .mbk-comparison-evidence {
  margin: 0 24px;
  padding-bottom: 20px;
}

.mbk-details > .mbk-comparison-evidence h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.mbk-details-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--chrome-ink);
}

.mbk-details-rationale {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--chrome-ink-2);
}

.mbk-details-rationale .k {
  color: var(--chrome-muted);
  font-weight: 700;
}

.mbk-meta {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

@media (width < 56.25rem) {
  .mbk-details-body {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
/* A labelled value of the details' metadata column: the label in small
   capitals, then the value. A code chip draws a path in a bordered pill, and
   a link in a value takes the accent colour. A row that names nothing yet
   stays hidden. */
.mbk-meta-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: baseline;
}

.mbk-meta-k {
  color: var(--chrome-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mbk-meta-v {
  min-width: 0;
  font-size: 12.5px;
  color: var(--chrome-ink-2);
}

.mbk-code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid var(--chrome-border);
  border-radius: 6px;
  background: var(--chrome-bg);
  color: var(--chrome-ink);
  font-family: var(--mono);
  font-size: 11px;
  word-break: break-all;
}

.mbk-meta-v a {
  color: var(--mokly-accent);
  font-weight: 600;
  text-decoration: none;
}

/* An entry chip links to an entry, so it is a control with the control
   edge. A resting tag chip keeps its hairline, which the palette contract
   names as an exception. */
.mbk-chip:is(.flow, .screen) {
  border-color: var(--chrome-control-edge);
}

.mbk-meta-row[hidden] {
  display: none;
}
/* The workspace inspector: the tab strip, which stays in place while the open
   panel scrolls, and the panels. Its tabs draw with the icon control rules.
   Below the breakpoint, the inspector is a bottom sheet with a grab handle. */
.mbk-inspector {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 45px;
  background: var(--chrome-surface);
  border-top: 1px solid var(--chrome-border);
  z-index: 5;
}

.mbk-inspector[data-open="true"] {
  height: var(--inspector-height, 260px);
  max-height: calc(100% - 100px);
}

.mbk-inspector-tabs {
  display: flex;
  align-items: center;
  flex: none;
  gap: 5px;
  height: 45px;
  padding: 5px 16px;
}

.mbk-inspector-title {
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
  flex: 1;
}

.mbk-inspector-content {
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  font-size: 13px;
}

.mbk-inspector-content > section {
  padding: 10px 24px 24px;
}

.mbk-inspector-content .mbk-details-body {
  padding: 0;
}

.mbk-inspector-content h3 {
  font-size: 13px;
  margin: 0 0 12px;
}

.mbk-inspector-content h4 {
  font-size: 12px;
  margin: 14px 0 8px;
}

.mbk-inspector-content p {
  line-height: 1.5;
}

.mbk-inspector-content a {
  color: var(--mokly-accent);
}

.mbk-sheet-grab {
  display: none;
}

.mbk-inspector-content .mbk-controls-heading h3 {
  margin-bottom: 4px;
}

/* A static depiction draws each tab as a native disclosure. The tabs share
   the first row with the open tab's title and Close, which is part of the
   tab, and the open panel fills the row below. The resize separator is a
   picture of its grip, which lets a pointer reach the host's sizer below. */
.mbk-inspector[data-inspector-disclosures] {
  display: grid;
  grid-template-columns:
    repeat(var(--inspector-tabs, 4), 34px) minmax(0, 1fr)
    34px;
  grid-template-rows: auto 45px minmax(0, 1fr);
  align-items: center;
  column-gap: 5px;
  padding-inline: 16px;
}

.mbk-inspector[data-inspector-disclosures] > details,
.mbk-inspector[data-inspector-disclosures] > details::details-content {
  display: contents;
}

.mbk-inspector[data-inspector-disclosures] > details > summary {
  position: static;
  grid-row: 2;
  grid-column: var(--inspector-tab, auto);
  list-style: none;
}

.mbk-inspector[data-inspector-disclosures]
  > details
  > summary::-webkit-details-marker {
  display: none;
}

.mbk-inspector[data-inspector-disclosures] > details > .mbk-inspector-title {
  grid-row: 2;
  grid-column: -3 / -2;
}

.mbk-inspector[data-inspector-disclosures] [data-inspector-close] {
  position: absolute;
  top: 5.5px;
  right: 16px;
}

.mbk-inspector[data-inspector-disclosures] > details > .mbk-inspector-content {
  grid-row: 3;
  grid-column: 1 / -1;
  align-self: stretch;
  margin-inline: -16px;
}

.mbk-inspector[data-inspector-disclosures]
  > details:not([open])
  > :not(summary),
.mbk-inspector[data-inspector-disclosures]
  > details:not([open])
  [data-inspector-close] {
  display: none;
}

.mbk-inspector-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: inherit;
}

.mbk-inspector[data-inspector-disclosures]:has(> details[open])
  > .mbk-inspector-resize {
  display: block;
  pointer-events: none;
}

.mbk-sheet-grab > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.mbk-sheet-grab:has(> input:focus-visible) {
  outline: 2px solid var(--mokly-accent);
  outline-offset: -2px;
}

@media (width < 56.25rem) {
  .mbk-inspector {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--chrome-border);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: var(--chrome-shadow-sheet);
  }

  .mbk-inspector[data-open="true"] {
    height: min(42%, 320px);
    min-height: 190px;
    max-height: calc(100% - 36px);
  }

  .mbk-inspector[data-expanded="true"][data-open="true"] {
    height: 80%;
  }

  .mbk-inspector-tabs {
    padding: 4px 10px;
  }

  .mbk-inspector-content > section {
    padding: 8px 14px 20px;
  }

  .mbk-sheet-grab {
    display: grid;
    flex: none;
    place-items: center;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 14px 14px 0 0;
    background: transparent;
    touch-action: none;
    cursor: ns-resize;
  }

  .mbk-sheet-grab span {
    width: 36px;
    height: 5px;
    border-radius: 9px;
    background: var(--chrome-control-edge);
  }

  .mbk-inspector:not([data-open="true"]) .mbk-sheet-grab {
    display: none;
  }
}

/* The separator above an open inspector on a desktop, rotated from the
   catalogue navigation's separator, so that both share one hover, focus, and
   active look. At rest this grip draws the control edge, while the navigation
   grip keeps the strong border that the palette contract names as an
   exception. The offset measures from the inspector's padding box, so it
   clears the 1px top border as well as half the handle, which leaves the grip
   centred on that border. The resizing class marks the shell root during a
   drag, and every element in it follows. */
.mbk-inspector-resize {
  position: absolute;
  z-index: 2;
  top: -8.5px;
  right: 0;
  left: 0;
  display: none;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: row-resize;
  outline: none;
  touch-action: none;
}

.mbk-inspector[data-open="true"] .mbk-inspector-resize {
  display: block;
}

.mbk-inspector-resize::after {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% - 16px);
  width: 32px;
  height: 2px;
  border-radius: 999px;
  background: var(--chrome-control-edge);
  transition:
    background 120ms ease,
    box-shadow 120ms ease;
}

.mbk-inspector-resize:hover::after,
.mbk-inspector-resize:focus-visible::after,
.mbk.mbk-inspector-resizing .mbk-inspector-resize::after {
  background: var(--mokly-accent);
  box-shadow: 0 0 0 3px var(--mokly-accent-soft);
}

.mbk-inspector-resize:focus-visible {
  box-shadow: inset 0 2px 0 var(--mokly-accent);
}

/* While the reader drags the inspector's divider, the drag marks the shell
   root, and every element of the shell follows the drag. Only the package's
   own elements carry the reset class, so host slot content keeps its own
   cursor and frames. */
.mbk.mbk-inspector-resizing {
  cursor: row-resize;
  user-select: none;
}

.mbk.mbk-inspector-resizing .mbk-reset {
  cursor: row-resize !important;
}

.mbk.mbk-inspector-resizing iframe.mbk-reset {
  pointer-events: none;
}

@media (width < 56.25rem) {
  .mbk-inspector[data-open="true"] .mbk-inspector-resize {
    display: none;
  }

  /* The static sheet draws its grab above the tabs while a tab is open. */
  .mbk-inspector[data-inspector-disclosures] {
    padding-inline: 10px;
  }

  .mbk-inspector[data-inspector-disclosures]
    > details
    > .mbk-inspector-content {
    margin-inline: -10px;
  }

  .mbk-inspector[data-inspector-disclosures] [data-inspector-close] {
    top: 27.5px;
    right: 10px;
  }

  .mbk-inspector[data-inspector-disclosures] > .mbk-sheet-grab {
    position: relative;
    grid-row: 1;
    grid-column: 1 / -1;
    margin-inline: -10px;
  }

  .mbk-inspector[data-inspector-disclosures]:has(> details[open])
    > .mbk-sheet-grab {
    display: grid;
  }

  .mbk-inspector[data-inspector-disclosures]:has(> details[open])
    > .mbk-inspector-resize {
    display: none;
  }
}
/* The component instances of a view: a list whose nested lists step in beside
   a rule, and a selectable button for each instance. The instance of a static
   depiction is a link with the button's look, whose selected one is the
   current page. The viewport choice draws as chips. */
.mbk-instance-context {
  display: inline-block;
  margin: 0 8px 12px 0;
}

.mbk-instance-tree {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mbk-instance-tree .mbk-instance-tree {
  padding-left: 20px;
  border-left: 1px solid var(--chrome-border);
}

.mbk-instance-tree li {
  padding: 3px 0;
}

.mbk-instance-tree summary {
  cursor: pointer;
  color: var(--chrome-muted);
  font-size: 12px;
  padding: 4px 0;
}

.mbk-instance-select {
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  padding: 6px 8px;
  color: var(--chrome-ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.mbk-instance-tree a.mbk-instance-select {
  display: inline-block;
  color: var(--chrome-ink);
  text-decoration: none;
}

.mbk-instance-select[aria-pressed="true"],
.mbk-instance-tree a.mbk-instance-select[aria-current="true"] {
  background: var(--mokly-accent-soft);
  color: var(--mokly-accent);
  border-color: var(--chrome-border);
}
/* The supplied props: a list of rows, each with the name in a muted column and
   the value in code, and the line that says why the tab shows no props. */
.mbk-props {
  margin: 0 0 14px;
  font-size: 12px;
}

.mbk-props > div {
  display: grid;
  grid-template-columns: minmax(60px, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--chrome-border);
}

.mbk-props dt {
  color: var(--chrome-muted);
}

.mbk-props dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.mbk-props code {
  font-family: var(--mono);
  font-size: 11px;
  white-space: pre-wrap;
}

.mbk-empty-copy {
  max-width: 310px;
  color: var(--chrome-ink-2);
  font-size: 12px;
}
/* The consumers of a component: one ruled row for each, with its use and its
   counts below its link. */
.mbk-usage-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mbk-usage-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--chrome-border);
}

.mbk-usage-list small {
  display: block;
  margin-top: 4px;
  color: var(--chrome-muted);
}
/* A button drawn as text in the accent colour, such as Try again. The link of
   a static depiction takes the same look, also where its container colours
   links. */
.mbk-text-button,
a.mbk-text-button {
  background: none;
  border: 0;
  color: var(--mbk-accent-deep);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: none;
}

.mbk-text-button:focus-visible {
  outline: 2px solid var(--mokly-accent);
  outline-offset: 2px;
}
/* The comparison facts in an entry's Details, below a rule. Each paragraph and
   list, the saved variant's rows included, keeps a small gap, and a paragraph
   after a list a larger one. */
.mbk-comparison-evidence {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--chrome-border);
}

.mbk-comparison-evidence p,
.mbk-comparison-evidence ul,
.mbk-comparison-evidence dl {
  margin: 8px 0 0;
}

.mbk-comparison-evidence li {
  overflow-wrap: anywhere;
}

.mbk-comparison-evidence :is(ul, dl) + p {
  margin-top: 14px;
}
/* A field of the Props tab: a row with the name in a label column, then the
   control, the help, and the error. A control frames its surface, its border,
   and its invalid state. Below the breakpoint, the label column narrows. */
.mbk-control-field {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  position: relative;
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid var(--chrome-border);
}

.mbk-control-label {
  padding-top: 8px;
  color: var(--chrome-ink-2);
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.mbk-control-optional {
  display: block;
  margin-top: 3px;
  color: var(--chrome-muted);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
}

.mbk-control-value {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mbk-control-field input:not([type="checkbox"]),
.mbk-control-field select {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 5px 8px;
  font: inherit;
  font-size: 12px;
  color: var(--chrome-ink);
  border: 1px solid var(--chrome-control-edge);
  border-radius: 5px;
  background: var(--chrome-surface);
}

.mbk-control-field input[type="checkbox"] {
  margin: 0;
  accent-color: var(--mbk-accent-deep);
  width: 16px;
  height: 16px;
}

.mbk-control-value > input[type="checkbox"] {
  margin: 8px 0;
}

/* Each selector adds the invalid attribute to its control's border selector,
   so the invalid border outranks the control edge. */
.mbk-control-field input:not([type="checkbox"])[aria-invalid="true"],
.mbk-control-field select[aria-invalid="true"] {
  border-color: var(--mbk-danger-ink);
}

.mbk-control-field input:focus-visible,
.mbk-control-field select:focus-visible {
  outline: 2px solid var(--mokly-accent);
  outline-offset: 2px;
}

.mbk-control-field :disabled {
  opacity: 0.6;
  cursor: default;
}

.mbk-control-field small {
  color: var(--chrome-muted);
  font-size: 10px;
}

.mbk-control-set,
.mbk-control-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 11px;
}

.mbk-control-unset {
  margin: 0;
  color: var(--chrome-muted);
  font-size: 11px;
}

/* A static depiction runs no script, so the Set check box of an optional
   field shows the field's state in place: the control while checked, and the
   Not set line while not. The static frame draws both under its marker. */
.mbk-control-field[data-native-supply]:has(
    > .mbk-control-value > .mbk-control-set > input:checked
  )
  > .mbk-control-value
  > .mbk-control-unset,
.mbk-control-field[data-native-supply]:has(
    > .mbk-control-value > .mbk-control-set > input:not(:checked)
  )
  > .mbk-control-value
  > :not(.mbk-control-set, .mbk-control-unset, small) {
  display: none;
}

.mbk-control-field .mbk-control-error,
.mbk-control-error {
  color: var(--mbk-danger-ink);
  font-size: 11px;
}

@media (width < 56.25rem) {
  .mbk-control-field {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}
/* The Props tab's controls: the heading with the entry's title and Reset, the
   notices and alerts, the reset status, and the fieldset of the fields. The
   Reset of a static depiction is a link with the button's look. */
.mbk-component-controls {
  max-width: 680px;
}

.mbk-controls-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.mbk-controls-heading p {
  margin: 0;
  color: var(--chrome-muted);
  font-size: 11px;
}

.mbk-controls-edited {
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--mbk-status-changed-bg);
  color: var(--mbk-status-changed-ink);
}

.mbk-controls-reset,
a.mbk-controls-reset {
  padding: 0;
  border: 0;
  background: none;
  color: var(--mbk-accent-deep);
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  white-space: nowrap;
  cursor: pointer;
}

.mbk-controls-reset:disabled {
  color: var(--chrome-muted);
  text-decoration: none;
  cursor: default;
}

.mbk-controls-notice {
  padding: 10px 12px;
  border-radius: 6px;
  background: var(--chrome-hover);
  color: var(--chrome-ink-2);
  font-size: 12px;
}

.mbk-control-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--mbk-danger-edge);
  border-radius: 6px;
  background: var(--mbk-danger-bg);
  color: var(--mbk-danger-ink);
  font-size: 12px;
}

.mbk-control-alert p {
  margin: 4px 0 6px;
}

.mbk-control-alert .mbk-text-button {
  text-decoration: underline;
}

.mbk-controls-restored {
  margin: 0 0 8px;
  color: var(--mbk-accent-deep);
  font-size: 11px;
}

.mbk-controls-restored:empty {
  margin: 0;
}

.mbk-control-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
/* The status of a render of edited props, centred at the bottom of the
   preview. Below the breakpoint it moves to the top as a small pill. */
.mbk-edit-status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  color: var(--chrome-muted);
  font-size: 11px;
  pointer-events: none;
}

.mbk-pending-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mbk-accent-deep);
}

@media (width < 56.25rem) {
  /* Above the inspector sheet, which covers the bottom of the preview. */
  .mbk-edit-status {
    top: 8px;
    bottom: auto;
    width: max-content;
    margin: 0 auto;
  }

  .mbk-edit-status:not(:empty) {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--chrome-surface);
    box-shadow: var(--chrome-shadow-sheet);
  }
}
/* The Light-only note is hidden until a Dark shell reveals it in a container
   that keeps a light render: a frame label, the previous-version label, or
   the band above a current document. Each container's stylesheet reveals
   it. */
.mbk-frame-scheme-note {
  display: none;
  font-weight: 500;
}

/* A document with no dark render keeps its light page. The current
   document's band and the removed document's label are always rendered, and
   name that fallback only while Dark. */
.mbk-previous.mbk-scheme-fallback {
  display: none;
}

.mbk[data-mokly-color-scheme="dark"] .mbk-previous.mbk-scheme-fallback {
  display: block;
}
/* The quiet state of a stage without a preview: centred lines on the stage,
   with an optional title, note, code chip, and action. */
.mbk-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 40px;
  text-align: center;
  color: var(--chrome-ink-2);
}

.mbk-empty h2 {
  margin: 0;
  color: var(--chrome-ink);
  font-size: 19px;
}

.mbk-empty p {
  margin: 0;
  max-width: 460px;
  font-size: 13px;
  line-height: 1.55;
}

.mbk-empty-note {
  color: var(--chrome-muted);
  font-size: 12px;
}

.mbk-empty code {
  font-family: var(--mono);
  font-size: 11.5px;
}

.mbk-empty-link {
  margin-top: 8px;
  color: var(--mokly-accent);
  font-weight: 600;
}

button.mbk-empty-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
/* Frames centre only while they fit: plain centring would push the start of a
   row wider than the stage left of the scroll origin, out of reach. */
.mbk-stage {
  flex: 1;
  display: flex;
  justify-content: safe center;
  align-items: flex-start;
  gap: 40px;
  min-height: 0;
  padding: 28px;
  overflow: auto;
  background: radial-gradient(
      circle at center,
      var(--mbk-dot) 1px,
      transparent 1px
    )
    0 0 / 22px 22px;
}

/* A live stage shows the frame of the selected viewport only. */
.mbk-live[data-viewport="mobile"] .mbk-frame-desktop {
  display: none;
}

.mbk-live[data-viewport="desktop"] .mbk-frame-mobile {
  display: none;
}

@media (max-width: 760px) {
  /* Stacked frames start at the top: centring a column taller than the
     stage would push its first frame above the scroll origin. A frame wider
     than the stage starts at its left edge for the same reason. */
  .mbk-stage {
    flex-direction: column;
    justify-content: flex-start;
    align-items: safe center;
  }
}

.mbk-component-stage {
  align-items: flex-start;
  overflow: auto;
}

/* With both viewports shown, a viewport that was not captured needs no
   switch. */
.mbk-live[data-viewport="both"] .mbk-preview-switch {
  display: none;
}
/* The frame of each viewport on a stage: the phone keeps its size, and the
   browser window grows up to its full width. */
.mbk-frame-wrap {
  min-width: 0;
}

.mbk-frame-mobile {
  flex: 0 0 auto;
}

.mbk-frame-desktop {
  flex: 0 1 1180px;
  min-width: 0;
}

.mbk-frame-desktop .browser-frame {
  width: 100%;
}

.mbk-frame-label {
  margin: 0 0 10px;
  color: var(--chrome-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* A light-only view under Dark keeps its light frame and names that fallback
   in its frame label. Screen frames and component canvases both carry the
   fallback mark. */
.mbk[data-mokly-color-scheme="dark"]
  .mbk-frame-wrap[data-color-scheme-fallback]
  .mbk-frame-scheme-note,
.mbk[data-mokly-color-scheme="dark"]
  .mbk-component-canvas[data-color-scheme-fallback]
  .mbk-frame-scheme-note {
  display: inline;
}

/* The screen of a user flow's step, below the step's heading. */
.mbk-flow-screen {
  margin-left: 44px;
  max-width: 1180px;
}

.mbk-flow-screen .browser-frame {
  height: 640px;
}

.mbk-flow-screen .browser-frame.is-expanded {
  height: auto;
}

/* A whole document fills the stage. */
.mbk-stage-embed {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 18px 24px;
  overflow: auto;
  background: radial-gradient(
      circle at center,
      var(--mbk-dot) 1px,
      transparent 1px
    )
    0 0 / 22px 22px;
}

.mbk-stage-embed iframe {
  flex: 1;
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--chrome-border);
  border-radius: 12px;
}

.mbk-frag {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 760px) {
  .mbk-frame-desktop {
    flex: 0 0 auto;
    width: 100%;
  }

  .mbk-flow-screen {
    margin-left: 0;
  }
}

/* A preview surface follows the scheme of the shown document, independently
   of the shell's appearance, so transparent content keeps its base. */
.mbk-frag {
  color-scheme: light;
  background: var(--mbk-screen-bg);
}

[data-preview-color-scheme="dark"] .mbk-frag {
  color-scheme: dark;
  background: var(--mbk-dark-screen-bg);
}

/* A component's canvas: the bordered frame of one viewport's render. */
.mbk-component-canvas {
  flex: none;
}

.mbk-component-canvas.mbk-frame-mobile {
  width: 390px;
}

.mbk-component-canvas.mbk-frame-desktop {
  width: 1024px;
}

.mbk-component-canvas iframe {
  width: 100%;
  height: 520px;
  display: block;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
}

/* The chrome of a comparison pane fills its column. */
.mb-pane-chrome:where(.mbk-reset) {
  width: 100%;
}
/* The bar of a browser window: its traffic lights, the address pill with its
   copy glyph and "URL copied" message, and the expand toggle. The bar of a
   static depiction is a picture of itself, so its address and its toggle
   keep their resting look: the pointer and the hover rules apply only to the
   bar that acts. */
.browser-bar:where(.mbk-reset) {
  position: relative;
  height: 40px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 14px;
  background: var(--mbk-browser-bar);
  border-bottom: 1px solid var(--chrome-border);
}

.lights:where(.mbk-reset) {
  display: inline-flex;
  gap: 6px;
}

.lights i:where(.mbk-reset) {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--chrome-border-strong);
}

.lights i:first-child:where(.mbk-reset) {
  background: var(--mbk-device-light-close);
}

.lights i:nth-child(2):where(.mbk-reset) {
  background: var(--mbk-device-light-minimise);
}

.lights i:nth-child(3):where(.mbk-reset) {
  background: var(--mbk-device-light-expand);
}

.address:where(.mbk-reset) {
  flex: 1;
  max-width: 520px;
  height: 26px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--chrome-border);
  border-radius: 6px;
  background: var(--chrome-surface);
  color: var(--chrome-muted);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.address-url:where(.mbk-reset) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-copy:where(.mbk-reset) {
  display: inline-flex;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 10px;
  color: var(--chrome-muted);
}

:where(.browser-bar:not([data-browser-static]))
  .address:hover:where(.mbk-reset) {
  background: var(--chrome-surface);
  color: var(--chrome-ink);
}

:where(.browser-bar:not([data-browser-static]))
  .address:hover
  .address-copy:where(.mbk-reset) {
  color: var(--chrome-accent);
}

.address-copied:where(.mbk-reset) {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--chrome-ink);
  color: var(--chrome-surface);
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  box-shadow: var(--chrome-shadow-sheet);
  animation: addressCopiedIn 0.18s ease-out;
}

.address-copied:where(.mbk-reset)::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: var(--chrome-ink);
}

@keyframes addressCopiedIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.browser-expand:where(.mbk-reset) {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--chrome-border);
  border-radius: 6px;
  background: var(--chrome-surface);
  color: var(--chrome-muted);
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease,
    border-color 0.12s ease;
}

:where(.browser-bar:not([data-browser-static]))
  .browser-expand:hover:where(.mbk-reset) {
  background: var(--chrome-surface);
  color: var(--chrome-accent);
  border-color: var(--chrome-border-strong);
}

/* The address and the toggle of a static depiction act on nothing. */
.browser-bar[data-browser-static]
  :is(.address, .browser-expand):where(.mbk-reset) {
  cursor: default;
}

.browser-expand .i-expand:where(.mbk-reset),
.browser-expand .i-collapse:where(.mbk-reset) {
  display: inline-flex;
}

.browser-expand .i-collapse:where(.mbk-reset) {
  display: none;
}
/* The phone: a dark bezel, the notch, the screen with its status band, and
   the home pill. */
.phone-frame:where(.mbk-reset) {
  position: relative;
  width: 390px;
  height: 844px;
  padding: 12px;
  border-radius: 46px;
  background: var(--mbk-device-body);
}

/* The decorative notch and home pill let pointers through to the document;
   the screen itself keeps pointer events, so links under the pill work. */
.phone-notch:where(.mbk-reset),
.phone-home:where(.mbk-reset) {
  pointer-events: none;
}

.phone-notch:where(.mbk-reset) {
  position: absolute;
  top: 22px;
  left: 50%;
  z-index: 2;
  width: 108px;
  height: 30px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--mbk-device-notch);
}

.phone-screen:where(.mbk-reset) {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
}

.phone-status:where(.mbk-reset) {
  position: relative;
  z-index: 1;
  flex: 0 0 44px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  height: 44px;
  padding: 14px 28px 0;
  font-size: 13.5px;
  font-weight: 600;
  font-feature-settings: "tnum";
}

.phone-status-icons:where(.mbk-reset) {
  display: flex;
  gap: 6px;
  align-items: center;
}

.phone-home:where(.mbk-reset) {
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 128px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  pointer-events: none;
}

/* The browser window: the bar of `../browser-bar`, then the viewport. An
   expanded window covers the page and marks its toggle. */
.browser-frame:where(.mbk-reset) {
  width: 100%;
  max-width: 1180px;
  height: 760px;
  overflow: hidden;
  border: 1px solid var(--chrome-border-strong);
  border-radius: 8px;
  background: var(--chrome-surface);
}

.browser-viewport:where(.mbk-reset) {
  height: calc(100% - 40px);
  overflow: hidden;
}

.browser-frame.is-expanded .browser-expand:where(.mbk-reset) {
  color: var(--chrome-accent);
  border-color: var(--chrome-accent);
}

.browser-frame.is-expanded .browser-expand .i-expand:where(.mbk-reset) {
  display: none;
}

.browser-frame.is-expanded .browser-expand .i-collapse:where(.mbk-reset) {
  display: inline-flex;
}

/* An expanded window covers the shell above a scrim. The shell marks its root
   while a window is expanded. */
.mbk.frame-expanded {
  overflow: hidden;
}

.mbk.frame-expanded::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  background: var(--chrome-scrim);
}

.browser-frame.is-expanded:where(.mbk-reset) {
  position: fixed;
  inset: 2.5vh 2.5vw;
  z-index: 950;
  width: auto;
  max-width: none;
  height: auto;
  box-shadow: var(--chrome-shadow);
}

@media (max-width: 760px) {
  .phone-frame:where(.mbk-reset) {
    width: min(390px, 100%);
    height: auto;
    aspect-ratio: 390 / 844;
  }

  .browser-frame:where(.mbk-reset) {
    width: 100%;
    min-width: 0;
    height: 560px;
  }
}

/* The screen follows the scheme of the shown document, independently of the
   shell's appearance. */
.phone-screen:where(.mbk-reset) {
  background: var(--mbk-screen-bg);
}

.phone-status:where(.mbk-reset) {
  color: var(--mbk-screen-ink);
}

.phone-home:where(.mbk-reset) {
  background: var(--mbk-device-home);
}

.browser-viewport:where(.mbk-reset) {
  background: var(--mbk-screen-bg);
}

[data-preview-color-scheme="dark"] .phone-screen:where(.mbk-reset) {
  background: var(--mbk-dark-screen-bg);
}

/* A dark screen would lose its edge in the near-black phone body. Its 1px
   inset hairline is an overlay above the fragment, so the document cannot
   cover it. */
[data-preview-color-scheme="dark"] .phone-screen:where(.mbk-reset)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px
    color-mix(
      in srgb,
      var(--mbk-dark-screen-ink) 12%,
      var(--mbk-dark-screen-bg)
    );
  pointer-events: none;
}

[data-preview-color-scheme="dark"] .phone-status:where(.mbk-reset) {
  color: var(--mbk-dark-screen-ink);
}

[data-preview-color-scheme="dark"] .phone-home:where(.mbk-reset) {
  background: color-mix(in srgb, var(--mbk-dark-screen-ink) 40%, transparent);
}

[data-preview-color-scheme="dark"] .browser-viewport:where(.mbk-reset) {
  background: var(--mbk-dark-screen-bg);
}

/* The content of the phone screen, a frame or a comparison viewport, fills
   the screen below the status band and keeps its rounded bottom corners. */
.phone-screen .mbk-frag {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  border-radius: 0 0 36px 36px;
}

.phone-screen > .mb-viewport:where(.mbk-reset) {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  border-radius: 0 0 36px 36px;
}
/* The stage of a user flow scrolls its column of steps. */
.mbk-flow {
  flex: 1;
  overflow: auto;
  padding: 28px 28px 40px;
}

.mbk-flow .flow-track {
  gap: 26px;
}

.mbk-flow .flow-step::before {
  top: 32px;
  bottom: -26px;
}

.mbk-flow .flow-step-head h3 {
  font-size: 16px;
}

/* The steps, joined by a rail from each number to the next. */
.flow-track:where(.mbk-reset) {
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.flow-step:where(.mbk-reset) {
  position: relative;
}

.flow-step:where(.mbk-reset)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: -34px;
  width: 2px;
  background: var(--chrome-border);
}

.flow-step:last-child:where(.mbk-reset)::before {
  display: none;
}

.flow-step-head:where(.mbk-reset) {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.flow-step-num:where(.mbk-reset) {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--mokly-accent);
  color: var(--mokly-accent-contrast);
  font-size: 13px;
  font-weight: 800;
}

.flow-step-head h3:where(.mbk-reset) {
  margin: 2px 0 4px;
  font-size: 18px;
  letter-spacing: -0.005em;
}

.flow-step-head p:where(.mbk-reset) {
  margin: 0;
  color: var(--chrome-muted);
  font-size: 14px;
  line-height: 1.55;
}

.flow-step-link:where(.mbk-reset) {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mokly-accent);
  text-decoration: none;
}

.flow-step-link:hover:where(.mbk-reset) {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .flow-step:where(.mbk-reset)::before {
    display: none;
  }
}
/* A version's pane: its label, then its chrome or its missing message. */
.mb-pane:where(.mbk-reset) {
  min-width: 0;
}

.mb-pane-label:where(.mbk-reset) {
  color: var(--chrome-muted);
  font-size: 12px;
  margin: 0 0 8px;
}

.mb-pane-missing:where(.mbk-reset) {
  display: grid;
  place-content: center;
  min-height: 240px;
  padding: 20px;
  border: 1px dashed var(--chrome-border-strong);
  border-radius: 12px;
  background: var(--chrome-surface);
  color: var(--chrome-muted);
  text-align: center;
}

/* The shared viewport is its chrome's only user-scrollable container.
   Scroll anchoring is off, so a spacer resize never moves its offset. */
.mb-viewport:where(.mbk-reset) {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  overflow-anchor: none;
}

/* A sticky box the size of the viewport holds the device-sized frames, and
   the spacer after it extends the range to the largest document. */
.mb-viewport-box:where(.mbk-reset) {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}

.mb-viewport-spacer:where(.mbk-reset) {
  pointer-events: none;
}

.mb-viewport-box > .mb-pane:where(.mbk-reset),
.mb-viewport .mb-pane-doc:where(.mbk-reset) {
  position: absolute;
  inset: 0;
}

.mb-viewport .mb-pane-doc:where(.mbk-reset) {
  overflow: hidden;
}

.mb-viewport .mb-pane-doc > .mbk-frag {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* Each version's surface keeps the scheme of its document, independently of
   the shell's appearance, under the canvas colour that the host paints. */
.mb-viewport:where(.mbk-reset) {
  color-scheme: light;
}

.mb-pane-doc:where(.mbk-reset) {
  background-color: var(--mbk-screen-bg);
  background-image: linear-gradient(
    var(--mbk-comparison-canvas, transparent),
    var(--mbk-comparison-canvas, transparent)
  );
}

[data-preview-color-scheme="dark"] .mb-viewport:where(.mbk-reset) {
  color-scheme: dark;
}

[data-preview-color-scheme="dark"] .mb-pane-doc:where(.mbk-reset) {
  background-color: var(--mbk-dark-screen-bg);
}

/* The bordered frame of a saved component variant. */
.mb-component-frame:where(.mbk-reset) {
  width: 100%;
  min-width: 390px;
  height: 520px;
  overflow: hidden;
  border: 1px solid var(--chrome-border);
  border-radius: 8px;
}
/* The comparison of an entry: the band, then Current or the comparison
   stage, which scrolls its viewport sections on the dotted surface. */
.mbk-diff-screen,
.mbk-current-screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.mbk-diff-screen [hidden] {
  display: none;
}

.mbk-diff-stage {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px;
  background: radial-gradient(circle, var(--mbk-dot) 1px, transparent 1px) 0 0 /
    22px 22px;
}

/* The empty state's action, inline in the comparison's failure line. */
.mbk-diff-stage p > .mbk-empty-link {
  margin: 0 0 0 4px;
}

.mbk-diff-view {
  margin-bottom: 24px;
}

/* Only the section's own heading: a static depiction draws each version's
   document in place, and that document keeps its own headings. */
.mbk-diff-view > h3 {
  margin: 0 0 12px;
  color: var(--chrome-ink-2);
  font-size: 12px;
  font-weight: 600;
}

/* Side by side shows two panes; a mobile section keeps each phone's width,
   and the stacked modes show one chrome. */
.mb-panes:where(.mbk-reset) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

.mbk-diff-mobile .mb-panes {
  grid-template-columns: repeat(2, 390px);
}

.mb-panes[data-compare-mode="overlay"]:where(.mbk-reset),
.mb-panes[data-compare-mode="difference"]:where(.mbk-reset) {
  grid-template-columns: minmax(0, 1fr);
}

.mbk-diff-mobile .mb-panes:not([data-compare-mode="side"]) {
  grid-template-columns: 390px;
}

.mb-panes[data-compare-mode="overlay"] .mb-pane--after:where(.mbk-reset) {
  opacity: 0.5;
}

.mb-panes[data-compare-mode="difference"] .mb-pane--after:where(.mbk-reset) {
  mix-blend-mode: difference;
}

@media (width < 56.25rem) {
  /* The compact modes of the comparison toolbar, as buttons, links, or inert
     text. The toolbar leaves the padding and type of its modes to the
     segmented control, so the comparison narrows them here. */
  .mbk-diff-toolbar .mbk-seg :is(button, a, span) {
    flex: 1;
    padding: 6px;
    white-space: nowrap;
    font-size: 11px;
  }

  .mbk-diff-stage {
    padding: 16px;
  }

  .mb-panes[data-compare-mode="side"]:where(.mbk-reset),
  .mbk-diff-mobile .mb-panes {
    grid-template-columns: minmax(0, 1fr);
  }

  .mbk-diff-mobile .mb-panes:not([data-compare-mode="side"]) {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* The bar of a component's saved variants, which hides while it holds only
   its hidden status. The picture of a variant in a static depiction keeps the
   resting look of its link, and only a link takes the hover look. */
.mbk-selection-bar {
  display: flex;
  align-items: center;
  flex: none;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 24px;
  background: var(--chrome-surface);
  border-bottom: 1px solid var(--chrome-border);
  font-size: 12px;
}

.mbk-selection-bar:has(> [hidden]:only-child) {
  display: none;
}

.mbk-selection-bar > span:first-child {
  color: var(--chrome-muted);
  margin-right: 10px;
}

.mbk-selection-bar a,
.mbk-selection-bar > .mbk-variant-option {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--chrome-ink-2);
  padding: 5px 10px;
  text-decoration: none;
}

.mbk-selection-bar a:hover {
  background: var(--chrome-bg);
}

.mbk-selection-bar a:focus-visible {
  outline: 2px solid var(--mokly-accent);
  outline-offset: 2px;
}

.mbk-selection-bar a[aria-current="page"],
.mbk-selection-bar > .mbk-variant-option[aria-current="page"] {
  background: var(--mokly-accent-soft);
  border-color: var(--mokly-accent);
  color: var(--mokly-accent);
  font-weight: 600;
}

.mbk-variant-status {
  color: var(--chrome-muted);
}

@media (width < 56.25rem) {
  .mbk-selection-bar {
    padding: 8px 12px;
  }
}
/* The loading and missing states of a previous version, centred on its
   stage. */
.mbk-preview-state {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.mbk-preview-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--chrome-ink-2);
  font-size: 13px;
}

.mbk-preview-note {
  margin: 0;
  padding: 32px 0;
  max-width: 24rem;
  color: var(--chrome-ink-2);
  font-size: 13px;
  text-align: center;
  text-wrap: balance;
}

.mbk-preview-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--chrome-border);
  border-top-color: var(--chrome-muted);
  border-radius: 50%;
  animation: mbk-preview-spin 0.8s linear infinite;
}

@keyframes mbk-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mbk-preview-spinner {
    animation: none;
  }
}
/* The quiet band above a stage that names what it holds, such as "Showing
   previous version". */
.mbk-previous {
  flex-shrink: 0;
  margin: 0;
  padding: 8px 24px;
  border-bottom: 1px solid var(--chrome-border);
  background: var(--chrome-surface);
  color: var(--chrome-muted);
  font-size: 11.5px;
}

/* Under Dark, a band that keeps a light document names the fallback: the
   previous-version label and the Light-only band above a current document. */
.mbk[data-mokly-color-scheme="dark"]
  .mbk-previous[data-color-scheme-fallback]
  .mbk-frame-scheme-note {
  display: inline;
}

/* The stage host of a previous version fills the preview, and its states
   fill the stage. */
.mbk-preview {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.mbk-preview > .mbk-stage > .mbk-empty,
.mbk-preview > .mbk-stage > .mbk-preview-state {
  align-self: stretch;
}

.mbk-preview > .mbk-stage.mbk-live > .mbk-preview-state {
  flex: 0 1 auto;
  align-self: center;
}

.mbk-preview button.mbk-empty-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--chrome-accent);
  cursor: pointer;
}

@media (max-width: 760px) {
  .mbk-previous {
    padding: 8px 16px;
  }
}
/* A label of a highlighted instance: a small accent button over the preview,
   which takes the pointer although its layer lets it through. */
.mbk-highlight-label {
  position: absolute;
  pointer-events: auto;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 0;
  border-radius: 4px;
  background: var(--mbk-accent-deep);
  color: var(--_mokly-private-on-accent-deep);
  padding: 3px 7px;
  font: 11px/13px var(--sans);
}

/* The button, and the link of a static depiction, show the pointer. The
   picture of a static depiction acts on nothing, so it keeps the arrow. */
.mbk-highlight-label:is(a, button) {
  cursor: pointer;
}

/* The link of a static depiction keeps the button's look. */
a.mbk-highlight-label {
  text-decoration: none;
}
/* The shell's layer over a frame's visible box. The mask fills it. */
.mbk-highlight-layer {
  position: fixed;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.mbk-highlight-layer svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The mask keeps the scrim where it is white and cuts it out where it is
   black; these are mask values, not colours that the reader sees. */
.mbk-highlight-kept {
  fill: white;
}

.mbk-highlight-cutout {
  fill: black;
}

.mbk-highlight-scrim {
  fill: var(--mbk-highlight-scrim);
}

.mbk-highlight-outline {
  fill: none;
  stroke: var(--mbk-highlight-edge);
  stroke-width: 1.5;
}
/* The shell root: the top bar above the body, in the shell's type. */
.mbk {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--chrome-bg);
  color: var(--chrome-ink);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* The skip link stays above the root until it takes keyboard focus. */
.mbk-skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  z-index: 20;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--chrome-ink);
  color: var(--_mokly-private-on-ink);
  font-weight: 600;
  text-decoration: none;
}

.mbk-skip-link:focus-visible {
  top: 8px;
}

.mbk-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* The route status speaks to a screen reader only. */
.mbk-route-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* While the reader drags the navigation separator, the drag marks the shell
   root, and every element of the shell follows the drag. Only the package's
   own elements carry the reset class, so host slot content keeps its own
   cursor and frames. */
.mbk.mbk-nav-resizing {
  cursor: col-resize;
  user-select: none;
}

.mbk.mbk-nav-resizing .mbk-reset {
  cursor: col-resize !important;
}

.mbk.mbk-nav-resizing iframe.mbk-reset {
  pointer-events: none;
}

/* The main region, which holds the routed view. */
.mbk-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

/* A workspace's view controls hold the scheme toggle, so the top bar hides
   its scheme switch while a workspace shows. */
.mbk:has(.mbk-workspace) .mbk-topbar [data-mokly-schemeswitch] {
  display: none;
}
/* The workspace fills the main region: the header and the variant bar above
   the panes, and the preview pane beside the inspector. */
.mbk-workspace {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.mbk-workspace [hidden] {
  display: none !important;
}

.mbk-workspace .mbk-screen-head {
  align-items: center;
}

.mbk-workspace-panes {
  display: flex;
  flex: 1;
  flex-direction: column;
  position: relative;
  min-height: 0;
  min-width: 0;
}

.mbk-preview-pane {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 100px;
  min-width: 0;
  overflow: hidden;
}

.mbk-preview-busy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

/* The stage of a workspace shows the frames of the chosen viewport only. */
.mbk-workspace [data-mokly-stage][data-viewport="mobile"] .mbk-frame-desktop,
.mbk-workspace [data-mokly-stage][data-viewport="desktop"] .mbk-frame-mobile {
  display: none;
}

@media (width < 56.25rem) {
  .mbk-workspace .mbk-screen-head {
    gap: 8px;
    padding: 12px;
  }

  .mbk-workspace-panes {
    padding-bottom: 46px;
  }

  .mbk-workspace .mbk-previous {
    padding: 8px 12px;
  }
}
/* The embedded root and the containers of its host slots. The root fills the
   height that its host gives, and it clips the shell. These rules place each
   slot and never reach into the host content that it holds. */
.mokly-viewer {
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 0;
  color: var(--chrome-ink);
  font-family: var(--sans);
  line-height: 1.5;
}

.mbk.mokly-viewer {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.mokly-viewer > .mbk-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mokly-viewer .mokly-top-host {
  container: mokly-top-host / inline-size;
  position: relative;
  display: flex;
  flex: none;
  min-width: 0;
  height: 48px;
  background: var(--chrome-surface);
}

.mokly-viewer .mokly-top-host .mbk-topbar {
  flex: 1;
  min-width: 0;
}

.mokly-viewer .mokly-rail-host {
  display: flex;
  flex-direction: column;
  flex: none;
  min-height: 0;
}

.mokly-viewer .mokly-rail-host .mbk-nav {
  flex: 1;
  min-height: 0;
}

.mokly-viewer .mokly-stage-host {
  position: relative;
  flex: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
}

.mokly-viewer .mokly-stage-host .mbk-main {
  flex: 1;
}

.mokly-viewer [data-mokly-slot]:empty {
  display: none;
}

.mokly-viewer [data-mokly-slot="stageOverlay"] {
  position: absolute;
  z-index: 10;
  overflow: hidden;
}

.mokly-viewer [data-mokly-marker-layer],
.mokly-viewer [data-mokly-label-layer] {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 11;
}

.mokly-viewer [data-mokly-slot="markers"]:empty {
  display: block;
}

.mokly-viewer.frame-expanded
  :is([data-mokly-marker-layer], [data-mokly-label-layer]) {
  z-index: 952;
}

.mokly-viewer [data-mokly-slot="sidePanel"] {
  flex: none;
  overflow: auto;
  min-height: 0;
}

.mokly-viewer [data-mokly-slot="emptyState"] {
  position: absolute;
  inset: 0;
  background: var(--chrome-bg);
  overflow: auto;
}

.mokly-viewer [data-mokly-slot][hidden] {
  display: none;
}

.mokly-viewer [data-mokly-slot="topBarStart"],
.mokly-viewer [data-mokly-slot="topBarEnd"] {
  display: flex;
  flex: none;
  align-items: center;
}

@media (width < 56.25rem) {
  .mokly-viewer .mokly-rail-host {
    width: 0;
  }
}

/* The compact top bar switches at the viewer contract's container width of
   560px. The query uses pixels, so the host page's root font size cannot
   move it. */
@container mokly-top-host (max-width: 560px) {
  .mokly-top-host > .mbk-topbar {
    gap: 8px;
    padding: 0 8px;
  }

  .mokly-top-host > .mbk-topbar .mbk-brand,
  .mokly-top-host > .mbk-topbar .mbk-search,
  .mokly-top-host > .mbk-topbar .mbk-search-close {
    display: none;
  }

  .mokly-top-host > .mbk-topbar .mbk-search-toggle {
    display: inline-flex;
  }

  .mokly-top-host > .mbk-topbar[data-compact-search="open"] {
    position: absolute;
    inset: 0;
    z-index: 12;
    width: auto;
    background: var(--chrome-surface);
  }

  .mokly-top-host
    > .mbk-topbar[data-compact-search="open"]
    > :not(.mbk-search, .mbk-search-close) {
    display: none;
  }

  .mokly-top-host > .mbk-topbar[data-compact-search="open"] .mbk-search {
    display: flex;
    max-width: none;
  }

  .mokly-top-host > .mbk-topbar[data-compact-search="open"] .mbk-search-close {
    display: inline-flex;
  }
}
