/* MaxGrowth academy docs — scoped to .mg-ftb / body.mg-ftb-page. Do not load on other templates. */
body.mg-ftb-page {
  margin: 0; /* UA default is 8px; that inset was shrinking the column (body x=8, width=html-16) */
  background: #05050A; /* site chrome; do not set body color so header/footer inherit is not forced */
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
/* Decorative particles stay a footer concern; hide and do not paint on reading pages. */
body.mg-ftb-page #tsparticles {
  display: none !important;
}
.mg-ftb,
.mg-ftb * ,
.mg-ftb *::before,
.mg-ftb *::after {
  box-sizing: border-box;
}
body.mg-ftb-page:has(.mg-ftb-preview-chrome) .mg-ftb { --ftb-nav-offset: 7rem; }

.mg-ftb {
  --ftb-bg: #05050A;
  --ftb-surface: #101218;
  --ftb-text: #E6E9EE;
  --ftb-muted: #B4BCC6;
  --ftb-line: #2A2E38;
  --ftb-accent: #2DD4BF;
  --ftb-accent-soft: rgba(20, 184, 166, 0.14);
  --ftb-ok: #34D399;
  --ftb-warn: #FBBF24;
  --ftb-danger: #F87171;
  --ftb-body: 17px;
  --ftb-lh: 1.8;
  --ftb-h1: 32px;
  --ftb-h2: 24px;
  --ftb-h3: 19px;
  --ftb-left: 205px;
  --ftb-left-inset: 10px;
  --ftb-col-gap: 20px;
  --ftb-main: 44rem;
  --ftb-right: 200px;
  --ftb-nav-offset: 5.75rem;
  color: var(--ftb-text);
  font-size: var(--ftb-body);
  line-height: var(--ftb-lh);
  background: var(--ftb-bg);
}

.mg-ftb a { color: var(--ftb-accent); text-decoration: none; }
.mg-ftb a:hover { text-decoration: underline; text-underline-offset: 2px; }
.mg-ftb a:focus-visible,
.mg-ftb button:focus-visible,
.mg-ftb input:focus-visible,
.mg-ftb select:focus-visible,
.mg-ftb textarea:focus-visible {
  outline: 2px solid var(--ftb-accent);
  outline-offset: 2px;
}

.mg-ftb-shell {
  display: grid;
  grid-template-columns: var(--ftb-left) minmax(0, var(--ftb-main)) var(--ftb-right);
  column-gap: var(--ftb-col-gap);
  max-width: none;
  width: 100%;
  margin: 0;
  padding: var(--ftb-nav-offset) 12px 4rem var(--ftb-left-inset);
  align-items: start;
  justify-content: start;
}

.mg-ftb-side,
.mg-ftb-toc {
  position: sticky;
  top: var(--ftb-nav-offset);
  max-height: calc(100vh - 6.25rem);
  overflow: auto;
}

.mg-ftb-side {
  font-size: 13.5px;
  line-height: 1.45;
  padding-right: 4px;
}
.mg-ftb-side-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ftb-text);
  margin: 0 0 0.75rem;
}
.mg-ftb-back {
  display: inline-block;
  margin: 0 0 0.85rem;
  color: var(--ftb-muted);
  font-size: 13px;
}
.mg-ftb-search {
  width: 100%;
  margin-bottom: 0.9rem;
}
.mg-ftb-search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--ftb-line);
  background: var(--ftb-surface);
  color: var(--ftb-text);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 13.5px;
}
.mg-ftb-search-results {
  border: 1px solid var(--ftb-line);
  background: var(--ftb-surface);
  border-radius: 6px;
  margin: -0.45rem 0 0.85rem;
  padding: 0.25rem 0;
  max-height: 16rem;
  overflow: auto;
}
.mg-ftb-search-results[hidden] { display: none; }
.mg-ftb-search-results a,
.mg-ftb-search-results .is-disabled {
  display: block;
  padding: 0.4rem 0.65rem;
  color: var(--ftb-text);
  text-decoration: none;
}
.mg-ftb-search-results a:hover { background: var(--ftb-accent-soft); }
.mg-ftb-search-results .is-disabled { color: var(--ftb-muted); }
.mg-ftb-search-meta { color: var(--ftb-muted); font-size: 12px; }

.mg-ftb-stage { margin: 0 0 0.35rem; border-bottom: 1px solid var(--ftb-line); }
.mg-ftb-stage > button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0.45rem 0;
  font: inherit;
  font-weight: 650;
  color: var(--ftb-text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  white-space: normal;
  overflow-wrap: break-word;
}
.mg-ftb-stage > button .caret { color: var(--ftb-muted); font-weight: 400; }
.mg-ftb-stage.is-collapsed .mg-ftb-chapter-list { display: none; }
.mg-ftb-chapter-list { list-style: none; margin: 0 0 0.4rem; padding: 0 0 0.3rem; }
.mg-ftb-chapter-list li { margin: 0; }
.mg-ftb-chapter-list a,
.mg-ftb-chapter-list span {
  display: block;
  padding: 0.28rem 0.4rem 0.28rem 0.55rem;
  border-left: 2px solid transparent;
  color: var(--ftb-muted);
  text-decoration: none;
  border-radius: 0 4px 4px 0;
  white-space: normal;
  overflow-wrap: break-word;
}
.mg-ftb-chapter-list a:hover { color: var(--ftb-text); background: var(--ftb-accent-soft); text-decoration: none; }
.mg-ftb-chapter-list a.is-active {
  color: var(--ftb-text);
  border-left-color: var(--ftb-accent);
  background: var(--ftb-accent-soft);
  font-weight: 650;
}
.mg-ftb-chapter-list .is-pending { color: #8A9098; }
.mg-ftb-badge {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 11px;
  color: var(--ftb-muted);
}

.mg-ftb-main {
  min-width: 0;
  max-width: 100%;
  background: var(--ftb-surface);
}
.mg-ftb-mobilebar,
.mg-ftb-menu-toggle,
.mg-ftb-backdrop { display: none; }

.mg-ftb-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  font-size: 13px;
  color: var(--ftb-muted);
}
.mg-ftb-crumb li { display: flex; align-items: center; gap: 0.45rem; }
.mg-ftb-crumb li:not(:last-child)::after { content: "/"; color: #B0B6BD; }

.mg-ftb-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--ftb-accent);
  margin: 0 0 0.55rem;
}
.mg-ftb h1 {
  font-size: var(--ftb-h1);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin: 0 0 0.75rem;
  color: var(--ftb-text);
  max-width: 40rem;
}
.mg-ftb-goal {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ftb-text);
  margin: 0 0 0.85rem;
}
.mg-ftb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ftb-line);
  color: var(--ftb-muted);
  font-size: 13px;
}
.mg-ftb-summary {
  background: var(--ftb-surface);
  border: 1px solid var(--ftb-line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0 0 1.5rem;
}
.mg-ftb-summary h2 { margin-top: 0; font-size: 15px; }

.mg-ftb-body {
  max-width: min(46rem, 100%);
  min-width: 0;
}
.mg-ftb-body h2 {
  font-size: var(--ftb-h2);
  line-height: 1.3;
  margin: 2rem 0 0.8rem;
  letter-spacing: -0.015em;
}
.mg-ftb-body h3 {
  font-size: var(--ftb-h3);
  line-height: 1.35;
  margin: 1.5rem 0 0.55rem;
}
.mg-ftb-body p { margin: 0 0 1.1rem; max-width: 46rem; }
.mg-ftb-body ul, .mg-ftb-body ol { margin: 0 0 1.1rem; padding-left: 1.35rem; max-width: 46rem; }
.mg-ftb-body li { margin: 0 0 0.35rem; }
.mg-ftb-body strong { font-weight: 650; }
.mg-ftb-table-wrap { overflow-x: auto; margin: 0 0 1.25rem; -webkit-overflow-scrolling: touch; }
.mg-ftb-body table, .mg-ftb table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}
.mg-ftb-body th, .mg-ftb-body td, .mg-ftb table th, .mg-ftb table td {
  border: 1px solid var(--ftb-line);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
  background: var(--ftb-surface);
}
.mg-ftb-body th, .mg-ftb table th { font-weight: 650; background: rgba(255, 255, 255, 0.04); }
.mg-ftb-body blockquote {
  margin: 0 0 1.2rem;
  padding: 0.2rem 0 0.2rem 0.9rem;
  border-left: 3px solid var(--ftb-accent);
  color: var(--ftb-muted);
}
.mg-ftb-disclaimer {
  font-size: 13.5px;
  color: var(--ftb-muted);
  border-top: 1px solid var(--ftb-line);
  margin-top: 2.5rem;
  padding-top: 1rem;
}

.mg-ftb-figure {
  margin: 0 0 1.5rem;
  background: var(--ftb-surface);
  border: 1px solid var(--ftb-line);
  border-radius: 8px;
  padding: 0.85rem;
}
.mg-ftb-figure .mg-ftb-figure-frame {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.mg-ftb-figure svg { display: block; max-width: 100%; height: auto; }
.mg-ftb-figure figcaption {
  margin-top: 0.7rem;
  font-size: 13.5px;
  color: var(--ftb-muted);
  line-height: 1.6;
}
.mg-ftb-figure-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.55rem; }
.mg-ftb-figure-actions button,
.mg-ftb .mg-ftb-btn {
  border: 1px solid var(--ftb-line);
  background: var(--ftb-surface);
  color: var(--ftb-text);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.mg-ftb .mg-ftb-btn-primary {
  background: var(--ftb-accent);
  border-color: var(--ftb-accent);
  color: #042F2A;
}
.mg-ftb .mg-ftb-btn-primary:hover { filter: brightness(0.95); text-decoration: none; }

/* 1.1.3: UA <button>/<summary> is black (CanvasText) on academy pages without
   Tailwind preflight. Nav reset does not cover in-page chrome. */
.mg-ftb-toc-mobile > button,
.mg-ftb-toc-mobile > summary,
.mg-ftb details > summary,
.mg-ftb-dialog-head button,
.mg-ftb-dialog-head summary {
  color: var(--ftb-text);
  -webkit-appearance: none;
  appearance: none;
}
.mg-ftb-dialog-head button {
  background: var(--ftb-surface);
  border: 1px solid var(--ftb-line);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
@media (max-width: 1219px) {
  /* In-article diagrams shrink to column width; allow pan as well as 放大查看. */
  .mg-ftb-figure svg {
    max-width: none;
    min-width: 28rem;
    height: auto;
  }
}

.mg-ftb-review-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: var(--ftb-warn);
  background: rgba(251, 191, 36, 0.12);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  margin-left: 0.35rem;
}

.mg-ftb-progress {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  font-size: 14px;
}
.mg-ftb-progress input { width: 1rem; height: 1rem; }
.mg-ftb-checklist { margin: 1.5rem 0; }
.mg-ftb-checklist label { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0 0 0.45rem; }
.mg-ftb-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ftb-line);
}
.mg-ftb-pager a { max-width: 46%; }
.mg-ftb-pager .is-disabled { color: var(--ftb-muted); max-width: 46%; }
.mg-ftb-related { margin: 1.25rem 0 2rem; }
.mg-ftb-related ul { padding-left: 1.2rem; }
.mg-ftb-cta {
  margin: 2rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--ftb-line);
}
.mg-ftb-cta p { margin: 0 0 0.6rem; color: var(--ftb-muted); font-size: 14.5px; }

.mg-ftb-toc { font-size: 13px; }
.mg-ftb-toc h2 { font-size: 12px; letter-spacing: 0.04em; margin: 0 0 0.5rem; color: var(--ftb-muted); font-weight: 700; }
.mg-ftb-readbar { height: 3px; background: var(--ftb-line); margin: 0 0 0.75rem; border-radius: 99px; overflow: hidden; }
.mg-ftb-readbar > span { display: block; height: 100%; width: 0; background: var(--ftb-accent); }
.mg-ftb-toc ol { list-style: none; margin: 0; padding: 0; }
.mg-ftb-toc a {
  display: block;
  color: var(--ftb-muted);
  text-decoration: none;
  padding: 0.28rem 0 0.28rem 0.55rem;
  border-left: 2px solid transparent;
}
.mg-ftb-toc a.level-h3 { padding-left: 1rem; font-size: 12.5px; }
.mg-ftb-toc a.is-active { color: var(--ftb-text); border-left-color: var(--ftb-accent); font-weight: 650; }
.mg-ftb-toc-mobile { display: none; }

.mg-ftb-tools { display: grid; gap: 1.5rem; }
.mg-ftb-card {
  background: var(--ftb-surface);
  border: 1px solid var(--ftb-line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}
.mg-ftb-card h2 { margin-top: 0; }
.mg-ftb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; }
.mg-ftb-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 13.5px; color: var(--ftb-muted); }
.mg-ftb-form input, .mg-ftb-form select {
  border: 1px solid var(--ftb-line);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font: inherit;
  color: var(--ftb-text);
  background: var(--ftb-bg);
}
.mg-ftb-form .span-2 { grid-column: 1 / -1; }
.mg-ftb-calc-out { margin-top: 1rem; font-size: 15px; }
.mg-ftb-calc-out[hidden], .mg-ftb-error[hidden] { display: none; }
.mg-ftb-error { color: var(--ftb-danger); font-size: 14px; margin-top: 0.6rem; }
.mg-ftb-hub-grid { display: grid; gap: 0.75rem; }
.mg-ftb-hub-stage {
  background: var(--ftb-surface);
  border: 1px solid var(--ftb-line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}
.mg-ftb-hub-stage h2 { margin: 0 0 0.35rem; font-size: 18px; }
.mg-ftb-hub-stage p { margin: 0 0 0.55rem; color: var(--ftb-muted); font-size: 14.5px; }
.mg-ftb-hub-stage ol { margin: 0; padding-left: 1.15rem; }
.mg-ftb-glossary-index { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1.25rem; }
.mg-ftb-glossary-index a {
  border: 1px solid var(--ftb-line);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  font-size: 13px;
  color: var(--ftb-text);
  text-decoration: none;
}
.mg-ftb-term { padding: 0.9rem 0; border-bottom: 1px solid var(--ftb-line); }
.mg-ftb-term h2 { margin: 0 0 0.3rem; font-size: 18px; }
.mg-ftb-dialog {
  border: 1px solid var(--ftb-line);
  border-radius: 8px;
  padding: 0;
  /* Viewport-bounded frame. Do not grow with a wide SVG (that would overflow the document). */
  max-width: 96vw;
  width: 96vw;
  max-height: 92vh;
  overflow: hidden;
  background: var(--ftb-surface);
  color: var(--ftb-text);
}
.mg-ftb-dialog::backdrop { background: rgba(16, 18, 22, 0.45); }
.mg-ftb-dialog-head { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--ftb-line); }
.mg-ftb-dialog-body {
  padding: 0.9rem;
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(92vh - 3.4rem);
  max-width: 100%;
  overscroll-behavior: contain;
}
/* Natural viewBox size in the dialog; do not inherit the in-article width:100% shrink. */
.mg-ftb-dialog-body svg {
  display: block;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  flex-shrink: 0;
}
.mg-ftb-storage-note { font-size: 12.5px; color: var(--ftb-muted); }


/* 1.0.12-local: contain long Shiki/pre code inside the reading column.
   Halo shiki-code injects `code { width: max-content; min-width: 100%; display: block }`
   (and `.shiki { overflow-x: auto }` may stay in the component shadow, not the light-DOM pre).
   Scroll inside the pre; do not hide overflow on body/html (that would clip text and fight the off-screen drawer). */
body.mg-ftb-page .mg-ftb-body pre,
body.mg-ftb-page .mg-ftb-body pre.shiki,
body.mg-ftb-page .mg-ftb-body shiki-code {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
body.mg-ftb-page .mg-ftb-body pre code,
body.mg-ftb-page .mg-ftb-body pre.shiki code {
  display: block;
  /* keep intrinsic line width so the pre can scroll; do not use width:100% which would squash */
  max-width: none;
  box-sizing: border-box;
}
body.mg-ftb-page .mg-ftb-body :not(pre) > code {
  width: auto;
  min-width: 0;
  max-width: 100%;
  display: inline;
  white-space: break-spaces;
  overflow-wrap: anywhere;
  word-break: break-word;
  position: static;
}

/* 1.0.14-local: wrap long unbreakable tokens (bare official URLs as <a> text)
   in the reading column, verification note, and sources list.
   Confirmed on 1.0.13 CMS 01.01 at ~375px: customs.gov.cn URL <a> width 672.30,
   right 709.89, parent ~321px; closest overflow ancestor .mg-ftb-body;
   not pre, dialog, or toc. Thumb ~half viewport (~335px horizontal shift).
   Do not hide overflow on html/body. Do not change pre preserved newlines
   or pre/shiki internal scrolling — reset overflow-wrap on pre/code. */
body.mg-ftb-page .mg-ftb-body,
body.mg-ftb-page .mg-ftb-body a,
body.mg-ftb-page .mg-ftb-verify,
body.mg-ftb-page .mg-ftb-verify a,
body.mg-ftb-page .mg-ftb-sources,
body.mg-ftb-page .mg-ftb-sources a {
  overflow-wrap: anywhere;
}
body.mg-ftb-page .mg-ftb-body pre,
body.mg-ftb-page .mg-ftb-body pre.shiki,
body.mg-ftb-page .mg-ftb-body shiki-code,
body.mg-ftb-page .mg-ftb-body pre code,
body.mg-ftb-page .mg-ftb-body pre.shiki code {
  overflow-wrap: normal;
}

/* 1.1.6: compact in-page TOC is native <details>. In the full column
   (card closed, or the third grid column), keep the list visible even if
   details is closed: hide summary and force-show the panel. */
.mg-ftb-toc > details { display: block; }
.mg-ftb-toc > details > summary { display: none; }
.mg-ftb-toc > details > .mg-ftb-toc-panel { display: block; }
.mg-ftb-toc-toggle {
  color: var(--ftb-text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.mg-ftb-toc-toggle:hover,
.mg-ftb-toc-toggle:focus-visible {
  border-color: var(--ftb-accent);
  color: var(--ftb-text);
}

/* 1.1.6 / t37: wide layout from 1220px. Card default-expanded; body
   reserve comes from footer (card width + right inset + gap). Main is
   capped at 44rem so 1440 does not stretch the text. */
@media (min-width: 1220px) {
  /* 1.1.7: do not left-pack a 44rem track; centering rules are appended. */
  html.mg-contact-expanded .mg-ftb-toc {
    align-self: start;
    width: auto;
    max-width: min(16.5rem, 100%);
    max-height: none;
    overflow: visible;
    z-index: 15;
    position: sticky;
    top: var(--ftb-nav-offset);
  }
  html.mg-contact-expanded .mg-ftb-toc > details > summary.mg-ftb-toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--ftb-surface);
    border: 1px solid var(--ftb-line);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    color: var(--ftb-text);
  }
  html.mg-contact-expanded .mg-ftb-toc details:not([open]) > .mg-ftb-toc-panel {
    display: none;
  }
  html.mg-contact-expanded .mg-ftb-toc details[open] {
    background: var(--ftb-surface);
    border: 1px solid var(--ftb-line);
    border-radius: 8px;
    padding: 0.55rem 0.7rem 0.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    max-height: calc(100vh - 6.25rem);
    overflow: auto;
  }
  html.mg-contact-expanded .mg-ftb-toc details[open] > summary.mg-ftb-toc-toggle {
    width: 100%;
    margin-bottom: 0.35rem;
  }
  html.mg-contact-expanded .mg-ftb-toc details[open] h2 { display: none; }
}

@media (max-width: 1219px) {
  .mg-ftb-shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    padding: 4.75rem 1rem 3rem;
    row-gap: 1rem;
  }
  .mg-ftb-mobilebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 4.5rem;
    z-index: 20;
    background: var(--ftb-bg);
    padding: 0.4rem 0 0.55rem;
    border-bottom: 1px solid var(--ftb-line);
    margin: 0 0 0.6rem;
  }
  .mg-ftb-mobilebar strong { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mg-ftb-menu-toggle { display: inline-flex; }
  .mg-ftb-side {
    position: fixed;
    top: 0;
    left: 0;
    width: min(86vw, 320px);
    height: 100vh;
    max-height: none;
    background: var(--ftb-surface);
    z-index: 60;
    padding: 1rem 1rem 2rem;
    transform: translateX(-105%);
    box-shadow: 0 0 0 1px var(--ftb-line);
  }
  .mg-ftb-side.is-open { transform: translateX(0); }
  .mg-ftb-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 18, 22, 0.35);
    z-index: 50;
  }
  .mg-ftb-backdrop[hidden] { display: none; }
  .mg-ftb-toc { display: none; }
  .mg-ftb-toc-mobile { display: block; margin: 0 0 1rem; border: 1px solid var(--ftb-line); border-radius: 8px; background: var(--ftb-surface); }
  .mg-ftb-toc-mobile > button,
  .mg-ftb-toc-mobile > summary {
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 0.65rem 0.8rem;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    color: var(--ftb-text);
    -webkit-appearance: none;
    appearance: none;
  }
  .mg-ftb-toc-mobile .mg-ftb-toc-inner { padding: 0 0.8rem 0.7rem; }
  .mg-ftb-toc-mobile .mg-ftb-toc-inner,
  .mg-ftb-toc-mobile .mg-ftb-toc-inner a,
  .mg-ftb-toc details[open] .mg-ftb-toc-panel,
  .mg-ftb-toc details[open] a { color: var(--ftb-text); }
  .mg-ftb-toc details[open] a { color: var(--ftb-muted); }
  .mg-ftb-toc details[open] a.is-active,
  .mg-ftb-toc-mobile a.is-active { color: var(--ftb-text); }
  .mg-ftb-form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-ftb *, .mg-ftb *::before, .mg-ftb *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Empty states: catalog / search / right-hand TOC */
.mg-ftb-empty {
  color: var(--ftb-muted);
  font-size: 13.5px;
  line-height: 1.6;
  padding: 0.6rem 0.15rem;
  margin: 0;
}
.mg-ftb-search-results .mg-ftb-empty { padding: 0.5rem 0.65rem; }
.mg-ftb-body p[data-ftb-placeholder="lede"] { display: none; }

/* Form / button rules stay under .mg-ftb so they cannot restyle the shared header/footer. */
@media print {
  .mg-ftb-side, .mg-ftb-toc, .mg-ftb-mobilebar, .mg-ftb-menu-toggle, .mg-ftb-figure-actions, nav, footer { display: none !important; }
  .mg-ftb-shell { display: block; padding: 0; }
  .mg-ftb-main { max-width: none; }
}


/* 1.1.7: center the 44rem main column in the space between left nav
   and the remaining right edge (contact-card gutter is body padding-right).
   TOC follows the main column, not the far edge of leftover space. */
@media (min-width: 1220px) {
  .mg-ftb-shell {
    grid-template-columns: var(--ftb-left) minmax(0, 1fr);
    justify-content: start;
  }
  .mg-ftb-side { grid-column: 1; }
  .mg-ftb-main {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 100%;
    max-width: var(--ftb-main);
  }
  .mg-ftb-toc {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    width: 100%;
    max-width: var(--ftb-main);
    z-index: 15;
    pointer-events: none;
    background: transparent;
    overflow: visible;
  }
  .mg-ftb-toc > details {
    pointer-events: auto;
    margin-left: auto;
    width: max-content;
    max-width: min(16.5rem, 100%);
  }
}
@media (min-width: 1400px) {
  .mg-ftb-shell {
    grid-template-columns: var(--ftb-left) minmax(0, 1fr) minmax(0, var(--ftb-main)) auto minmax(0, 1fr);
  }
  .mg-ftb-side { grid-column: 1; }
  .mg-ftb-main {
    grid-column: 3;
    justify-self: stretch;
    max-width: var(--ftb-main);
  }
  .mg-ftb-toc {
    grid-column: 4;
    justify-self: start;
    align-self: start;
    width: auto;
    max-width: min(16.5rem, 100%);
    pointer-events: auto;
  }
  .mg-ftb-toc > details { margin-left: 0; }
}
/* keep contact-expanded overlay typography, but inherit the centered tracks */
@media (min-width: 1220px) and (max-width: 1399px) {
  html.mg-contact-expanded .mg-ftb-shell {
    grid-template-columns: var(--ftb-left) minmax(0, 1fr);
  }
  html.mg-contact-expanded .mg-ftb-main,
  html.mg-contact-expanded .mg-ftb-toc {
    grid-column: 2;
    justify-self: center;
    max-width: var(--ftb-main);
    width: 100%;
  }
}
.mg-ftb-figure-note {
  margin: 0.4rem 0 0;
  font-size: 12.5px;
  color: var(--ftb-muted);
  line-height: 1.55;
}
.mg-ftb-term-figlink {
  margin: 0.4rem 0 0;
  font-size: 13px;
}
.mg-ftb-gloss-figures {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1rem 0 1.5rem;
}
.mg-ftb-gloss-figures[hidden] { display: none; }

/* 1.1.7: 390 glossary cards overflowed because the 1219px rule
   forced min-width: 28rem / max-width: none on in-article SVGs. Scale the
   in-card figure to the column; the enlarge dialog keeps natural width and
   overflow-x: auto (unchanged). */
@media (max-width: 1219px) {
  .mg-ftb-figure svg {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    height: auto;
  }
}
