/* ==========================================================================
   U8 · 产品原型站
   后台风格的列表样式 + PRD 阅读样式。纯手写 CSS，无外部依赖。
   ========================================================================== */

:root {
  --purple: #6c4bf4;
  --purple-strong: #5636d8;
  --purple-soft: #efeaff;
  --purple-line: #ddd2ff;

  --bg: #f4f6f8;
  --bg-elev: #ffffff;
  --bg-sunken: #f7f8fa;
  --bg-code: #f5f6f8;
  --bg-head: #fafbfc;

  --ink: #14161a;
  --ink-2: #4c525c;
  --ink-3: #8a919c;

  --line: #e4e7ec;
  --line-2: #eef0f4;

  --ok: #1f8a4c;
  --ok-bg: #eafaf0;
  --ok-line: #bfe6cd;
  --warn: #8a6a11;
  --warn-bg: #fff8e8;

  --radius: 10px;
  --radius-sm: 7px;

  --shadow-1: 0 1px 2px rgba(16, 18, 24, .05);
  --shadow-2: 0 4px 14px rgba(16, 18, 24, .08);
  --shadow-3: 0 18px 44px rgba(16, 18, 24, .16);

  --topbar-h: 56px;
  --maxw: 1280px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  --purple: #9b83ff;
  --purple-strong: #b3a0ff;
  --purple-soft: #241f3d;
  --purple-line: #3a3160;

  --bg: #0e1015;
  --bg-elev: #161920;
  --bg-sunken: #1a1e26;
  --bg-code: #1c2029;
  --bg-head: #1a1e26;

  --ink: #e9ecf1;
  --ink-2: #a8b0bd;
  --ink-3: #737d8c;

  --line: #262b34;
  --line-2: #20242c;

  --ok: #56cf8a;
  --ok-bg: #14261c;
  --ok-line: #24563a;
  --warn: #e3bc63;
  --warn-bg: #2a2313;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, .45);
  --shadow-3: 0 20px 50px rgba(0, 0, 0, .6);
}

/* ---------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--purple); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

kbd {
  font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px;
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--ink-3);
}

/* --------------------------------------------------------------- topbar -- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: var(--maxw); margin: 0 auto; height: var(--topbar-h);
  padding: 0 24px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, var(--purple) 0%, #8f6ffb 100%);
  color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: -.3px;
  display: grid; place-items: center; box-shadow: 0 3px 10px rgba(108, 75, 244, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.brand-text b { font-size: 13.5px; font-weight: 700; letter-spacing: -.1px; }
.brand-text i {
  font-size: 10.5px; font-style: normal; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 11px; border-radius: 8px; cursor: pointer;
  background: var(--bg-sunken); border: 1px solid var(--line);
  color: var(--ink-3); font-size: 12.5px; transition: .15s;
}
.search-btn:hover { border-color: var(--purple-line); color: var(--ink-2); }
.search-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.theme-btn {
  width: 32px; height: 32px; flex: none; border-radius: 8px; cursor: pointer;
  background: var(--bg-sunken); border: 1px solid var(--line);
  display: grid; place-items: center; transition: .15s;
}
.theme-btn:hover { border-color: var(--purple-line); }
.theme-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme-btn .ic-moon { display: none; }
html[data-theme="dark"] .theme-btn .ic-sun { display: none; }
html[data-theme="dark"] .theme-btn .ic-moon { display: block; }

/* ----------------------------------------------------------------- tabs -- */
/* 页签放在顶栏内部下沿：顶栏高度自动变为「品牌行 + 页签行」 */
.tabs {
  display: flex; gap: 4px; max-width: var(--maxw);
  margin: 0 auto; padding: 0 24px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; padding: 9px 14px 10px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent;
  transition: .15s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--purple-strong); border-bottom-color: var(--purple); }
.tabs-n {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  font-size: 11px; font-weight: 620; line-height: 17px;
  background: var(--bg-sunken); border: 1px solid var(--line); color: var(--ink-3);
}
.tabs a.on .tabs-n {
  background: var(--purple-soft); border-color: var(--purple-line); color: var(--purple-strong);
}

/* ---------------------------------------------------------------- layout -- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 20px 24px 64px; }

/* ------------------------------------------------------- 近期上传 / 更新 -- */
.recent {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 14px;
}
.ra-panel {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 12px 14px 10px; min-width: 0;
}
.ra-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ra-head h2 { margin: 0; font-size: 13px; font-weight: 680; letter-spacing: -.1px; }
.ra-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ra-new .ra-dot { background: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.ra-upd .ra-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.ra-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ra-list li + li { border-top: 1px solid var(--line-2); }
.ra-list a {
  display: flex; align-items: baseline; gap: 9px;
  padding: 7px 2px; font-size: 13px; transition: .12s;
}
.ra-list a:hover { padding-left: 6px; }
.ra-list a:hover .ra-name { color: var(--purple-strong); }
.ra-name {
  font-weight: 620; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ra-meta { font-size: 11.5px; color: var(--ink-3); flex: none; }
.ra-date {
  font-size: 11.5px; color: var(--ink-3); flex: none;
  font-variant-numeric: tabular-nums; min-width: 74px; text-align: right;
}
.ra-empty { margin: 0; padding: 10px 2px 12px; font-size: 12.5px; color: var(--ink-3); }

/* --------------------------------------------------------------- toolbar -- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.field { display: flex; align-items: center; gap: 7px; }
.field-label { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.field select {
  appearance: none; -webkit-appearance: none;
  padding: 6px 26px 6px 11px; border-radius: 7px; cursor: pointer;
  background: var(--bg-sunken) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238a919c' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 8px center/11px;
  border: 1px solid var(--line); font-size: 12.5px; transition: .15s;
}
.field select:hover { border-color: var(--purple-line); }
.field select:focus { outline: 2px solid var(--purple-soft); border-color: var(--purple); }

.field-search {
  flex: 1 1 260px; min-width: 200px; position: relative;
  padding: 0 10px 0 12px; height: 34px;
  background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 7px;
  transition: .15s;
}
.field-search:focus-within {
  border-color: var(--purple); background: var(--bg-elev); box-shadow: 0 0 0 3px var(--purple-soft);
}
.field-search svg { width: 15px; height: 15px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; flex: none; }
.field-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; padding: 0; }
.field-search input::placeholder { color: var(--ink-3); }
.field-search .clear {
  border: 0; background: none; cursor: pointer; color: var(--ink-3);
  font-size: 17px; line-height: 1; padding: 0 2px; border-radius: 4px;
}
.field-search .clear:hover { color: var(--ink); background: var(--line-2); }

.result-count { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* ----------------------------------------------------------- main table -- */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.main-table table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
/* 表头不吸顶：列表只有十几行，吸顶反而会和工具条抢位置 */
.main-table thead th {
  background: var(--bg-head); text-align: left;
  padding: 11px 16px; font-size: 12px; font-weight: 650; color: var(--ink-3);
  letter-spacing: .3px; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.main-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.main-table tbody tr:last-child td { border-bottom: 0; }
.main-table tbody tr { transition: background .12s; }
.main-table tbody tr:hover { background: var(--bg-sunken); }
.main-table tbody tr.hide { display: none; }

.c-name { min-width: 240px; }
.c-group { width: 120px; }
.c-demo { width: 172px; }
.c-prd { width: 240px; min-width: 190px; }
.c-upd { width: 112px; white-space: nowrap; }

.c-name .name { font-size: 14px; font-weight: 650; letter-spacing: -.1px; }
.c-name .name:hover { color: var(--purple-strong); }
.c-name .dir {
  margin-top: 1px; font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px;
}

.grp {
  display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  background: var(--bg-sunken); border: 1px solid var(--line); color: var(--ink-2);
  white-space: nowrap;
}
.src {
  display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  background: var(--bg-sunken); border: 1px solid var(--line); border-radius: 5px;
  padding: 2px 7px; white-space: nowrap;
}

.lnk {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 620; padding: 4px 11px; border-radius: 7px;
  border: 1px solid transparent; white-space: nowrap; transition: .15s;
}
.lnk-demo { color: var(--purple-strong); background: var(--purple-soft); border-color: var(--purple-line); }
.lnk-demo:hover { background: var(--purple); color: #fff; border-color: var(--purple); }
.lnk-prd { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.lnk-prd:hover { background: var(--ok); color: #fff; border-color: var(--ok); }
.lnk .cnt { font-size: 10.5px; opacity: .75; font-weight: 560; }

.multi-docs { display: inline-flex; align-items: center; gap: 7px; }
.multi-docs .more {
  font-size: 11.5px; color: var(--ink-3); padding: 2px 7px; border-radius: 6px;
  background: var(--bg-sunken); border: 1px solid var(--line); white-space: nowrap;
  cursor: help;
}

.none { font-size: 12.5px; color: var(--ink-3); }
.c-upd { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.empty { padding: 56px 20px; text-align: center; }
.empty b { display: block; font-size: 15px; font-weight: 660; margin-bottom: 5px; }
.empty p { margin: 0 0 16px; font-size: 13px; color: var(--ink-3); }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  background: var(--bg-elev); border: 1px solid var(--line);
  font-size: 13px; font-weight: 620; box-shadow: var(--shadow-1); transition: .15s;
}
.btn:hover { border-color: var(--purple-line); transform: translateY(-1px); box-shadow: var(--shadow-2); }

.legend {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  margin: 16px 2px 0; font-size: 12px; color: var(--ink-3);
}
.legend b { color: var(--ink-2); font-weight: 620; }

/* ------------------------------------------------------- document pages -- */
.doc-shell { max-width: 1180px; margin: 0 auto; padding: 26px 24px 72px; }
.doc-head { margin-bottom: 22px; }
.doc-head h1 {
  margin: 12px 0 12px; font-size: clamp(22px, 2.6vw, 29px); font-weight: 750;
  letter-spacing: -.6px; line-height: 1.3;
}
.crumbs { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--purple-strong); border-bottom-color: currentColor; }
.crumbs span { opacity: .55; }

.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 12px; color: var(--ink-3); }
.pill {
  font-size: 11.5px; font-weight: 620; padding: 2px 10px; border-radius: 999px;
  background: var(--purple-soft); color: var(--purple-strong); border: 1px solid var(--purple-line);
}
.crumb-back {
  display: inline-block; margin-top: 14px; font-size: 12.5px; font-weight: 620;
  color: var(--ink-2); border-bottom: 1px dashed var(--line);
}
.crumb-back:hover { color: var(--purple-strong); border-bottom-color: currentColor; }

.doc-layout { display: block; }
.doc-layout.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 34px; align-items: start; }

.prose {
  min-width: 0; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px 42px 42px; box-shadow: var(--shadow-1);
  font-size: 14.5px; line-height: 1.85;
}
.prose > *:first-child { margin-top: 0; }
.prose h1 { font-size: 25px; margin: 8px 0 18px; letter-spacing: -.5px; line-height: 1.32; }
.prose h2 {
  font-size: 18.5px; font-weight: 700; margin: 42px 0 13px; padding-bottom: 9px;
  border-bottom: 2px solid var(--line); letter-spacing: -.3px; scroll-margin-top: 72px;
}
.prose h3 { font-size: 15.5px; font-weight: 680; margin: 28px 0 10px; scroll-margin-top: 72px; }
.prose h4 { font-size: 14.5px; font-weight: 680; margin: 22px 0 9px; color: var(--ink-2); }
.prose p { margin: 0 0 15px; }
.prose strong { font-weight: 680; }
.prose a { color: var(--purple-strong); border-bottom: 1px solid var(--purple-line); }
.prose a:hover { border-bottom-color: currentColor; }
.prose a.link-ext::after { content: " ↗"; font-size: 11px; opacity: .6; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose img { border-radius: var(--radius-sm); border: 1px solid var(--line); margin: 6px 0; }

.prose code {
  font-family: var(--mono); font-size: 12.5px; padding: 1.5px 6px; border-radius: 5px;
  background: var(--bg-code); border: 1px solid var(--line-2); word-break: break-word;
}
.prose pre {
  background: var(--bg-code); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 17px; overflow-x: auto; margin: 0 0 18px; line-height: 1.7;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: 12.5px; white-space: pre; }

.prose blockquote {
  margin: 0 0 18px; padding: 13px 18px; border-left: 4px solid var(--purple);
  background: var(--purple-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 5px 0; }
.prose li > ul, .prose li > ol { margin: 6px 0 4px; }
.prose li.task { list-style: none; margin-left: -20px; }

/* 表格（PRD 正文用） */
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.prose .table-wrap {
  background: none; border: 1px solid var(--line); box-shadow: none;
  margin-bottom: 20px; overflow-x: auto; border-radius: var(--radius-sm);
}
.prose th {
  background: var(--bg-sunken); text-align: left; padding: 10px 13px;
  border-bottom: 1px solid var(--line); font-weight: 680; white-space: nowrap; min-width: 104px;
}
.prose th:first-child, .prose td:first-child { width: 1%; white-space: nowrap; }
.prose td { padding: 10px 13px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--bg-sunken) 60%, transparent); }

.prose details {
  margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg-sunken); overflow: hidden;
}
.prose details > summary {
  cursor: pointer; padding: 10px 14px; font-size: 13.5px; font-weight: 640;
  color: var(--ink-2); list-style: none;
}
.prose details > summary::-webkit-details-marker { display: none; }
.prose details > summary::before { content: "▸ "; color: var(--purple); }
.prose details[open] > summary::before { content: "▾ "; }
.prose details[open] > summary { border-bottom: 1px solid var(--line); }
.prose details > *:not(summary) { padding: 0 16px; }
.prose details > p:first-of-type { padding-top: 14px; }

/* ----------------------------------------------------------------- toc --- */
.toc { position: sticky; top: calc(var(--topbar-h) + 16px); font-size: 12.5px; }
.toc-h {
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 10px;
}
.toc nav { display: flex; flex-direction: column; max-height: calc(100vh - 150px); overflow-y: auto; }
.toc a {
  padding: 4px 0 4px 11px; border-left: 2px solid var(--line);
  color: var(--ink-3); line-height: 1.5; transition: .15s;
}
.toc a:hover { color: var(--ink); border-left-color: var(--ink-3); }
.toc a.lvl3 { padding-left: 22px; font-size: 12px; }
.toc a.active { color: var(--purple-strong); border-left-color: var(--purple); font-weight: 620; }

/* --------------------------------------------------------------- modal --- */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-start; justify-content: center; padding: 9vh 18px 18px;
}
.modal-bg { position: absolute; inset: 0; background: rgba(12, 14, 18, .48); backdrop-filter: blur(3px); }
.modal-panel {
  position: relative; width: min(620px, 100%); max-height: 72vh; display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-3); overflow: hidden; animation: pop .16s ease-out;
}
@keyframes pop { from { transform: translateY(-8px) scale(.985); opacity: 0; } }
.modal-input {
  display: flex; align-items: center; gap: 11px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); flex: none;
}
.modal-input svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; flex: none; }
.modal-input input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; padding: 2px 0; }
.modal-input input::placeholder { color: var(--ink-3); }
.modal-results { overflow-y: auto; padding: 6px; }
.sr-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.sr-item.sel { background: var(--purple-soft); }
.sr-item .sr-kind {
  font-size: 10.5px; font-weight: 660; padding: 2px 7px; border-radius: 5px; flex: none;
  background: var(--bg-sunken); color: var(--ink-3); border: 1px solid var(--line);
}
.sr-item .sr-main { min-width: 0; flex: 1; }
.sr-item .sr-title { font-size: 13.5px; font-weight: 620; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item .sr-sub { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item mark { background: rgba(255, 214, 92, .45); color: inherit; border-radius: 3px; padding: 0 2px; }
html[data-theme="dark"] .sr-item mark { background: rgba(255, 214, 92, .28); }
.sr-empty { padding: 34px 16px; text-align: center; color: var(--ink-3); font-size: 13px; }
.modal-foot {
  display: flex; justify-content: space-between; gap: 10px; padding: 9px 15px;
  border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); flex: none;
}

/* -------------------------------------------------------------- footer --- */
.foot { border-top: 1px solid var(--line); background: var(--bg-elev); }
.foot-in {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 24px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
}
.foot b { font-size: 13px; font-weight: 680; }
.foot p { margin: 3px 0 0; font-size: 12px; color: var(--ink-3); }
.foot-links { display: flex; gap: 16px; font-size: 12.5px; }
.foot-links a { color: var(--ink-2); }
.foot-links a:hover { color: var(--purple-strong); }

/* ---------------------------------------------------------- responsive --- */
@media (max-width: 1080px) {
  .doc-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static; order: -1; margin-bottom: 20px; padding: 14px 16px;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .toc nav { max-height: 260px; }
}

@media (max-width: 900px) {
  .main-table .c-group, .main-table thead th.c-group { display: none; }
}

@media (max-width: 820px) {
  .topbar-in { padding: 0 14px; gap: 12px; }
  .brand-text { display: none; }
  .search-btn span { display: none; }
  .wrap, .doc-shell { padding-left: 14px; padding-right: 14px; }
  .tabs { padding: 0 12px; }
  .tabs a { padding: 8px 10px 9px; font-size: 13px; }
  .prose { padding: 24px 18px 30px; font-size: 14px; }
  .prose h2 { font-size: 17px; margin-top: 34px; }
  .toolbar { gap: 8px; }
  .field-search { flex-basis: 100%; }
  .result-count { margin-left: 0; }
  .modal { padding: 4vh 10px 10px; }
  .modal-panel { max-height: 86vh; }
  .foot-in { padding: 20px 14px; }
}

@media (max-width: 720px) {
  .recent { grid-template-columns: 1fr; }
  .ra-date { min-width: 0; }
}

@media (max-width: 620px) {
  .ra-meta { display: none; }
  /* 窄屏下把表格转成卡片式列表 */
  .main-table thead { display: none; }
  .main-table tbody tr {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--line-2);
  }
  .main-table tbody tr:last-child { border-bottom: 0; }
  .main-table tbody td { padding: 0; border: 0; }
  .main-table .c-name { grid-column: 1; }
  .main-table .c-upd { grid-column: 2; grid-row: 1; text-align: right; color: var(--ink-3); font-size: 11.5px; }
  .main-table .c-demo, .main-table .c-prd { grid-column: 1 / -1; margin-top: 6px; }
}

/* --------------------------------------------------------------- print --- */
@media print {
  .topbar, .foot, .toc, .modal, .crumb-back, .toolbar, .legend { display: none !important; }
  body { background: #fff; }
  .prose, .table-wrap { border: 0; box-shadow: none; padding: 0; }
  .doc-layout.has-toc { display: block; }
  .prose h2 { break-after: avoid; }
  .prose table, .prose pre { break-inside: avoid; }
}
