/* Moey docs — styles for the documentation site only (not part of Moey) */
  /* Docs-only styles (not part of Moey). Unlayered, so they sit above the framework. */
  .docs-header {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; gap: 1rem;
    height: 3.75rem; padding-inline: 1.25rem;
    background: color-mix(in oklch, var(--mo-bg-body) 82%, transparent);
    backdrop-filter: blur(12px) saturate(1.4);
    border-bottom: 1px solid var(--mo-border-color);
  }
  .docs-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.125rem; color: var(--mo-fg-body); text-decoration: none; }
  .moey-tile { display: inline-grid; flex-shrink: 0; place-items: center; width: 2rem; height: 2rem; color: var(--mo-bg-body); background: var(--mo-fg-body); border-radius: 22%; }
  .moey-tile > .moey-mark { width: 72%; height: auto; margin-top: 3%; }   /* the cat-m, cut out of the tile — it inverts with the theme */
  .docs-version .dropdown-toggle { font-variant-numeric: tabular-nums; }
  .docs-spacer { flex: 1; }
  .docs-btn { display: inline-flex; align-items: center; gap: .375rem; height: 2.25rem; padding: 0 .75rem; font-size: .875rem; font-weight: 500; color: var(--mo-fg-2); background: var(--mo-bg-2); border: 0; border-radius: var(--mo-radius-control); }
  .docs-btn:hover { color: var(--mo-fg-body); background: var(--mo-bg-2); }
  .docs-btn[aria-pressed="true"] { color: var(--mo-default-fg); background: var(--mo-default-bg-subtle); border-color: var(--mo-default-border); }
  .docs-menu-btn { display: none; }

  .docs-layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); max-width: 90rem; margin-inline: auto; }
  .docs-sidebar { position: sticky; top: 3.75rem; height: calc(100dvh - 3.75rem); overflow-y: auto; padding: 1.25rem .75rem 3rem; border-inline-end: 1px solid var(--mo-border-color); font-size: .875rem; }
  .docs-sidebar h6 { display: flex; align-items: center; gap: .5rem; margin: 1.25rem .75rem .375rem; font-size: .8125rem; }
  .docs-sidebar h6:first-child { margin-top: 0; }
  .docs-sidebar h6 i { width: .625rem; height: .625rem; border-radius: 3px; }
  .docs-sidebar .sub { margin: .75rem .75rem .25rem 1.875rem; font-size: .75rem; font-weight: 600; color: var(--mo-fg-body); }
  .docs-sidebar ul { list-style: none; padding: 0; margin: 0; }
  .docs-sidebar a { display: flex; justify-content: space-between; align-items: center; padding: .3125rem .75rem .3125rem 1.875rem; color: var(--mo-fg-2); text-decoration: none; border-radius: var(--mo-radius-2); }
  .docs-sidebar a:hover { color: var(--mo-fg-body); background: var(--mo-bg-2); }
  /* Active page: a wash of the brand color (tuxedo black by default) over whatever is behind it */
  .docs-sidebar a.active { color: var(--mo-default-fg-emphasis); background: color-mix(in oklab, var(--mo-default-base) 9%, transparent); font-weight: 600; }
  :root[data-mo-theme="dark"] .docs-sidebar a.active { background: color-mix(in oklab, var(--mo-default-base) 16%, transparent); }
  @media (prefers-color-scheme: dark) { :root:not([data-mo-theme="light"]) .docs-sidebar a.active { background: color-mix(in oklab, var(--mo-default-base) 16%, transparent); } }
  .docs-sidebar a.soon { color: var(--mo-fg-3); }
  .docs-sidebar a.soon::after { content: "soon"; font-size: .625rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }

  .docs-main { padding: 2.5rem clamp(1rem, 4vw, 3.5rem) 6rem; min-width: 0; background: light-dark(oklch(98.3% .003 258), var(--mo-paper)); }
  .docs-main [id] { scroll-margin-top: 5rem; }
  .docs-main > section { max-width: 52rem; scroll-margin-top: 5rem; padding-bottom: 3rem; margin-bottom: 3rem; border-bottom: 1px solid var(--mo-border-color); }
  .docs-main > section:last-child { border-bottom: 0; }
  .docs-kicker { font-size: .8125rem; font-weight: 600; color: var(--mo-default-fg); margin-bottom: .25rem; }
  .docs-lead { font-size: 1.125rem; color: var(--mo-fg-2); }
  .docs-main > section > h3 { margin-top: 2rem; }

  .docs-code { margin: 0 0 1.5rem; padding: 1rem 1.25rem; font-size: .8125rem; line-height: 1.6; color: var(--mo-fg-2); background: var(--mo-bg-surface); border-radius: var(--mo-radius-card); }
  /* The demo box sits in the components layer, so utility classes on it (p-0, flex, gap-4 …) win, as on any component */
  @layer components {
    .docs-demo { min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; padding: 1.5rem; margin: 1rem 0 0; background: var(--mo-bg-surface); border-radius: var(--mo-radius-card) var(--mo-radius-card) 0 0; }
    .docs-demo:not(:has(+ .docs-code)) { margin-bottom: 1.5rem; border-radius: var(--mo-radius-card); }
    /* Phone frames: live 360px pages (docs.js) */
    .docs-phones { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1.5rem 1rem; }
    .docs-phone { display: grid; gap: .5rem; margin: 0; }
    .docs-phone > iframe { display: block; width: 100%; max-width: 22.5rem; height: 32rem; margin-inline: auto; background: var(--mo-bg-body); border: 0; border-radius: 1.25rem; box-shadow: 0 0 0 1px var(--mo-border-color), 0 0 0 6px var(--mo-bg-surface), 0 0 0 7px var(--mo-border-color); }
    .docs-phone > figcaption { font-size: .8125rem; color: var(--mo-fg-3); text-align: center; }
    .docs-phone > figcaption code { font-size: .75rem; }
    .docs-demo-canvas { background: var(--mo-bg-body); box-shadow: inset 0 0 0 1px var(--mo-border-color); }
    @media (width < 360px) { .docs-demo { padding: 1rem; } }
    .docs-table { width: 100%; font-size: .875rem; margin-bottom: 1.5rem; }
  }
  .docs-demo + .docs-code { border-top: 1px solid var(--mo-border-color); border-radius: 0 0 var(--mo-radius-card) var(--mo-radius-card); }
  /* A page-colored canvas for demos of surfaces (cards): framed so the demo area stays visible */
  .docs-demo-canvas + .docs-code { border-top: 0; box-shadow: inset 1px 0 0 var(--mo-border-color), inset -1px 0 0 var(--mo-border-color), inset 0 -1px 0 var(--mo-border-color); }

  .swatch-row { display: grid; min-width: 34rem; grid-template-columns: 4.5rem repeat(12, minmax(0, 1fr)); gap: .25rem; align-items: center; margin-bottom: .25rem; font-size: .75rem; }
  .swatch-row b { font-weight: 600; text-transform: capitalize; }
  .swatch { height: 2.25rem; border-radius: var(--mo-radius-2); box-shadow: inset 0 0 0 1px oklch(0% 0 0 / .06); }
  .swatch-head { color: var(--mo-fg-3); text-align: center; }

  .theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
  .theme-card { border-radius: var(--mo-radius-card); overflow: hidden; background: var(--mo-theme-bg-subtle); }
  .theme-card header { padding: .75rem 1rem; font-weight: 600; color: var(--mo-theme-contrast); background: var(--mo-theme-bg); }
  .theme-card dl { display: grid; grid-template-columns: auto 1fr; gap: .375rem .75rem; margin: 0; padding: 1rem; font-size: .75rem; align-items: center; }
  .theme-card dt { font-weight: 500; color: var(--mo-theme-fg-emphasis); font-family: var(--mo-font-mono); }
  .theme-card dd { margin: 0; height: 1.125rem; border-radius: var(--mo-radius-1); box-shadow: inset 0 0 0 1px oklch(0% 0 0 / .08); }
  .chip-demo { display: inline-flex; align-items: center; padding: .375rem .875rem; font-size: .875rem; font-weight: 500; border-radius: var(--mo-radius-pill); color: var(--mo-theme-fg-emphasis); background: var(--mo-theme-bg-subtle); }

  .mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
  .mode-panel { padding: 1.25rem; border-radius: var(--mo-radius-card); }
  .mode-panel p:last-child { margin-bottom: 0; }

  /* In the components layer (not unlayered like the rest of this file), so utility classes on a demo box
     (p-4, w-1/2 …) win over it, exactly as they would on a real component */
  @layer components {
  .cell { padding: .625rem .5rem; font-family: var(--mo-font-mono); font-size: .75rem; text-align: center; color: var(--mo-theme-fg-emphasis); background: var(--mo-theme-bg-subtle); border-radius: var(--mo-radius-control); overflow-wrap: anywhere; }
  }
  .docs-table th, .docs-table td { padding: .5rem .75rem; text-align: start; border-bottom: 1px solid var(--mo-border-color); }
  .docs-table th { color: var(--mo-fg-2); font-size: .8125rem; }
  .docs-scroll { position: relative; overflow-x: auto; }

  @media (width < 900px) {
    .docs-layout { grid-template-columns: minmax(0, 1fr); }
    .docs-header { gap: .5rem; padding-inline: 1rem; }
    .docs-modes .btn span { display: none; }
    .docs-menu-btn { display: inline-flex; }
    .docs-sidebar { display: none; position: fixed; inset: 3.75rem 0 0; z-index: 9; height: auto; background: var(--mo-bg-body); border: 0; }
    .docs-sidebar.open { display: block; }
    .docs-version { display: none; }
    .swatch-row { grid-template-columns: 3.25rem repeat(12, minmax(0, 1fr)); gap: 2px; }
    .swatch-row b { font-size: .625rem; }
    .swatch-head { font-size: .5rem; }
    .swatch { height: 1.75rem; border-radius: 3px; }
  }

/* "On this page" — the h3 sections of a page */
.docs-toc { display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; margin: -.5rem 0 1.75rem; font-size: .8125rem; }
.docs-toc-title { margin-inline-end: .25rem; font-weight: 600; color: var(--mo-fg-3); }
.docs-toc a { padding: .1875rem .5rem; color: var(--mo-fg-2); text-decoration: none; background: color-mix(in oklab, var(--mo-fg-body) 5%, transparent); border-radius: var(--mo-radius-pill); }
.docs-toc a:hover { color: var(--mo-fg-body); background: color-mix(in oklab, var(--mo-fg-body) 9%, transparent); }

/* Previous / next page */
.docs-pager { display: flex; gap: 1rem; justify-content: space-between; max-width: 52rem; margin-top: 1rem; }
.docs-pager a { display: flex; flex-direction: column; gap: .125rem; min-width: 10rem; padding: .875rem 1.125rem; font-weight: 600; color: var(--mo-fg-body); text-decoration: none; background: var(--mo-bg-surface); border-radius: var(--mo-radius-card); }
.docs-pager a:hover { color: var(--mo-theme-fg); }
/* The footer: who made it, the version */
.docs-footer { display: flex; flex-wrap: wrap; gap: .375rem 1.5rem; justify-content: space-between; max-width: 52rem; padding-top: 1.25rem; margin-top: 3rem; font-size: .8125rem; color: var(--mo-fg-3); border-top: 1px solid var(--mo-border-color); }
.docs-footer strong { font-weight: 600; color: var(--mo-fg-2); }
.docs-footer a { color: var(--mo-fg-2); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentcolor 35%, transparent); text-underline-offset: .2em; }
.docs-footer a:hover { color: var(--mo-fg-body); text-decoration-color: currentcolor; }
.docs-pager a > span { font-size: .75rem; font-weight: 500; color: var(--mo-fg-3); }
.docs-pager-next { margin-inline-start: auto; text-align: end; }
@media (width < 420px) { .docs-pager a { flex: 1 1 0; min-width: 0; padding-inline: .875rem; overflow-wrap: anywhere; } }

  /* Search button (opens the Ctrl+K palette) */
  .docs-search-btn {
    display: inline-flex; align-items: center; gap: .5rem; width: 15rem; height: 2.25rem; padding: 0 .5rem 0 .75rem;
    font: inherit; font-size: .875rem; color: var(--mo-fg-3); background: var(--mo-bg-surface); border: 0; border-radius: var(--mo-radius-control); cursor: pointer;
  }
  .docs-search-btn:hover { color: var(--mo-fg-2); }
  .docs-search-btn span { flex: 1; text-align: start; }
  .docs-search-btn kbd { font-size: .6875rem; }
  @media (width < 900px) {
    .docs-search-btn { width: auto; padding: 0 .625rem; }
    .docs-search-btn span, .docs-search-btn kbd { display: none; }
  }

  .docs-icons-link { margin-inline-start: .5rem; text-decoration: none; }
  @media (width < 576px) { .docs-icons-link { display: none !important; } .docs-header { gap: .375rem; } }
  @media (width < 380px) { .docs-menu-btn span { display: none; } .docs-header { gap: .25rem; padding-inline: .75rem; } .docs-modes .btn { --mo-btn-padding-x: .5rem; } }

/* Theme page: every color × every strength */
.surface-gallery { display: grid; gap: 1.25rem; }
.sg-name { margin-bottom: .375rem; font-size: .8125rem; font-weight: 600; color: var(--mo-fg-2); text-transform: capitalize; }
.sg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
@media (width >= 640px) { .sg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (width >= 1280px) { .sg-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.sg-cell { display: grid; gap: .375rem; padding: .625rem .75rem .75rem; font-size: .8125rem; border-radius: var(--mo-radius-control); }
.sg-head { display: flex; align-items: center; justify-content: space-between; gap: .25rem; }
.sg-head .badge { font-size: .6875rem; }
.sg-muted { color: var(--mo-fg-3); }
.sg-row { display: flex; align-items: center; gap: .5rem; }
.sg-row .btn { margin-inline-start: auto; }
.sg-row .form-check { min-height: 0; }
.swatch-default { display: block; font-size: .6875rem; font-weight: 500; color: var(--mo-default-fg); }
/* The smallest phones (Galaxy Fold 280px): the logo alone, tighter header */
@media (width < 360px) {
  .docs-wordmark { display: none; }
  .docs-header { gap: .25rem; padding-inline: .5rem; }
  .docs-modes .btn { --mo-btn-padding-x: .4375rem; }
}

  /* Sidebar demos: a whole app shell in a 32rem frame (the sidebar is told the frame's height) */
  .docs-app { --mo-app-height: 32rem; --mo-sidebar-height: 32rem; height: 32rem; overflow: hidden; background: var(--mo-bg-body); }   /* a real page: the page color behind the sidebar and cards */
  @media (width < 1024px) { .docs-desktop-only { display: none !important; } }

  /* Docs home: the showcase */
  .docs-showcase { display: grid; gap: 2rem; padding-block: 1rem 0; }
  .docs-mosaic { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; padding: clamp(1rem, .5rem + 2vw, 1.75rem); background: var(--mo-bg-2); border-radius: var(--mo-radius-dialog); }
  @media (width >= 768px) { .docs-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* inline-style cleanup: carousel, alignment, input-group, background, position, hover-reveal, otp-input, dropzone, scrollbars, gutters, chips, validation, range, containers, app-shell */
/* A one-column demo of form-field width (the frame itself stays full width) */
.docs-demo-narrow { grid-template-columns: minmax(0, 28rem); }
/* Carousel demo: placeholder slides and product pictures (the code sample shows an <img>) */
.docs-slide { aspect-ratio: 16 / 6; min-height: 12rem; }
.docs-slide-indigo { background: linear-gradient(120deg, var(--mo-indigo-500), var(--mo-purple-400)); }
.docs-slide-teal { background: linear-gradient(120deg, var(--mo-teal-500), var(--mo-green-400)); }
.docs-slide-orange { background: linear-gradient(120deg, var(--mo-orange-500), var(--mo-pink-400)); }
.docs-slide-blue { background: linear-gradient(120deg, var(--mo-blue-500), var(--mo-cyan-400)); }
.docs-thumb-blue { background: linear-gradient(135deg, var(--mo-blue-100), var(--mo-blue-300)); }
.docs-thumb-amber { background: linear-gradient(135deg, var(--mo-amber-100), var(--mo-amber-300)); }
.docs-thumb-green { background: linear-gradient(135deg, var(--mo-green-100), var(--mo-green-300)); }
.docs-thumb-purple { background: linear-gradient(135deg, var(--mo-purple-100), var(--mo-purple-300)); }
.docs-thumb-pink { background: linear-gradient(135deg, var(--mo-pink-100), var(--mo-pink-300)); }
.docs-thumb-teal { background: linear-gradient(135deg, var(--mo-teal-100), var(--mo-teal-300)); }
.docs-thumb-orange { background: linear-gradient(135deg, var(--mo-orange-100), var(--mo-orange-300)); }
.docs-thumb-indigo { background: linear-gradient(135deg, var(--mo-indigo-100), var(--mo-indigo-300)); }

/* inline-style cleanup: theme card css-grid datepicker navbar form-layout nav-overflow tooltip reboot form-control button tree-view notification-center container-queries */
.docs-phone-dialog { --mo-dialog-width: calc(375px + 3rem); }   /* navbar page: the phone preview dialog fits a 375px frame */
.docs-phone-frame { width: 375px; height: min(640px, 70dvh); border: 0; }   /* navbar page: the phone-width preview iframe in its dialog */

/* inline-style cleanup: icons sheet skeleton floating-labels customize-components media-object text-color menu text popover collapse alert table list-group color-picker */
.docs-demo-form { grid-template-columns: minmax(0, 30rem); }
.docs-photo { width: 4.5rem; height: 4.5rem; }                     /* media-object: stand-in for a product photo */
.docs-photo-blue { background: linear-gradient(135deg, var(--mo-blue-200), var(--mo-blue-400)); }
.docs-photo-amber { background: linear-gradient(135deg, var(--mo-amber-200), var(--mo-amber-400)); }
.docs-photo-green { background: linear-gradient(135deg, var(--mo-green-200), var(--mo-green-400)); }

/* inline-style cleanup: color scrollspy progress shapes combobox interactions rating form-adorn spinner password-strength close-button z-index select forms color-modes */
.docs-below-header { top: 3.75rem; }                                /* scrollspy: the page's reading bar sits under the docs header */
.docs-demo-w24 { grid-template-columns: minmax(0, 24rem); }          /* combobox: one-column demo of field width */
.docs-demo-w26 { grid-template-columns: minmax(0, 26rem); }          /* password-strength: same */
/* color page: the "Using shades" tags render the .tag CSS from the code sample, one per hue */
.docs-shade { background: light-dark(var(--docs-s100), var(--docs-s900)); color: light-dark(var(--docs-s800), var(--docs-s200)); }
.docs-shade > .mi { color: var(--docs-s500); }
.docs-shade-blue { --docs-s100: var(--mo-blue-100); --docs-s200: var(--mo-blue-200); --docs-s500: var(--mo-blue-500); --docs-s800: var(--mo-blue-800); --docs-s900: var(--mo-blue-900); }
.docs-shade-green { --docs-s100: var(--mo-green-100); --docs-s200: var(--mo-green-200); --docs-s500: var(--mo-green-500); --docs-s800: var(--mo-green-800); --docs-s900: var(--mo-green-900); }
.docs-shade-amber { --docs-s100: var(--mo-amber-100); --docs-s200: var(--mo-amber-200); --docs-s500: var(--mo-amber-500); --docs-s800: var(--mo-amber-800); --docs-s900: var(--mo-amber-900); }
.docs-shade-red { --docs-s100: var(--mo-red-100); --docs-s200: var(--mo-red-200); --docs-s500: var(--mo-red-500); --docs-s800: var(--mo-red-800); --docs-s900: var(--mo-red-900); }
.docs-shade-purple { --docs-s100: var(--mo-purple-100); --docs-s200: var(--mo-purple-200); --docs-s500: var(--mo-purple-500); --docs-s800: var(--mo-purple-800); --docs-s900: var(--mo-purple-900); }
/* color page: the color-mix() transparency swatches */
.docs-mix-10 { background: color-mix(in oklab, var(--mo-purple-500) 10%, transparent); }
.docs-mix-25 { background: color-mix(in oklab, var(--mo-purple-500) 25%, transparent); }
.docs-mix-50 { background: color-mix(in oklab, var(--mo-purple-500) 50%, transparent); }
.docs-mix-75 { background: color-mix(in oklab, var(--mo-purple-500) 75%, transparent); }
.docs-mix-100 { background: color-mix(in oklab, var(--mo-purple-500) 100%, transparent); }
