/* GitBook <mark style="color:..."> 只着色文字、不加底色 */
.md-typeset mark.gb-mark { background: none; padding: 0; font-weight: 600; }
.md-typeset mark.gb-red,
.md-typeset mark.gb-danger { color: #d32f2f; }
.md-typeset mark.gb-blue,
.md-typeset mark.gb-primary { color: #1e66d0; }
/* Required / Conditionally required / Optional under a field name: small pills on their own line.
   Standard markup: <br><sub><em><mark style="color:red|orange|blue;">…</mark></em></sub>
   (sup / no-em variants are styled the same, so a stray copy still looks right) */
.md-typeset td:first-child > :is(sub, sup):has(mark.gb-mark) { vertical-align: baseline; font-size: 1em; }
.md-typeset td:first-child :is(sub, sup) em:has(> mark.gb-mark) { font-style: normal; }
.md-typeset td:first-child :is(sub, sup) mark.gb-mark {
  display: table; margin-top: .3em;
  font-family: var(--md-text-font-family, inherit); font-size: .62rem; font-weight: 600;
  letter-spacing: .02em; line-height: 1.5; padding: 0 .45em; border-radius: .6em;
}
.md-typeset td:first-child :is(sub, sup) mark:is(.gb-red, .gb-danger) { color: #c62828; background: rgba(211, 47, 47, .08); }
.md-typeset td:first-child :is(sub, sup) mark:is(.gb-orange, .gb-warning) { color: #A35200; background: rgba(230, 126, 0, .12); }
.md-typeset td:first-child :is(sub, sup) mark:is(.gb-blue, .gb-primary) { color: rgba(22, 32, 51, .55); background: rgba(22, 32, 51, .06); font-weight: 500; }
[data-md-color-scheme="slate"] .md-typeset mark.gb-red,
[data-md-color-scheme="slate"] .md-typeset mark.gb-danger { color: #ff7b7b; }
[data-md-color-scheme="slate"] .md-typeset mark.gb-blue,
[data-md-color-scheme="slate"] .md-typeset mark.gb-primary { color: #7fb0ff; }

/* front matter description，对应 GitBook 标题下的导语 */
.md-typeset .gb-desc { margin-top: -0.6em; color: var(--md-default-fg-color--light); font-size: 1.05em; }

/* {% stepper %} / {% step %}：左侧序号圆点 + 竖线 */
.md-typeset .gb-stepper { counter-reset: gb-step; margin: 1.2em 0; }
.md-typeset .gb-step {
  counter-increment: gb-step;
  position: relative;
  padding: 0 0 0.6em 2.6em;
  border-left: 2px solid var(--md-default-fg-color--lightest);
  margin-left: 0.85em;
}
.md-typeset .gb-step:last-child { border-left-color: transparent; }
.md-typeset .gb-step::before {
  content: counter(gb-step);
  position: absolute;
  left: -0.9em;
  top: 0;
  width: 1.7em;
  height: 1.7em;
  line-height: 1.7em;
  border-radius: 50%;
  text-align: center;
  font-size: 0.8em;
  font-weight: 700;
  color: var(--md-primary-bg-color);
  background: var(--md-primary-fg-color);
}
.md-typeset .gb-step > :first-child { margin-top: 0; }
.md-typeset .gb-step > h4:first-child,
.md-typeset .gb-step > h3:first-child { padding-top: 0.05em; }

/* 宽参数表横向滚动，不撑破版面 */
.md-typeset table:not([class]) { display: table; }
.md-typeset__table { overflow-x: auto; }

/* 空标题的提示块（GitBook hint 没有标题）：隐藏标题行 */
.md-typeset .admonition > .admonition-title:empty,
.md-typeset details > summary:empty { display: none; }

/* ===== Cactus Custody brand (Logo-Brand Kit): Brand Blue #185EF1, Navy #162033 ===== */
:root {
  --cc-blue: #185EF1;
  --cc-blue-dark: #1149C0;
  --cc-blue-light: #5A8CF5;
  --cc-navy: #162033;
  --md-primary-fg-color: var(--cc-blue);
  --md-primary-fg-color--light: var(--cc-blue-light);
  --md-primary-fg-color--dark: var(--cc-blue-dark);
  --md-primary-bg-color: #fff;
  --md-accent-fg-color: var(--cc-blue-dark);
  --md-typeset-a-color: var(--cc-blue);
  --md-default-fg-color: rgba(22, 32, 51, .90);
  --md-typeset-color: var(--cc-navy);
}

/* Header: white bar with full-colour wordmark */
.md-header {
  background-color: #fff;
  color: var(--cc-navy);
  box-shadow: 0 1px 0 rgba(22, 32, 51, .08);
}
.md-header__button.md-logo { display: flex; align-items: center; gap: .6rem; padding: .3rem .2rem; }
.md-header__button.md-logo img { height: 2.2rem; width: auto; }
/* "API Docs" product label next to the wordmark; the site-name text is hidden to avoid "Cactus Custody" twice */
.md-header__button.md-logo::after {
  content: "API Docs";
  font-size: .7rem; font-weight: 600; letter-spacing: .02em;
  padding: .1rem .5rem; border-radius: 1rem;
  color: var(--cc-blue); background: rgba(24, 94, 241, .10);
}
html[lang="zh"] .md-header__button.md-logo::after { content: "API 文档"; }
.md-header__title .md-header__topic:first-child { opacity: 0; }
.md-header__title--active .md-header__topic + .md-header__topic { opacity: 1; }
/* search box on a white header */
.md-search__form { background-color: #F2F5FA; }
.md-search__form:hover { background-color: #E8EDF6; }
.md-search__input::placeholder,
.md-search__icon { color: rgba(22, 32, 51, .55); }
.md-search__input { color: var(--cc-navy); }

/* Sidebar: section titles (Getting Started / API Fundementals & guides / API Reference) as small navy caps
   with wide tracking, like the old GitBook nav. Covers both forms Material renders:
   <label for=…> (plain section, Material greys it via [for]) and
   <div class="md-nav__container"><a> (section whose first page is its index, e.g. Getting Started). */
.md-nav--primary .md-nav__item--section > .md-nav__link[for],
.md-nav--primary .md-nav__item--section > .md-nav__link,
.md-nav--primary .md-nav__item--section > .md-nav__container > .md-nav__link {
  color: var(--cc-navy); font-weight: 700; font-size: .62rem;
  text-transform: uppercase; letter-spacing: .08em;
}
.md-nav--primary .md-nav__item--section > .md-nav__container > .md-nav__link:hover { color: var(--cc-blue); }
.md-nav__link--active { font-weight: 600; }

/* Headings in navy */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 { color: var(--cc-navy); }
.md-typeset h1 { font-weight: 700; }
.md-typeset h2,
.md-typeset h3 { font-weight: 600; }

/* Tabs (Development / Production) underline in brand blue */
.md-typeset .tabbed-labels > label:hover { color: var(--cc-blue); }

/* Footer: prev/next navigation on a Brand Blue bar (no logo / links / copyright) */
.md-footer { background: var(--cc-blue); color: #fff; }
.md-footer__link,
.md-footer__direction { color: #fff; }
.md-footer__link:hover,
.md-footer__link:focus { opacity: .8; }

/* ===== Readability: API reference pages ===== */

/* 1. Field names (first column) in a code font */
.md-typeset table:not([class]) td:first-child {
  font-family: var(--md-code-font-family, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: .9em; color: var(--cc-navy);
  /* only break a long name when it truly can't fit, so short names never split mid-word */
  word-break: normal; overflow-wrap: anywhere;
}
.md-typeset table:not([class]) td:first-child > sub { font-family: var(--md-text-font-family); }

/* 4. Compact, full-width tables: navy header, zebra rows, top-aligned cells; ignore GitBook pixel widths */
.md-typeset table:not([class]) {
  width: 100%; font-size: .74rem; border: 1px solid rgba(22, 32, 51, .10);
  border-radius: .3rem; overflow: hidden; border-collapse: separate; border-spacing: 0;
}
.md-typeset table:not([class]) th[width] { width: auto; }
.md-typeset table:not([class]) th:first-child { width: 28%; }
.md-typeset table:not([class]) th {
  background: var(--cc-navy); color: #fff; font-weight: 600;
  padding: .55em 1em; vertical-align: middle;
}
.md-typeset table:not([class]) td { padding: .6em 1em; vertical-align: top; }
.md-typeset table:not([class]) tbody tr:nth-child(even) { background: #F7F9FC; }
.md-typeset table:not([class]) tbody tr:hover { background: rgba(24, 94, 241, .05); box-shadow: none; }
/* raw-HTML tables (from GitBook) aren't wrapped by Material: let them scroll instead of overflowing */
.md-typeset > table:not([class]) { display: block; overflow-x: auto; }
@media screen and (min-width: 45em) { .md-typeset > table:not([class]) { display: table; } }

/* 3. Endpoint line: same code block as everywhere else, with the HTTP method as a coloured badge
   (badge markup added in theme/overrides/partials/content.html) */
.md-typeset .highlight .cc-ep { color: var(--md-code-fg-color); }
.md-typeset .cc-method {
  display: inline-block; margin-right: .5em; padding: 0 .5em; border-radius: .25em;
  font-size: .85em; font-weight: 700; letter-spacing: .03em; line-height: 1.6;
  color: #fff; background: var(--cc-blue);
}
.md-typeset .cc-method--get    { background: #0E8A5F; }
.md-typeset .cc-method--post   { background: var(--cc-blue); }
.md-typeset .cc-method--put    { background: #C46A00; }
.md-typeset .cc-method--patch  { background: #7A4CD9; }
.md-typeset .cc-method--delete { background: #C62828; }

/* Section landing pages: child pages as a 2-column card grid (theme/overrides/partials/content.html) */
.md-typeset .cc-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: .8rem; margin: 1.4em 0 2em;
}
.md-typeset .cc-card {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .9rem 1rem; border: 1px solid rgba(22, 32, 51, .12); border-radius: .4rem;
  background: #fff; color: var(--cc-navy); font-weight: 500;
  transition: border-color .15s, box-shadow .15s, color .15s;
}
.md-typeset .cc-card:hover,
.md-typeset .cc-card:focus-visible {
  border-color: var(--cc-blue); color: var(--cc-blue);
  box-shadow: 0 2px 8px rgba(24, 94, 241, .10);
}
.md-typeset .cc-card__icon svg { width: 1rem; height: 1rem; fill: rgba(22, 32, 51, .45); display: block; }
.md-typeset .cc-card:hover .cc-card__icon svg { fill: var(--cc-blue); }
