/* ============================================================================
   f(x) → NATURE DS — Site chrome
   PAGE SHELL ONLY: header, sidebar nav, hero, footer, off-canvas + toast region.
   Component styling lives in components/*.css. Consumes ONLY tokens.css values.
   Brutalist / technical: sharp corners, 1px hairlines, mono labels, grid motifs.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   0 · Skip link + safety net for the shared copy button
   --------------------------------------------------------------------------- */
.fd-skip-link {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-tooltip);
  padding: var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  border: var(--border-width) solid var(--accent);
  transform: translateY(-200%);
  transition: transform var(--duration-fast) var(--ease-out);
}
.fd-skip-link:focus-visible { transform: translateY(0); }

/* Define .fd-copy-btn here too so chrome never depends on bundle load order.
   Identical, token-based — safe even though every bundle also defines it. */
.fd-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--foreground-subtle);
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-none);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}
.fd-copy-btn:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.fd-copy-btn.is-copied {
  color: var(--accent-text);
  border-color: var(--accent-border);
}

/* ---------------------------------------------------------------------------
   1 · Header — sticky top bar with hairline base + backdrop blur
   --------------------------------------------------------------------------- */
.fd-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: var(--border-width) solid var(--border);
  background: color-mix(in srgb, var(--background) 78%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
.fd-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-inline: var(--space-6);
}
@media (max-width: 768px) {
  .fd-header__inner { padding-inline: var(--space-4); }
}

/* --- Brand lockup --- */
.fd-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}
.fd-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--on-accent);
  background: var(--accent);
  border: var(--border-width) solid var(--accent);
  flex: none;
}
.fd-brand__mark svg { width: 16px; height: 16px; }
.fd-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}
.fd-brand__wordmark {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--foreground-subtle);
}
.fd-brand__name {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: 2px;
}
.fd-brand__ds {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: var(--text-md);
  letter-spacing: var(--tracking-tight);
  text-transform: none;
  white-space: nowrap;
  color: var(--foreground);
}
.fd-brand__tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-text);
  border: var(--border-width) solid var(--accent-border);
  padding: 1px var(--space-1);
}
@media (max-width: 520px) {
  .fd-brand__wordmark { display: none; }
}

/* --- Inline header nav (optional, hidden on small) --- */
.fd-header__nav {
  display: none;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-6);
}
@media (min-width: 1180px) {
  .fd-header__nav { display: inline-flex; }
}
.fd-header__nav-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-subtle);
  padding: var(--space-1) var(--space-2);
  border: var(--border-width) solid transparent;
}
.fd-header__nav-link:hover {
  color: var(--foreground);
  border-color: var(--border);
}

.fd-header__spacer { flex: 1 1 auto; }

.fd-header__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* --- Command-palette trigger — mono "SEARCH …" pill + ⌘K kbd ----------- */
.fd-cmdtrigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  height: 34px;
  margin-left: var(--space-4);
  padding: 0 var(--space-2) 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-subtle);
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-none);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}
.fd-cmdtrigger:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.fd-cmdtrigger__icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--foreground-faint);
  transition: color var(--duration-fast) var(--ease-out);
}
.fd-cmdtrigger:hover .fd-cmdtrigger__icon { color: var(--accent-text); }
.fd-cmdtrigger__text {
  min-width: 7ch;
  text-align: left;
  white-space: nowrap;
}
/* the ⌘K hint reuses the .fd-kbd primitive; just tighten it inside the pill */
.fd-cmdtrigger__kbd {
  flex: none;
  pointer-events: none;
}
/* collapse to an icon-only square below the sidebar breakpoint */
@media (max-width: 1000px) {
  .fd-cmdtrigger { margin-left: var(--space-2); padding-inline: 0; width: 34px; justify-content: center; gap: 0; }
  .fd-cmdtrigger__text,
  .fd-cmdtrigger__kbd { display: none; }
}

/* --- Ghost / icon header buttons --- */
.fd-chrome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 34px;
  padding-inline: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-muted);
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-none);
  transition: color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}
.fd-chrome-btn svg { width: 16px; height: 16px; }
.fd-chrome-btn:hover {
  color: var(--foreground);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.fd-chrome-btn--icon { width: 34px; padding-inline: 0; }
.fd-chrome-btn--accent:hover {
  border-color: var(--accent-border);
  color: var(--accent-text);
}

/* theme toggle shows the right glyph per active theme */
.fd-theme-toggle .fd-theme-toggle__moon { display: none; }
.fd-theme-toggle .fd-theme-toggle__sun { display: block; }
[data-theme="light"] .fd-theme-toggle .fd-theme-toggle__moon { display: block; }
[data-theme="light"] .fd-theme-toggle .fd-theme-toggle__sun { display: none; }

/* hamburger only below the sidebar breakpoint */
.fd-hamburger { display: none; }
@media (max-width: 1000px) {
  .fd-hamburger {
    display: inline-flex;
    order: -1;
  }
}

/* --- Hide the "GitHub" label text on very small screens --- */
@media (max-width: 600px) {
  .fd-chrome-btn--ghost-label .fd-chrome-btn__label { display: none; }
  .fd-chrome-btn--ghost-label { width: 34px; padding-inline: 0; }
}

/* ---------------------------------------------------------------------------
   2 · Layout shell — [ sidebar | main ] grid
   --------------------------------------------------------------------------- */
.fd-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  max-width: var(--container-max);
  margin-inline: auto;
}
@media (max-width: 1000px) {
  .fd-shell { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------------------
   3 · Sidebar — sticky, scrollable; off-canvas drawer under 1000px
   --------------------------------------------------------------------------- */
.fd-sidebar {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: var(--space-6) var(--space-4) var(--space-10);
  border-right: var(--border-width) solid var(--border);
  background: var(--background);
}
.fd-sidebar__group + .fd-sidebar__group { margin-top: var(--space-8); }
.fd-sidebar__heading {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-inline: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--foreground-faint);
}
.fd-sidebar__heading::after {
  content: "";
  flex: 1;
  height: var(--border-width);
  background: var(--border);
}
.fd-sidebar__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fd-navlink {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-muted);
  border: var(--border-width) solid transparent;
  transition: color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}
/* accent left bar — invisible until active/hover */
.fd-navlink::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 60%;
  background: var(--accent);
  transition: transform var(--duration-fast) var(--ease-out);
}
.fd-navlink__index {
  font-size: var(--text-2xs);
  color: var(--foreground-faint);
  transition: color var(--duration-fast) var(--ease-out);
}
.fd-navlink__label { flex: 1; }
.fd-navlink:hover {
  color: var(--foreground);
  background: var(--surface);
  border-color: var(--border);
}
.fd-navlink:hover .fd-navlink__index { color: var(--foreground-subtle); }
.fd-navlink.is-active {
  color: var(--foreground);
  background: var(--surface);
  border-color: var(--border);
}
.fd-navlink.is-active::before { transform: translateY(-50%) scaleY(1); }
.fd-navlink.is-active .fd-navlink__index { color: var(--accent-text); }

/* --- Nested component quick-links under each category --------------------- */
.fd-sidebar__sub {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: var(--space-1) 0 var(--space-3);
  /* hairline rail aligned under the category index column */
  margin-left: var(--space-4);
  padding-left: var(--space-3);
  border-left: var(--border-width) solid var(--border);
}
.fd-subnavlink {
  position: relative;
  display: block;
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-faint);
  border: var(--border-width) solid transparent;
  transition: color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}
/* short accent tick that meets the parent rail on hover/active */
.fd-subnavlink::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-3) - var(--border-width));
  top: 50%;
  width: var(--space-2);
  height: var(--border-width);
  background: var(--accent);
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  transition: transform var(--duration-fast) var(--ease-out);
}
.fd-subnavlink:hover {
  color: var(--foreground-muted);
  background: var(--surface);
  border-color: var(--border);
}
.fd-subnavlink:hover::before { transform: translateY(-50%) scaleX(1); }
.fd-subnavlink.is-active,
.fd-subnavlink:target {
  color: var(--accent-text);
  background: var(--surface);
  border-color: var(--border);
}
.fd-subnavlink.is-active::before,
.fd-subnavlink:target::before { transform: translateY(-50%) scaleX(1); }
.fd-subnavlink:focus-visible {
  outline: var(--border-width-thick) solid var(--accent);
  outline-offset: 1px;
}

/* sidebar footer mini-meta */
.fd-sidebar__foot {
  margin-top: var(--space-10);
  padding: var(--space-4) var(--space-2) 0;
  border-top: var(--border-width) solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-faint);
  line-height: var(--leading-relaxed);
}
.fd-sidebar__foot a { color: var(--foreground-subtle); }
.fd-sidebar__foot a:hover { color: var(--accent-text); }

/* --- Off-canvas behaviour under 1000px --- */
.fd-sidebar__backdrop { display: none; }
@media (max-width: 1000px) {
  .fd-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    z-index: var(--z-drawer);
    width: min(86vw, 320px);
    height: calc(100vh - var(--header-height));
    transform: translateX(-100%);
    transition: transform var(--duration-base) var(--ease-out);
    box-shadow: var(--shadow-lg);
  }
  .fd-sidebar.is-open { transform: translateX(0); }

  .fd-sidebar__backdrop {
    display: block;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    z-index: var(--z-dropdown);
    background: var(--overlay);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-base) var(--ease-out),
      visibility var(--duration-base) var(--ease-out);
  }
  .fd-sidebar__backdrop.is-open { opacity: 1; visibility: visible; }
}

/* ---------------------------------------------------------------------------
   4 · Main column
   --------------------------------------------------------------------------- */
.fd-main { min-width: 0; }

/* ---------------------------------------------------------------------------
   5 · Hero — full-bleed grid background + crosshairs + giant wordmark
   --------------------------------------------------------------------------- */
.fd-hero {
  position: relative;
  overflow: hidden;
  border-bottom: var(--border-width) solid var(--border);
  isolation: isolate;
}
.fd-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.fd-hero__inner {
  position: relative;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: clamp(var(--space-16), 12vw, var(--space-32)) var(--space-6) var(--space-20);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
@media (max-width: 768px) {
  .fd-hero__inner { padding-inline: var(--space-4); }
}
.fd-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--foreground-subtle);
}
.fd-hero__eyebrow b { color: var(--accent-text); font-weight: var(--weight-medium); }

.fd-hero__title {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: var(--text-hero);
  line-height: 0.86;
  letter-spacing: var(--tracking-tighter);
  text-transform: none;
  margin: 0;
}
.fd-hero__title .fd-hero__slash { color: var(--accent-text); }
.fd-hero__title .fd-hero__ds {
  display: block;
  -webkit-text-stroke: var(--border-width-thick) var(--foreground);
  color: transparent;
}

.fd-hero__lead {
  max-width: 52ch;
  font-size: clamp(var(--text-lg), 2.2vw, var(--text-2xl));
  line-height: var(--leading-snug);
  color: var(--foreground-muted);
  text-wrap: balance;
}
.fd-hero__lead b { color: var(--foreground); font-weight: var(--weight-semibold); }

/* meta stat strip */
.fd-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: var(--space-2);
  border: var(--border-width) solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  width: fit-content;
  max-width: 100%;
}
.fd-hero__stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5);
  border-right: var(--border-width) solid var(--border);
}
.fd-hero__stat:last-child { border-right: 0; }
.fd-hero__stat-num {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: var(--text-2xl);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--foreground);
}
.fd-hero__stat-num span { color: var(--accent-text); }
.fd-hero__stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--foreground-subtle);
}
@media (max-width: 560px) {
  .fd-hero__stats { width: 100%; }
  .fd-hero__stat { flex: 1 1 40%; }
  .fd-hero__stat:nth-child(2) { border-right: 0; }
  .fd-hero__stat:nth-child(1), .fd-hero__stat:nth-child(2) {
    border-bottom: var(--border-width) solid var(--border);
  }
}

.fd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

/* hero crosshair registration marks (reuse the utility crosshair glyph) */
.fd-hero__cross {
  position: absolute;
  z-index: 0;
  width: 16px; height: 16px;
  pointer-events: none;
}
.fd-hero__cross::before,
.fd-hero__cross::after {
  content: "";
  position: absolute;
  background: var(--accent-border);
}
.fd-hero__cross::before { left: 50%; top: 0; width: var(--border-width); height: 100%; transform: translateX(-50%); }
.fd-hero__cross::after  { top: 50%; left: 0; height: var(--border-width); width: 100%; transform: translateY(-50%); }
.fd-hero__cross--a { top: 18%; right: 9%; }
.fd-hero__cross--b { bottom: 26%; right: 22%; }
.fd-hero__cross--c { top: 40%; left: 6%; }
@media (max-width: 768px) { .fd-hero__cross { display: none; } }

/* ---------------------------------------------------------------------------
   6 · Footer — mono colophon
   --------------------------------------------------------------------------- */
.fd-footer {
  border-top: var(--border-width) solid var(--border);
  background: var(--background-subtle);
}
.fd-footer__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-16) var(--space-6) var(--space-12);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-10);
}
@media (max-width: 768px) {
  .fd-footer__inner {
    grid-template-columns: 1fr;
    padding-inline: var(--space-4);
  }
}
.fd-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.fd-footer__wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);
  text-transform: none;
}
.fd-footer__wordmark span { color: var(--accent-text); }
.fd-footer__colophon {
  max-width: 56ch;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--foreground-muted);
}
.fd-footer__colophon a { color: var(--accent-text); }
.fd-footer__colophon a:hover { text-decoration: underline; text-underline-offset: 3px; }

.fd-footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8) var(--space-6);
}
@media (max-width: 420px) { .fd-footer__cols { grid-template-columns: 1fr; } }
.fd-footer__col-title {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--foreground-faint);
  margin-bottom: var(--space-3);
}
.fd-footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.fd-footer__links a {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-muted);
}
.fd-footer__links a:hover { color: var(--accent-text); }

.fd-footer__bar {
  border-top: var(--border-width) solid var(--border);
}
.fd-footer__bar-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--foreground-faint);
}
@media (max-width: 768px) { .fd-footer__bar-inner { padding-inline: var(--space-4); } }
.fd-footer__bar a { color: var(--foreground-subtle); }
.fd-footer__bar a:hover { color: var(--accent-text); }
/* Corporate / copyright link — underlined so it clearly reads as a link */
.fd-footer__corp {
  color: var(--foreground-muted);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  transition: color var(--duration-fast) var(--ease-out),
    text-decoration-color var(--duration-fast) var(--ease-out);
}
.fd-footer__corp:hover {
  color: var(--accent-text);
  text-decoration-color: var(--accent);
}
.fd-footer__version {
  color: var(--accent-text);
  border: var(--border-width) solid var(--accent-border);
  padding: 1px var(--space-2);
}

/* ---------------------------------------------------------------------------
   7 · Toast region — fixed stack, bottom-right
   (individual .fd-toast styling lives in components/feedback.css)
   --------------------------------------------------------------------------- */
.fd-toast-region {
  position: fixed;
  z-index: var(--z-toast);
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: min(360px, calc(100vw - var(--space-8)));
  pointer-events: none;
}
.fd-toast-region > * { pointer-events: auto; }
@media (max-width: 480px) {
  .fd-toast-region {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
    width: auto;
  }
}

/* ---------------------------------------------------------------------------
   8 · Body scroll lock helper (set by JS when an overlay/menu opens)
   --------------------------------------------------------------------------- */
body.fd-scroll-lock { overflow: hidden; }

/* ---------------------------------------------------------------------------
   9 · Mobile overflow guard
   On small screens the demo overlays (popover / hover card / nav-menu panel /
   menubar / dropdown / context menu) are absolutely positioned and can stick
   out past the right edge, creating horizontal page scroll. Clip the page on
   the x-axis (overflow-x: clip keeps vertical scroll + sticky intact, and the
   sidebar is `position: fixed` below 1000px so nothing sticky is affected),
   and cap the panels so an opened one stays inside the viewport.
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: clip;
    max-width: 100%;
  }
  .fd-popover__content,
  .fd-hovercard__content,
  .fd-navmenu__panel,
  .fd-menubar__content,
  .fd-menu__list,
  .fd-context__menu {
    max-width: calc(100vw - 1.5rem);
  }
}
