:root {
  --md-primary-fg-color: #07111f;
  --md-primary-fg-color--light: #101f35;
  --md-primary-fg-color--dark: #030812;
  --md-accent-fg-color: #7559ff;
  --md-default-bg-color: #f5f7fb;
  --venus-navy: #07111f;
  --venus-navy-2: #0b1728;
  --venus-indigo: #6557ff;
  --venus-violet: #8a65ff;
  --venus-cyan: #19d3d1;
  --venus-ink: #172033;
  --venus-muted: #68758a;
  --venus-line: #e3e8f1;
  --venus-panel: rgba(255, 255, 255, 0.94);
  --venus-shadow: 0 24px 70px rgba(13, 27, 51, 0.1);
  --md-text-font: Inter, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --md-code-font: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { background: #eef2f8; }
body {
  color: var(--venus-ink);
  background:
    radial-gradient(circle at 86% 4rem, rgba(101, 87, 255, 0.15), transparent 25rem),
    radial-gradient(circle at 8% 20rem, rgba(25, 211, 209, 0.1), transparent 22rem),
    linear-gradient(180deg, #eef3fa 0, #f7f9fc 27rem, #f3f6fa 100%);
}

/* Header: a compact product bar inspired by matvenus.com. */
.md-header {
  color: #294565;
  background: linear-gradient(100deg, #edf4ff 0%, #e6e7ff 48%, #dceeff 100%);
  border-bottom: 1px solid #bdd2f5;
  box-shadow: 0 12px 36px rgba(79, 111, 164, 0.15), inset 0 1px rgba(255,255,255,.88);
  backdrop-filter: blur(18px) saturate(145%);
}
.md-header::after {
  position: absolute;
  right: 16%; bottom: -1px; left: 16%; height: 1px;
  background: linear-gradient(90deg, transparent, #9d8fe8, #9cc8ee, transparent);
  content: ""; opacity: .9;
}
.md-header__inner { max-width: 96rem; min-height: 3.65rem; gap: .55rem; }
.md-header__button, .md-header__title, .md-header__topic, .md-header__option { color: #294565; }
.md-header__title { flex: 0 1 15rem; min-width: 11rem; font-size: .84rem; font-weight: 760; }
.md-logo { padding: .3rem; border-radius: .65rem; background: transparent; }
.md-logo img, .md-logo svg { width: 1.8rem; height: 1.8rem; mix-blend-mode: multiply; opacity: .95; }
.md-search { flex: 0 1 15rem; min-width: 10rem; margin-left: auto; }
.md-search__form {
  height: 2.05rem; border: 1px solid rgba(151,169,205,.22); border-radius: 999px;
  background: rgba(255,255,255,.6); box-shadow: inset 0 1px rgba(255,255,255,.78);
}
.md-search__form:hover, .md-search__form:focus-within {
  border-color: rgba(86,132,202,.58); background: rgba(255,255,255,.86);
  box-shadow: 0 0 0 3px rgba(99,151,220,.14);
}
.md-search__input, .md-search__icon, .md-search__options { color: #365573; }
.md-search__input::placeholder { color: #7d96b5; opacity: 1; }

.manual-top-nav { display: none; align-items: center; gap: .82rem; margin-left: .3rem; white-space: nowrap; }
.manual-top-nav__link, .manual-top-nav__login {
  display: inline-flex; align-items: center; gap: .3rem; min-height: 2rem;
  color: #4c6688; font-size: .64rem; font-weight: 650; text-decoration: none;
  transition: color .18s ease, transform .18s ease, background .18s ease;
}
.manual-top-nav__link:hover { color: #2f6099; transform: translateY(-1px); }
.manual-top-nav__icon { width: .82rem; height: .82rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.manual-top-nav__separator { width: 1px; height: 1.1rem; background: rgba(96,129,174,.24); }
.manual-top-nav__login {
  justify-content: center; min-width: 3.7rem; padding: 0 1rem; border: 1px solid rgba(116,154,255,.2);
  border-radius: 999px; color: #426be4; background: rgba(194,215,255,.78);
  box-shadow: inset 0 1px rgba(255,255,255,.54);
}
.manual-top-nav__login:hover { color: #365fda; transform: translateY(-1px); background: rgba(205,223,255,.92); box-shadow: 0 6px 16px rgba(92,129,199,.14), inset 0 1px rgba(255,255,255,.72); }

/* Documentation shell. */
.md-main { background: transparent; }
.md-main__inner { max-width: 96rem; margin-top: 1.15rem; }
.md-sidebar { padding-top: .1rem; }
.md-sidebar--primary .md-sidebar__scrollwrap, .md-sidebar--secondary .md-sidebar__scrollwrap {
  border: 1px solid rgba(214,222,235,.9); border-radius: 16px;
  background: rgba(255,255,255,.72); box-shadow: 0 12px 35px rgba(24,40,70,.045);
  backdrop-filter: blur(16px);
}
.md-sidebar__inner { padding: .4rem; }
.md-nav { font-size: .69rem; }
.md-nav__title { color: #1b263a; font-weight: 780; }
.md-sidebar--primary .md-nav__title,
.md-sidebar--primary .md-nav__title .md-ellipsis {
  overflow: visible; text-overflow: clip; white-space: nowrap;
}
.md-sidebar--primary .md-nav__title {
  display: flex; justify-content: center; padding-right: 0; padding-left: 0;
  transform: translateX(8px);
}
.md-nav__item { margin: .04rem 0; }
.md-nav__link {
  display: flex; align-items: center; min-height: 1.72rem; padding: .22rem .42rem;
  border-radius: 8px; color: #526076;
}
.md-nav__link:is(:focus,:hover) { color: #5e4df1; background: rgba(103,88,255,.075); }
.md-nav__item .md-nav__link--active {
  color: #5745ed; font-weight: 720;
  background: linear-gradient(90deg, rgba(103,88,255,.14), rgba(25,211,209,.07));
  box-shadow: inset 2px 0 #6857ff;
}
.md-sidebar--primary .md-nav__item--section > .md-nav__link,
.md-sidebar--primary .md-nav__item--nested > .md-nav__link { color: #26334a; font-weight: 740; }
.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item > .md-nav__link {
  color: #26334a; font-weight: 740;
}
.md-sidebar--primary .md-nav__item--nested .md-nav { margin-left: .28rem; padding-left: .5rem; border-left: 1px solid #e5eaf2; }
.md-sidebar--primary .md-nav__item--nested .md-nav .md-nav__link { color: #69778c; font-size: .64rem; font-weight: 500; }
.md-sidebar--primary .md-nav__item--nested .md-nav .md-nav__link--active { color: #5745ed; font-weight: 700; }
.md-sidebar--secondary .md-nav--secondary > .md-nav__title { padding-bottom: .55rem; border-bottom: 1px solid var(--venus-line); }

.md-content { position: relative; }
.md-content__inner {
  max-width: 60rem; min-height: calc(100vh - 8rem); margin: 0 auto; padding: 2.5rem 3rem 3.2rem;
  border: 1px solid rgba(221,227,237,.95); border-radius: 18px; background: var(--venus-panel);
  box-shadow: var(--venus-shadow); backdrop-filter: blur(10px); overflow: hidden;
}
.md-content__inner::before {
  display: block; width: auto; height: 3px; margin: -2.5rem -3rem 2.15rem;
  background: linear-gradient(90deg, #6758ff 0%, #8766ff 38%, #1bcfd0 100%); content: "";
}
.md-typeset { color: var(--venus-ink); font-size: .8rem; line-height: 1.82; }
.md-typeset h1 { margin: 0 0 1.35rem; color: #111b2d; font-size: 2.15em; font-weight: 800; letter-spacing: -.035em; }
.md-typeset h1::after { display: block; width: 2.8rem; height: 3px; margin-top: .75rem; border-radius: 999px; background: linear-gradient(90deg,#6857ff,#22c8ca); content: ""; }
.md-typeset h2 { margin-top: 2.5rem; padding-top: 1.15rem; border-top: 1px solid var(--venus-line); color: #1b2840; font-weight: 760; letter-spacing: -.015em; }
.md-typeset h3 { color: #263550; font-weight: 720; }
.md-typeset a { color: #5b49ec; font-weight: 600; text-decoration-color: rgba(91,73,236,.25); text-underline-offset: .14em; }
.md-typeset a:hover { color: #12aeb1; }
.md-typeset img { border: 1px solid #e1e6ef; border-radius: 12px; box-shadow: 0 12px 32px rgba(20,35,60,.09); }
.md-typeset blockquote {
  margin-right: 0; margin-left: 0; padding: .8rem 1rem; border: 1px solid #e2e7f2;
  border-left: .2rem solid #6958ff; border-radius: 10px; background: linear-gradient(110deg,#f7f6ff,#f5fbfc); color: #5f6d82;
}
.md-typeset code { border-radius: 5px; background: #f0f2f8; color: #5443d9; }
.md-typeset pre > code { border: 1px solid #dfe5ef; border-radius: 10px; color: #dbe6f8; background: #0b1526; }
.md-typeset table:not([class]) { display: table!important; width: auto!important; max-width: 100%; margin: 1em auto!important; border: 1px solid var(--venus-line); border-radius: 11px; border-collapse: separate; border-spacing: 0; overflow: hidden; box-shadow: 0 8px 24px rgba(22,36,64,.05); text-align: center; }
.md-typeset table:not([class]) th,.md-typeset table:not([class]) td { border-right: 1px solid var(--venus-line); border-bottom: 1px solid var(--venus-line); border-left: 0; text-align: center; vertical-align: middle; }
.md-typeset table:not([class]) th:last-child,.md-typeset table:not([class]) td:last-child { border-right: 0; }
.md-typeset table:not([class]) tr:last-child td { border-bottom: 0; }
.md-typeset table:not([class]) th { color: #263550; background: linear-gradient(180deg,#f6f5ff,#f2f7fa); }
.md-typeset .admonition,.md-typeset details { border-radius: 10px; box-shadow: 0 8px 22px rgba(26,42,72,.055); }

/* Per-page Markdown copy action. */
.manual-copy-markdown { position: sticky; z-index: 3; top: 4.25rem; display: flex; justify-content: flex-end; height: 0; pointer-events: none; }
.manual-copy-markdown__button {
  display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; min-width: 2.2rem; min-height: 2.15rem;
  padding: 0; border: 1px solid #d9dff0; border-radius: 10px; color: #624ff1; background: rgba(255,255,255,.94);
  box-shadow: 0 10px 28px rgba(26,39,67,.1); cursor: pointer; pointer-events: auto;
  transform: translateY(calc(-1.65rem - 70px));
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.manual-copy-markdown__button:hover { border-color: #735fff; box-shadow: 0 12px 30px rgba(95,76,244,.18); transform: translateY(calc(-1.75rem - 70px)); }
.manual-copy-markdown__button[data-copy-state="success"] { border-color: #24b99b; color: #119c80; }
.manual-copy-markdown__button[data-copy-state="error"] { border-color: #e58b8b; color: #c64a4a; }
.manual-copy-markdown__icon { width: .88rem; height: .88rem; background: currentColor; mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>') center/contain no-repeat; }
.manual-copy-markdown__label,.manual-copy-markdown__source { display: none!important; }

/* Embedded assistant, retaining v0.8.2 behavior with the new visual language. */
iframe[data-manual-chat-widget="true"] { filter: drop-shadow(0 14px 26px rgba(76,59,221,.28)); }
#chat-win { border: 1px solid rgba(126,111,255,.2)!important; border-radius: 18px; box-shadow: 0 28px 80px rgba(6,15,31,.24); overflow: hidden; }

.md-footer { background: transparent; }
.md-footer-meta {
  color: #294565;
  background: linear-gradient(100deg, #edf4ff 0%, #e6e7ff 48%, #dceeff 100%);
  border-top: 1px solid #bdd2f5;
  box-shadow: 0 -8px 26px rgba(79,111,164,.1), inset 0 1px rgba(255,255,255,.82);
}
.md-footer-meta a, .md-footer-meta .md-footer-meta__inner { color: #294565; }
.md-footer .md-footer__inner.md-grid {
  width: calc(100% - 2rem);
  max-width: 60rem;
  margin: 0 auto;
  padding: 0;
  align-items: stretch;
  gap: .75rem;
}
.md-footer .md-footer__link {
  flex: 0 0 calc(50% - .375rem - 10px);
  width: calc(50% - .375rem - 10px);
  max-width: calc(50% - .375rem - 10px);
  min-height: 3.6rem;
  margin: 0;
  padding: .45rem 1rem;
  border: 1px solid #dde3ed;
  border-radius: 14px;
  color: #5d4bed;
  background: rgba(255,255,255,.86);
  box-shadow: 0 10px 30px rgba(20,34,58,.06);
}
.md-footer .md-footer__link--prev { justify-content:flex-start; margin-right:auto; padding-left:.85rem; text-align:left; }
.md-footer .md-footer__link--next { justify-content:flex-end; margin-left:auto; padding-right:.85rem; text-align:right; }
.md-footer .md-footer__button { flex:0 0 auto; width:1.2rem; margin:0 .45rem; }
.md-footer .md-footer__title {
  display:flex;
  flex:0 1 auto;
  align-items:center;
  gap:.42rem;
  min-width:0;
  overflow:hidden;
  font-size:.72rem;
  line-height:1.25;
  white-space:nowrap;
}
.md-footer .md-footer__direction { flex:0 0 auto; margin:0; font-size:.6rem; white-space:nowrap; }
.md-footer .md-footer__title .md-ellipsis { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.md-footer__link:hover { color: #11aeb1; background: #fff; }
.md-footer__title { color: #172033; }
.md-footer__direction { color: #748197; }

@media screen and (min-width:76.25em) {
  .md-search { display:block; }
  .md-header__button[for="__search"] { display:none; }
  .manual-top-nav { display:inline-flex; }
  .md-sidebar--primary { width:13.2rem; }
  .md-sidebar--secondary { width:13rem; }
  .md-content { margin-right:.7rem; margin-left:.7rem; }
  .md-main__inner { padding-bottom:calc(3.6rem + 10px); }
  .md-footer .md-footer__inner.md-grid {
    --manual-footer-width:min(60rem, calc(100vw - 34.3rem));
    position:relative;
    z-index:2;
    width:var(--manual-footer-width);
    max-width:60rem;
    margin-right:0;
    margin-bottom:-3.6rem;
    margin-left:50%;
    transform:translate(calc(-50% + .25rem), -100%);
  }
}
@media screen and (max-width:94em) and (min-width:76.25em) {
  .md-header__title { max-width:12.5rem; }
  .md-search { flex-basis:11rem; min-width:8.5rem; }
  .manual-top-nav { gap:.48rem; }
  .manual-top-nav__label { display:none; }
}
@media screen and (max-width:76.1875em) {
  .md-header__title { flex:1 1 auto; min-width:0; }
  .md-search { flex:0 0 auto; min-width:0; margin-left:0; }
  .md-main__inner { margin-top:0; }
  .md-content__inner { max-width:none; border-right:0; border-left:0; border-radius:0; box-shadow:none; }
  .md-footer .md-footer__inner.md-grid { width:calc(100% - 2rem); max-width:none; margin:10px 1rem 0; transform:none; }
}
@media screen and (max-width:44.9375em) {
  .md-content__inner { padding:1.5rem 1rem 2.5rem; }
  .md-content__inner::before { margin:-1.5rem -1rem 1.35rem; }
  .md-typeset h1 { font-size:1.85em; }
  .manual-copy-markdown { top:3.5rem; }
  .manual-copy-markdown__button { transform:translateY(calc(-1rem - 70px)); }
  .manual-copy-markdown__button:hover { transform:translateY(calc(-1.08rem - 70px)); }
  #chat-win { right:10px!important; bottom:92px!important; width:calc(100vw - 20px)!important; height:min(72vh,500px)!important; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }
