/* ============================================================
   MassBattle Docs — design system
   MassBattle 文档站 — 设计系统

   Reading model: a warm paper ground, one white reading sheet on top of it, and a single
   ink-and-vermillion accent. Type carries the hierarchy; borders stay hairlines so structure
   never turns into a grid of boxes. Numbers, labels and dates are mono, which is what makes a
   technical page read as an instrument rather than a blog post.
   | 阅读模型：暖纸底 + 一张白色正文纸 + 唯一的墨色/朱红重音。层级交给字号，边框只用发丝线，
   免得满屏都是盒子；数字、标签、日期走等宽字体——这是技术页读起来像仪表面板的关键。
   ============================================================ */

:root {
  /* ground and ink | 底色与墨色 */
  --paper: #f6f4f0;
  --surface: #ffffff;
  /* faint is the lightest text on white; it must stay above 4.5:1 (10.5px labels use it).
     | faint 是白底上最浅的字，必须保持 4.5:1 以上（10.5px 的标签用它）。 */
  --ink: #16181c;
  --ink-soft: #525a68;
  --ink-faint: #656c79;
  --line: #e4e1da;
  --line-strong: #c9c4ba;

  /* accent: one signal colour for the whole site | 全站唯一的信号色 */
  --accent: #c2410c;
  --accent-ink: #8f2f08;
  --accent-wash: #fdf0e7;
  --accent-on-dark: #ff7a45;

  /* semantic | 语义色 */
  --ok: #1f6b3a;
  --warn: #8a5a00;
  --danger: #a3241c;

  /* code | 代码 */
  --code-bg: #f2efe9;
  --code-text: #7a2e0c;
  --code-panel: #15181d;
  --code-panel-text: #e9e5dd;

  /* type | 字体 */
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "Courier New", monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, "Microsoft YaHei", "PingFang SC",
          "Helvetica Neue", Arial, sans-serif;
  --display: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", "Microsoft YaHei",
             "PingFang SC", Arial, sans-serif;

  /* geometry | 几何 */
  --topbar-h: 64px;
  --sidebar-w: 288px;
  --radius: 3px;
  --sheet-w: 880px;
  --landing-w: 1200px;

  /* aliases kept for the page-local style blocks (mv-, ns-) | 供页面内样式块使用的别名 */
  --accent-soft: var(--accent-wash);
  --content-bg: var(--surface);
  --text-main: var(--ink);
  --text-soft: var(--ink-soft);
  --border: var(--line);
  --sidebar-bg: var(--paper);
  --sidebar-bg-hover: #ece8e1;
  --sidebar-text: #4c525d;
  --sidebar-text-active: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--topbar-h);
  /* Reading surfaces are white. The warm paper is a rail under the sidebar and the ground for the
     marketing pages — putting every article on a bordered white sheet made the site read as Word.
     | 阅读区是白的。暖纸只做侧栏的底与营销页的地——每篇文章都放在一张带边框的白纸上，读起来就是 Word。 */
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- language switching | 语言切换 ----------
   Default: English. html[data-lang="zh"] switches to Chinese. Both rules are (0,2,1): they must
   be the only display rules touching .zh/.en, so hidden content never leaks through a block rule. */
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .zh { display: none; }
html[data-lang="zh"] .en, html[data-lang="zh-TW"] .en { display: none; }
html[data-lang="zh-TW"] p.zh { display: block; }
html[data-lang="zh-TW"] span.zh { display: inline; }
html[data-lang="zh-TW"] div.zh { display: block; }
/* bilingual headings: "中文 <span class="en-sub">English</span>" -> one language */
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .h-zh { display: none; }
html[data-lang="zh"] .en-sub, html[data-lang="zh-TW"] .en-sub { display: none; }
html[data-lang="zh-TW"] .h-zh { display: inline; }
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) #content h2 .en-sub { margin-left: 0; }
/* English mode: the Chinese half is hidden, so the English subtitle IS the heading. Without this
   every section and card title collapses into the small grey subtitle.
   | 英文模式下中文半被隐藏，英文副标题就顶上来当标题；没有这段，所有章节标题与卡名都会缩成灰小字。 */
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) #content h2 .en-sub,
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) #content h3 .en-sub,
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) #content h4 .en-sub,
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) h1.page-title .en-sub,
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .card h3 .en-sub,
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .callout .en-sub {
  display: block; font-size: inherit; font-weight: inherit; color: inherit;
  margin: 0; letter-spacing: inherit; line-height: inherit;
}

/* ---------- top bar | 顶栏 ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: #101215; color: #e8e9eb; z-index: 100;
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  border-bottom: 1px solid #22252b;
}
#topbar .brand {
  display: flex; align-items: center; gap: 9px;
  color: #fff; text-decoration: none; font-family: var(--display);
  font-weight: 600; font-size: 15.5px; letter-spacing: -.005em; white-space: nowrap;
}
#topbar .brand svg { display: block; flex-shrink: 0; }
#topbar .brand .accent { color: #fff; }
#topbar .brand-ver {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: #7c828d;
  border: 1px solid #2b2f36; border-radius: 2px; padding: 1px 6px; line-height: 1.6;
}
#topbar .crumb { display: none; }
#topbar .crumb a { color: #9aa1ac; text-decoration: none; }
#topbar .crumb a:hover { color: #fff; }
#topbar .crumb .sep { margin: 0 6px; color: #3a3f47; }
#topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

#search {
  width: 220px; height: 32px; border-radius: 2px; padding: 0 11px;
  border: 1px solid #2b2f36; background: #171a1f; color: #e8e9eb;
  font-family: var(--sans); font-size: 12.5px; outline: none;
  transition: border-color .15s, background .15s;
}
#search:focus { border-color: var(--accent-on-dark); background: #1c2027; }
#search::placeholder { color: #6b727d; }

#lang-toggle { display: none; }
.lang-wrap { position: relative; }
.lang-btn {
  height: 32px; padding: 0 11px; border-radius: 2px; cursor: pointer;
  border: 1px solid #2b2f36; background: #171a1f; color: #c3c8d0;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: 6px;
}
.lang-btn:hover { border-color: #4a5058; color: #fff; }
.lang-btn svg { display: block; opacity: .75; }
.lang-menu {
  display: none; position: absolute; top: 38px; right: 0; min-width: 150px;
  background: #171a1f; border: 1px solid #2b2f36; border-radius: 2px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); overflow: hidden; z-index: 120;
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%; text-align: left; padding: 7px 12px;
  background: none; border: 0; cursor: pointer; color: #c3c8d0;
  font-family: var(--sans); font-size: 13px;
}
.lang-menu button:hover { background: #22262d; color: #fff; }
.lang-menu button.active { color: var(--accent-on-dark); font-weight: 600; }
html[dir="rtl"] .lang-menu { right: auto; left: 0; }

#menu-btn {
  display: none; height: 32px; padding: 0 11px; border-radius: 2px; cursor: pointer;
  border: 1px solid #2b2f36; background: #171a1f; color: #c3c8d0; font-size: 13px;
}

/* ---------- primary tabs | 顶部主标签 ----------
   The site is not docs-only: six destinations share one chrome. Tabs are built by site.js so a new
   page never means editing three hundred headers.
   | 站点不止文档：六个去处共用一套外框。标签由 site.js 生成，加页面不必改三百个头部。 */
#topbar .site-tabs { display: flex; align-items: stretch; gap: 2px; min-width: 0; }
#topbar .site-tabs a {
  position: relative; display: flex; align-items: center;
  height: calc(var(--topbar-h) - 1px); padding: 0 11px;
  color: #9aa1ac; text-decoration: none; font-size: 13px; font-weight: 500; letter-spacing: .01em;
  white-space: nowrap;
}
#topbar .site-tabs a:hover { color: #fff; }
#topbar .site-tabs a.active { color: #fff; font-weight: 600; }
#topbar .site-tabs a.active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 0; height: 2px;
  background: var(--accent-on-dark);
}

/* ---------- sidebar | 侧栏目录 ---------- */
body:not(.no-sidebar) {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  align-items: start;
}
/* The third track is `auto`, not a fixed width: site.js hides the TOC on pages with fewer than two
   headings, and a fixed track would leave a blank rail behind.
   | 第三列用 auto 而不是定宽：目录在标题太少的页面会被隐藏，定宽会留下一条空栏。 */
@media (min-width: 1300px) {
  /* Documentation hugs the rail: nav, then text, then its index, with the slack left on the right.
     Centring the middle track would open a blank gap on both sides of the text and push the index
     away from the content it indexes.
     | 文档页贴着侧栏排：导航、正文、页内目录依次靠左，余量全部留在右侧。
     中间列居中会在正文两侧各开一道空白，还让目录离它索引的正文很远。 */
  body:not(.no-sidebar) {
    grid-template-columns: var(--sidebar-w) minmax(0, var(--sheet-w)) 252px;
    justify-content: start;
  }
}
body.no-sidebar { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
/* Non-documentation pages carry no API tree: the sidebar is in the DOM on every page (site.js
   builds it once) but only the documentation pages give it a column.
   | 非文档页没有 API 树：侧栏在每个页面都在 DOM 里，但只有文档页给它一列。 */
body.no-sidebar #sidebar { display: none; }
/* No rail means nothing for the drawer button to open. | 没有侧栏，抽屉按钮没有可开的东西。 */
body.no-sidebar #menu-btn { display: none; }
@media (min-width: 1300px) {
  /* Same reason as the article rule below: centre the content and its index as one block so the TOC
     never drifts off to the window edge on a wide monitor.
     | 同下：正文和目录当成一块居中，宽屏上目录不会飘到窗口边缘。 */
  body.no-sidebar { grid-template-columns: minmax(0, var(--landing-w)) 252px; justify-content: center; }
  /* An article has no sidebar column to hold the left edge, so centre the text and its index as one
     group: the TOC then sits beside the paragraph measure instead of drifting to the window edge
     with half a screen of white in between.
     | 文章页左边没有侧栏可依托，所以把正文和目录当成一组居中：
     目录贴着行宽，而不是飘到窗口最右边、中间空出半个屏。 */
  body.reading { grid-template-columns: minmax(0, 880px) 252px; justify-content: center; }
}

#sidebar {
  position: sticky; top: var(--topbar-h); align-self: start;
  height: calc(100vh - var(--topbar-h));
  background: var(--paper); border-right: 1px solid var(--line);
  overflow-y: auto; padding: 18px 0 48px;
  scrollbar-width: thin; scrollbar-color: #d3cec5 transparent;
}
#sidebar::-webkit-scrollbar { width: 8px; }
#sidebar::-webkit-scrollbar-thumb { background: #d8d3ca; border-radius: 4px; }

.sidebar-module { margin-bottom: 1px; }
.sidebar-module-head {
  display: flex; align-items: center; gap: 6px; padding: 8px 18px 6px;
  color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 13.5px;
  cursor: pointer; user-select: none;
}
.sidebar-module-head:hover { color: var(--accent-ink); }
.sidebar-module-head .arrow {
  font-size: 22px; width: 22px; text-align: center; line-height: 1;
  color: var(--ink-faint); transition: transform .15s; flex-shrink: 0;
}
.sidebar-module.collapsed .arrow { transform: rotate(-90deg); }
.sidebar-module.collapsed > .sidebar-group { display: none; }
.sidebar-module-head .count {
  margin-left: auto; color: var(--ink-faint);
  font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .03em;
}

.sidebar-group { margin: 0; }
.sidebar-group-head {
  padding: 10px 18px 4px 30px; color: var(--ink-faint);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 4px;
}
.sidebar-group-head:hover { color: var(--ink-soft); }
.sidebar-group-head .arrow { font-size: 18px; width: 18px; text-align: center; line-height: 1; transition: transform .15s; }
.sidebar-group.collapsed .arrow { transform: rotate(-90deg); }
/* The list is a child of its group, not a sibling, so only the child form matches. */
.sidebar-group.collapsed > .sidebar-items { display: none; }

.sidebar-items { list-style: none; margin: 0; padding: 0 0 4px; }
.sidebar-items li { margin: 0; }
.sidebar-items a {
  display: block; padding: 3px 14px 3px 38px; color: var(--sidebar-text);
  text-decoration: none; font-size: 12.5px; line-height: 1.5;
  border-left: 2px solid transparent;
  /* Type names run to 32 characters; the rail is sized to hold one without hyphenating it.
     | 类型名能到 32 个字符；侧栏宽度按一行放下来定，不要从词中间断开。 */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-items a:hover { background: var(--sidebar-bg-hover); color: var(--ink); }
.sidebar-items a.active {
  background: var(--sidebar-bg-hover); color: var(--ink); font-weight: 600;
  border-left-color: var(--accent);
}
.sidebar-items a .pending { color: var(--accent); font-size: 10px; margin-left: 4px; }

/* ---------- reading sheet | 正文纸 ---------- */
#content {
  width: 100%; max-width: var(--sheet-w);
  margin: 0 auto; padding: 40px 0 110px;
  min-height: calc(100vh - var(--topbar-h));
}
/* Inner breathing room lives on the children so a full-bleed element (card art, table) can still
   reach the sheet edge when it wants to.
   | 内边距加在子元素上，卡片图、表格想出血到纸张边缘时还能做到。 */
#content > * { padding-left: 44px; padding-right: 44px; }

h1.page-title {
  font-family: var(--display); font-size: 33px; font-weight: 600; line-height: 1.12;
  letter-spacing: -.022em; margin: 0 0 8px;
}
h1.page-title .en-sub { font-weight: 400; color: var(--ink-faint); }

.file-path {
  color: var(--ink-faint); font-size: 12px; margin: 2px 0 26px;
  font-family: var(--mono); letter-spacing: .01em;
}
/* ---------- series pointer | 系列指引 ----------
   Every post opens by saying what the series is for and where the rules it keeps coming from are.
   A hairline and one sentence: it is a signpost, not a callout box.
   | 每篇开头都交代这个系列是干什么的、它遵守的规矩写在哪。一条细线加一句话，是路标，不是提示框。 */
#content > .series-note {
  margin: 0 0 32px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 13px; line-height: 1.8; color: var(--ink-faint);
}
.series-note .series-label {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink); margin-right: 10px;
}
.series-note a { color: var(--ink); text-decoration-color: var(--line-strong); }
.series-note a:hover { color: var(--accent-ink); }

.type-badges { margin: 12px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  display: inline-block; padding: 1px 8px; border-radius: 2px; border: 1px solid var(--line-strong);
  font-family: var(--mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.75; color: var(--ink-soft);
  background: var(--surface);
}
.badge-class      { border-color: #d9c9f0; color: #6b3fae; }
.badge-struct     { border-color: #cfdcf2; color: #2a5591; }
.badge-enum       { border-color: #c6e2cf; color: #1f6b3a; }
.badge-interface  { border-color: #c3e2e6; color: #136470; }
.badge-processor  { border-color: #e8d5b8; color: #8a5a00; }
.badge-subsystem  { border-color: #ecccd6; color: #9a2c48; }
.badge-task       { border-color: #dfe2bd; color: #5f6410; }
.badge-deprecated { color: var(--ink-faint); text-decoration: line-through; }
.badge-file       { color: var(--ink-faint); font-weight: 500; }

/* ---------- sections and headings | 章节与标题 ---------- */
#content section { margin: 44px 0; }
#content section:first-of-type { margin-top: 30px; }
#content h2 {
  font-family: var(--display); font-size: 24px; font-weight: 600; line-height: 1.28;
  letter-spacing: -.016em; margin: 0 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); scroll-margin-top: 84px;
}
#content h2 .en-sub {
  font-size: 13px; font-weight: 400; color: var(--ink-faint);
  margin-left: 10px; letter-spacing: 0;
}
#content h3 {
  font-family: var(--display); font-size: 17.5px; font-weight: 600; line-height: 1.42;
  letter-spacing: -.008em; margin: 32px 0 8px; scroll-margin-top: 84px;
}
#content h4 {
  font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  margin: 24px 0 8px; padding: 2px 9px; background: var(--code-bg); border-left: 2px solid var(--line-strong);
  display: inline-block; scroll-margin-top: 84px;
}
#content h5 {
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint); margin: 20px 0 6px;
}

#content p { margin: 0 0 14px; }
/* 76ch is roughly 76 Latin characters. Chinese needs its own number: `ch` measures the Latin
   zero, so 76ch reads as only ~38 glyphs a line. 45em is where CJK sits comfortably.
   | 76ch ≈ 76 个拉丁字符；中文要单独给值，因为 `ch` 量的是拉丁零宽，76ch 在中文里只有 38 字一行。 */
#content p, #content li { max-width: 76ch; }
#content ul, #content ol { padding-left: 22px; margin: 0 0 14px; }
#content li { margin: 5px 0; }
#content strong, #content b { font-weight: 650; }

/* Links carry ink and a hairline underline: the one accent per screen is spent on the CTA or the
   active rail, not on every paragraph. | 链接用墨色加发丝下划线：每屏那点朱红留给主按钮与当前条目。 */
#content a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong);
             text-underline-offset: 2px; text-decoration-thickness: 1px; }
#content a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }

/* ---------- member / method entries | 成员与方法条目 ----------
   API pages carry hundreds of these. A bordered card each would turn the page into a brick wall,
   so an entry is a hairline rule plus a mono name.
   | API 页动辄几百条，每条都做成盒子会砌成一堵墙；所以条目只是一条发丝线加等宽名字。 */
.member, .method {
  border-top: 1px solid var(--line); padding: 12px 0 2px; margin: 16px 0 0; background: none;
}
.member .member-name, .method .method-name {
  font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--ink);
}
.member .member-type, .method .method-type {
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft);
  margin-left: 8px; background: var(--code-bg); padding: 1px 7px; border-radius: 2px;
}
.member .desc, .method .desc { margin: 8px 0 0; }

/* ---------- tables | 表格 ----------
   Horizontal rules only. A full grid on a dense API table is noise; the row is the unit. */
table {
  border-collapse: collapse; width: 100%; margin: 12px 0 22px; font-size: 13.5px;
}
table th {
  text-align: left; padding: 8px 12px; font-family: var(--mono); font-size: 10.5px;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: none;
}
table td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table tbody tr:last-child td { border-bottom: 1px solid var(--line-strong); }
table td code, p code, li code, .desc code, .member code, .method code {
  font-family: var(--mono); font-size: 12.5px; background: var(--code-bg);
  color: var(--code-text); padding: 1px 5px; border-radius: 2px;
}

/* ---------- inheritance tree | 继承树 ---------- */
.inherit-tree {
  font-family: var(--mono); font-size: 13px; background: var(--code-bg);
  padding: 10px 14px; border-radius: var(--radius); overflow-x: auto;
  white-space: nowrap; border-left: 2px solid var(--line-strong);
}
.inherit-tree .arrow { color: var(--ink-faint); margin: 0 8px; }

/* ---------- callouts | 提示块 ---------- */
.callout {
  border-left: 2px solid var(--accent); background: var(--accent-wash);
  padding: 12px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 18px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn); background: #fbf3e0; }
.callout.info { border-left-color: var(--ok); background: #eef5ef; }

/* ---------- page TOC | 页内目录 ---------- */
#page-toc {
  position: sticky; top: var(--topbar-h); align-self: start;
  width: 252px;
  max-height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  padding: 46px 26px 40px 4px; font-size: 12.5px; line-height: 1.6;
  scrollbar-width: thin; scrollbar-color: #d3cec5 transparent;
}
@media (max-width: 1299px) { #page-toc { display: none; } }
#page-toc .toc-title {
  font-family: var(--mono); font-weight: 600; color: var(--ink-faint); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px;
}
#page-toc a {
  color: var(--ink-soft); text-decoration: none; display: block;
  padding: 3px 0 3px 12px; border-left: 1px solid var(--line);
  transition: color .12s, border-color .12s;
}
#page-toc a:hover { color: var(--ink); border-left-color: var(--line-strong); }
#page-toc a.lv3 { padding-left: 24px; font-size: 12px; color: var(--ink-faint); }
#page-toc a.active { color: var(--accent-ink); font-weight: 600; border-left: 2px solid var(--accent); padding-left: 11px; }

/* ---------- landing components | 首页组件 ----------
   Confined to the marketing pages: hero, media slot, stat strip, buttons. Docs pages never use them. */
body.no-sidebar #content {
  border: 0; background: none; max-width: 980px; padding: 56px 40px 110px;
}
/* The warm ground belongs to the marketing pages — the front page, the blog index and contact.
   Guides and articles read on white. | 暖底只给营销页：首页、博客索引、联系页；指南与文章读在白上。 */
body[data-page="Home"], body[data-page="Contact"],
body[data-page="Blog"]:not(.reading) { background: var(--paper); }
body[data-page="Home"] #content,
body[data-page="Blog"]:not(.reading) #content { max-width: var(--landing-w); }
body.no-sidebar #content > * { padding-left: 0; padding-right: 0; }
body.no-sidebar #content section { margin: 0 0 78px; }
body.no-sidebar #content section:first-of-type { margin-top: 0; }
body.no-sidebar #content { counter-reset: sect; }
body.no-sidebar #content section > h2 {
  font-size: 28px; border-bottom: 0; padding-bottom: 0; margin-bottom: 22px;
  position: relative; padding-top: 20px;
}
/* Section number as a hairline eyebrow: language-neutral, and it gives the landing a spine.
   | 章节编号做成发丝线上的眉标：不涉及语言，同时给首页一条脊梁。 */
body.no-sidebar #content section > h2::before {
  counter-increment: sect;
  content: counter(sect, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .12em;
  color: var(--accent);
}
body.no-sidebar #content section > h2::after {
  content: ""; position: absolute; top: 6px; left: 32px; right: 0; height: 1px; background: var(--line);
}
body.no-sidebar #content section > h2 .en-sub { font-size: 13px; color: var(--ink-faint); margin-left: 12px; }

/* ---------- article pages | 文章页 ----------
   A blog post is a reading page, not a landing page: one white sheet whose width is the paragraph
   measure, so the rule under each heading stops where the text stops instead of running a third of
   a screen past it. | 博客正文是阅读页而不是落地页：一张白纸，宽度就是正文行宽——章节横线在文字
   结束处收住，不会拖出去三分之一屏。 */
body.reading #content { padding: 46px 0 96px; }
body.reading #content > * { padding-left: 44px; padding-right: 44px; }
body.reading #content section { margin: 0 0 54px; }
body.reading #content section:first-of-type { margin-top: 20px; }

.hero { padding: 0; }
.hero h1 {
  font-family: var(--display); font-size: clamp(38px, 4.4vw, 56px); font-weight: 600;
  line-height: 1.06; letter-spacing: -.028em; margin: 16px 0 18px; max-width: 22ch;
}
.hero .sub { color: var(--ink-soft); font-size: 16px; max-width: 720px; }
/* In English the subtitle IS the headline, so it takes the headline size instead of the small-sub size. */
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .hero h1 .en-sub {
  display: block; font-size: clamp(38px, 4.4vw, 56px); font-weight: 600; color: var(--ink);
  margin: 0; letter-spacing: -.028em; line-height: 1.06;
}
html[data-lang="zh"] .hero h1 .en-sub, html[data-lang="zh-TW"] .hero h1 .en-sub { display: none; }
.hero-lead { font-size: 16.5px; line-height: 1.7; max-width: 64ch; color: var(--ink-soft); margin: 0; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.chip {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 2px;
  color: var(--ink-soft); background: none;
}
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px;
  border-radius: 2px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: .005em; text-decoration: none;
  transition: border-color .15s, background .15s, transform .12s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; border-color: #000; color: #fff; }
.btn-primary::after {
  content: ""; width: 7px; height: 7px; border-top: 1.5px solid var(--accent-on-dark);
  border-right: 1.5px solid var(--accent-on-dark); transform: rotate(45deg); margin-left: 2px;
}
.btn-primary:hover::after { transform: rotate(45deg) translate(1px, -1px); }
/* The content-wide link colour is an ID selector, so buttons must restate their own. */
#content a.btn { color: var(--ink); text-decoration: none; }
#content a.btn:hover { color: var(--ink); }
#content a.btn-primary, #content a.btn-primary:hover { color: #fff; }

/* Showreel slot: framed like a slate instead of a gradient blob. | 宣传片位：做成场记板式的画面框。 */
.media-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: radial-gradient(120% 90% at 22% 12%, #1d222b 0%, #101216 62%, #0b0d10 100%);
  border: 1px solid #262b33;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #9aa1ac; margin: 34px 0 0;
}
.media-frame::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255,255,255,.07);
  border-radius: 2px; pointer-events: none;
}
.media-frame::after {
  content: "16:9 · SHOWREEL"; position: absolute; left: 24px; bottom: 18px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: #5d646e;
}
.media-frame p { margin: 16px 0 0; font-size: 12.5px; color: #8a919c; }
.media-play {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid #4a5058;
  display: flex; align-items: center; justify-content: center; font-size: 16px; color: #e8e9eb;
  padding-left: 3px; transition: border-color .2s, color .2s;
}
.media-frame:hover .media-play { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }

/* Stat strip: ruled, not boxed. | 数字条：用横线分隔，不用盒子。 */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
  margin: 34px 0 0;
}
.stat { padding: 18px 20px 16px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block; font-family: var(--display); font-size: 34px; font-weight: 600;
  letter-spacing: -.02em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat span {
  display: block; margin-top: 4px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
}

/* ---------- cards | 卡片 ---------- */
/* 240 rather than 280: the reading-width pages (880) get three columns instead of two, so a
   three-card group fills one row instead of leaving half a row empty.
   | 用 240 而不是 280：880 宽的阅读页能排三列，三张卡就占满一行，不会空出半行。 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 0; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 0; background: var(--surface);
  text-decoration: none; color: var(--ink); overflow: hidden;
  transition: border-color .15s, box-shadow .18s, transform .18s;
  display: flex; flex-direction: column;
}
.card > *:not(.card-art) { padding-left: 20px; padding-right: 20px; }
.card > *:not(.card-art):first-child { padding-top: 20px; }
/* Body text after a bleeding card image needs its own top gap: the image is the first child, so
   the :first-child rule above never sees the paragraph.
   | 出血卡图之后的正文要自己留出上间距：图是第一子元素，上面那条 :first-child 规则看不到段落。 */
.card > .card-art + * { padding-top: 16px; }
.card > *:last-child { padding-bottom: 20px; }
.card h3 {
  font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -.005em;
  line-height: 1.35; margin: 0 0 8px; color: var(--ink);
}
.card h3 .en-sub { display: block; font-size: 12px; font-weight: 400; color: var(--ink-faint); margin-top: 3px; }
.card p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); }
.card .card-count {
  font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .06em;
  margin-left: auto; align-self: flex-start;
}
/* Only cards that actually go somewhere get the hover lift and the pointer: an info card that
   highlights on hover reads as clickable and then does nothing. | 只有能点的卡片才有悬停高亮与手型。 */
a.card:hover, .card[data-href]:hover {
  border-color: var(--ink); transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(22,24,28,.5);
}
.card[data-href] { cursor: pointer; }
/* The inner link of a clickable card must not paint itself as a second button. */
.card a, .card a:hover { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); }

/* asymmetric landing grids | 首页非对称栅格 */
#home-why .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#home-caps .card-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#home-caps .card { grid-column: span 2; }
#home-caps .card:nth-child(4), #home-caps .card:nth-child(5) { grid-column: span 3; }
#home-120 .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#home-paths .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- blog cards | 博客卡片 ----------
   Card art bleeds to the card edge, so the card must clip it at its own radius. The title is set
   ON the artwork: real text, so it stays crisp at any zoom and follows the language switch — the
   illustration underneath is text-free for exactly that reason. */
.card-art { position: relative; display: block; margin: 0; padding: 0; background: #10151c; line-height: 0; }
.card-art img { display: block; width: 100%; height: auto; }
.card-art::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58%;
  background: linear-gradient(to top, rgba(9,11,15,.97) 0%, rgba(9,11,15,.78) 44%, rgba(9,11,15,0) 100%);
  pointer-events: none;
}
/* `#content h3` sets the heading colour and size with an ID selector, so these rules carry the
   same prefix to win it: the title sits on a dark image, not on the page background. */
#content .card-art .card-title {
  position: absolute; left: 18px; right: 18px; bottom: 12px; margin: 0; z-index: 2;
  padding: 0; color: #ffffff; font-family: var(--display); font-size: 19px; font-weight: 600;
  line-height: 1.2; letter-spacing: -.01em; text-shadow: 0 1px 16px rgba(0,0,0,.7);
}
#content .card-art .card-title .en-sub {
  display: block; margin: 4px 0 0; font-size: 12.5px; font-weight: 400;
  color: rgba(255,255,255,.8); letter-spacing: 0;
}
/* One language only: the Chinese half is the title in Chinese modes, so the English subtitle is
   gone there rather than sitting under it. | 中文模式只留中文。 */
html[data-lang="zh"] #content .card-art .card-title .en-sub,
html[data-lang="zh-TW"] #content .card-art .card-title .en-sub { display: none; }
/* English mode: the subtitle IS the headline, at headline size. */
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) #content .card-art .card-title { font-size: 12.5px; }
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) #content .card-art .card-title .en-sub {
  display: block; margin: 0; font-size: 19px; font-weight: 600; color: #ffffff;
}
/* Card footer: date and kind as a ruled meta row. | 卡脚：日期与类别做成带线的元信息行。 */
/* `#content p` sets the margin with an ID selector, so this needs one too. */
#content .card-meta {
  margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--line); max-width: none;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-faint);
}
#blog-posts .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
#blog-posts .card p:not(.card-meta) { flex: 1 1 auto; }
/* Seven modules in a two-column grid leave the seventh alone on its row; letting it span the row
   reads as a closing summary instead of a hole.
   | 七个模块排两列，最后一张会孤在一行；让它占满这一行，读起来是收尾而不是缺口。 */
body[data-page="Documentation"] .card-grid > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- author block | 作者署名 ----------
   Every article ends with the same signature and the same four channels: a reader who finishes a
   post should not have to go looking for where to ask a question. */
.post-sign {
  margin: 56px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line-strong); background: none;
}
.post-sign p { margin: 0; font-size: 13px; line-height: 1.95; color: var(--ink-soft); max-width: none; }
.post-sign .post-sign-name {
  font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink);
}
.post-sign a { color: var(--ink); text-decoration-color: var(--line-strong); }
.post-sign a:hover { color: var(--accent-ink); }

/* ---------- Chinese type | 中文排版 ----------
   The Latin settings are tuned for Latin: 15.5px/1.72 with negative heading tracking sets CJK
   glyphs too tight and too small. Chinese gets a step more size and looser leading.
   | 上面那套是按拉丁文调的：15.5px/1.72 加负字距，方块字又小又挤。中文单独加半号、放开行距。 */
html[data-lang="zh"] body, html[data-lang="zh-TW"] body { font-size: 16px; line-height: 1.85; }
html[data-lang="zh"] #content h1, html[data-lang="zh"] #content h2, html[data-lang="zh"] #content h3,
html[data-lang="zh-TW"] #content h1, html[data-lang="zh-TW"] #content h2, html[data-lang="zh-TW"] #content h3 {
  letter-spacing: 0; line-height: 1.45;
}
html[data-lang="zh"] .card p, html[data-lang="zh-TW"] .card p { font-size: 14px; line-height: 1.75; }
html[data-lang="zh"] #content p, html[data-lang="zh-TW"] #content p { margin-bottom: 16px; }
html[data-lang="zh"] #content p, html[data-lang="zh"] #content li,
html[data-lang="zh-TW"] #content p, html[data-lang="zh-TW"] #content li { max-width: 45em; }

/* ---------- diagrams | 架构图 ---------- */
.diagram-wrap {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); margin: 18px 0;
}
.diagram-toolbar {
  display: flex; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  align-items: center; flex-wrap: wrap;
}
.diagram-toolbar button {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: 2px;
  padding: 3px 11px; cursor: pointer; font-size: 12px; color: var(--ink); font-family: var(--sans);
}
.diagram-toolbar button:hover { border-color: var(--ink); }
.diagram-toolbar .hint { color: var(--ink-faint); font-size: 11px; font-family: var(--mono); letter-spacing: .04em; }
.diagram-svg-wrap { overflow: auto; max-height: 82vh; }
.diagram-svg-wrap svg { display: block; }

.dg-node { cursor: pointer; }
.dg-node rect.node-body {
  fill: #ffffff; stroke: #94a3b8; stroke-width: 1.2; rx: 3;
  transition: stroke .12s, stroke-width .12s;
}
.dg-node:hover rect.node-body { stroke: var(--accent); stroke-width: 2; }
.dg-node text.node-title { font-family: var(--mono); font-size: 12.5px; font-weight: 700; fill: #1f2937; pointer-events: none; }
.dg-node text.node-sub { font-size: 10.5px; fill: #64748b; pointer-events: none; }
.dg-edge { stroke: #cbd5e1; stroke-width: 1.4; fill: none; }
.dg-edge.arrow { marker-end: url(#arrowhead); }
.dg-edge-label { font-size: 10px; fill: #94a3b8; pointer-events: none; }
.dg-lane { fill: #f8fafc; stroke: #e2e8f0; rx: 3; }
.dg-lane-label { font-family: var(--mono); font-size: 11px; font-weight: 700; fill: #475569; letter-spacing: .06em; }

/* ---------- source pointers | 源码指引 ---------- */
.src-line { font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.src-line code { font-size: 11.5px; background: var(--code-bg); padding: 1px 5px; border-radius: 2px; }
.principle-facts { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.principle-facts summary { cursor: pointer; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.principle-facts ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; }
.principle-facts li { margin: 3px 0; }

/* ---------- command lines | 命令示例 ----------
   A list item whose paragraph holds only a command renders as a dark code panel: long JSON
   arguments then wrap predictably instead of breaking mid-token inside a sentence. */
#content li > p > code:only-child {
  display: block; white-space: pre-wrap; word-break: break-word;
  background: var(--code-panel); color: var(--code-panel-text); border-radius: var(--radius);
  padding: 12px 14px; margin: 8px 0; font-size: 12.5px; line-height: 1.7;
  border-left: 2px solid var(--accent);
}

/* ---------- utility | 工具类 ---------- */
.hidden { display: none !important; }

/* Page footer on the landing pages: one hairline and a mono line. | 首页页脚：一条发丝线加一行等宽字。 */
.site-footer {
  margin: 72px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-faint);
}
.site-footer p { margin: 0; max-width: none; }

/* ---------- responsive | 响应式 ---------- */
@media (max-width: 1100px) {
  body:not(.no-sidebar), body.no-sidebar { display: block; }
  #sidebar {
    position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w);
    height: auto; transform: translateX(-100%); transition: transform .2s; z-index: 90;
    box-shadow: 0 0 40px rgba(0,0,0,.18);
  }
  body.sidebar-open #sidebar { transform: none; }
  #page-toc { display: none; }
  #content { max-width: none; padding: 28px 20px 80px; }
  #content > * { padding-left: 0; padding-right: 0; }
  body.reading #content { padding: 28px 0 72px; }
  body.reading #content > * { padding-left: 16px; padding-right: 16px; }
  #menu-btn { display: inline-block; }
  #search { width: 130px; }
  #topbar { gap: 10px; padding: 0 12px; }
  #topbar .site-tabs { overflow-x: auto; scrollbar-width: none; }
  #topbar .site-tabs::-webkit-scrollbar { display: none; }
  #topbar .site-tabs a { height: 40px; padding: 0 8px; font-size: 12.5px; }
  #topbar .site-tabs a.active::after { left: 8px; right: 8px; }
  body.no-sidebar #content { padding: 32px 20px 80px; }
  .hero h1, html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .hero h1 .en-sub { font-size: 34px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  /* Two columns still work on a tablet; one column is for phones. | 平板还能排两列，单列是手机的。 */
  #home-why .card-grid, #home-caps .card-grid, #home-120 .card-grid,
  #home-paths .card-grid, #blog-posts .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #home-caps .card, #home-caps .card:nth-child(4), #home-caps .card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 700px) {
  #home-why .card-grid, #home-caps .card-grid, #home-120 .card-grid,
  #home-paths .card-grid, #blog-posts .card-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  #topbar .brand-ver { display: none; }
  #search { display: none; }
  body.no-sidebar #content section { margin-bottom: 64px; }
}

@media print {
  #topbar, #sidebar, #page-toc { display: none; }
  body { padding-top: 0; display: block; }
  #content { margin: 0; max-width: none; padding: 0; border: 0; }
  #content > * { padding-left: 0; padding-right: 0; }
}

/* ---------- language guard | 语言闸门 ----------
   Component rules further down set `display` on .en-sub (card subtitles, the hero), and a rule of
   equal specificity wins by coming later. So the switch is restated last: Chinese modes show the
   Chinese half only, English modes never show a Chinese half.
   | 后面的组件规则给 .en-sub 设了 display，同权重下后出现的赢。所以开关在文件最后再断言一次：
   中文模式只显示中文半边，英文模式绝不出现中文。 */
html[data-lang="zh"] .en-sub, html[data-lang="zh-TW"] .en-sub { display: none; }
html[data-lang="zh"] .en, html[data-lang="zh-TW"] .en { display: none; }
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .h-zh,
html:not([data-lang="zh"]):not([data-lang="zh-TW"]) .zh { display: none; }

/* ---------- deployment gate | 上线闸门 ----------
   Only the blog is public while the rest of the site is in progress. Gated pages replace #content
   with the notice, so the sidebar, page TOC, search box and breadcrumb would all frame an empty
   promise and are hidden; blog pages keep everything and only refuse outbound links.
   Delete this block together with the gate in site.js when the site ships.
   | 站点完工前只开放博客：未上线页面把 #content 换成提示，侧栏/页内目录/搜索/面包屑只是空架子，
   一并隐藏；博客页保持原样，只拒绝跳出博客的链接。整站发布时连同 site.js 里的闸门一起删除。 */
body.mb-gated #sidebar,
body.mb-gated #page-toc,
body.mb-gated #search,
body.mb-gated .crumb,
body.mb-gated #menu-btn { display: none; }

/* The grid still reserves the sidebar column when only the element is hidden. | 只隐藏元素时栅格仍占着侧栏列。 */
body.mb-gated { grid-template-columns: minmax(0, 1fr); }
body.mb-gated #content { max-width: none; }
#mb-gate { max-width: 760px; margin: 96px auto 0; padding: 0 0 120px; }

.mb-gate-kicker {
  font: 600 11px/1 var(--mono);
  letter-spacing: .16em;
  color: var(--accent);
}
body.mb-gated #content .mb-gate-title,
#mb-gate-overlay .mb-gate-title {
  font: 600 clamp(26px, 3.2vw, 38px)/1.22 var(--display);
  letter-spacing: 0;
  color: var(--ink);
  margin: 16px 0 0;
}
body.mb-gated #content .mb-gate-copy,
#mb-gate-overlay .mb-gate-copy {
  font: 16px/1.85 var(--sans);
  color: var(--ink-soft);
  max-width: 46em;
  margin: 18px 0 0;
}
body.mb-gated #content .mb-gate-copy b,
#mb-gate-overlay .mb-gate-copy b { color: var(--ink); font-weight: 600; }
.mb-gate-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 0;
}
.mb-gate-btn,
.mb-gate-close {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.mb-gate-btn:hover,
.mb-gate-close:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
/* #content a sets its own ink with an ID selector; restate the button's colour from here. */
body.mb-gated #content .mb-gate-btn,
#mb-gate-overlay .mb-gate-btn { color: #fff; }
.mb-gate-close { background: transparent; color: var(--accent-ink); }
#mb-gate-overlay .mb-gate-close { color: var(--accent-ink); }
.mb-gate-link {
  font: 600 13px/1 var(--sans);
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
}
.mb-gate-link:hover { border-color: var(--accent); }

#mb-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(246, 244, 240, .94);
}
.mb-gate-panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(20, 24, 28, .16);
  max-width: 560px;
  padding: 40px 40px 34px;
}
#mb-gate-overlay .mb-gate-title { font-size: clamp(22px, 2.6vw, 30px); }
