/* ═══════════════════════════════════════════════════════════════
   MCDRS · site.css
   单一设计系统：纯黑底 / 深灰面板 / 纯黑白 / 16px 圆角 / 8px 间距
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Token ────────────────────────────────────────────────── */

:root {
  --bg: #000000;
  --surface: #0A0A0A;
  --surface-2: #101010;
  --surface-3: #161616;
  --surface-4: #1C1C1C;

  --border: #1F1F1F;
  --border-2: #2A2A2A;

  --text: #F2F2F2;
  /* 正文白，次要信息浅灰，图标/占位符更深一档 */
  --text-muted: #CCCCCC;
  --text-dim: #9E9E9E;

  /* 信号色：只用于状态圆点和页面识别点，不做大面积铺色 */
  --c-green: #5FD68A;
  --c-blue: #6AA6FF;
  --c-amber: #E9B44C;
  --c-purple: #B78CFF;
  --c-teal: #5FD6C8;
  --c-red: #F87171;

  /* 当前页面识别色，由 JS 按视图注入 */
  --view: #F2F2F2;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;

  --container: 1240px;
  --sidebar: 248px;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 40px;
  --s8: 56px;
  --s9: 80px;

  --dur: 140ms;
  --ease: cubic-bezier(.2, 0, .2, 1);

  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
          "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
}

/* ── 2. Reset ────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img { display: block; max-width: 100%; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }

::selection { background: #F2F2F2; color: #000; }

:focus-visible {
  outline: 2px solid #8A8A8A;
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

[hidden] { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #242424;
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: #333; background-clip: content-box; }

/* ── 3. 骨架 ─────────────────────────────────────────────────── */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

/* ── 4. 侧栏 ─────────────────────────────────────────────────── */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.sidebar__head {
  padding: var(--s5) var(--s4) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 0 var(--s2);
}

.brand__mark,
.brand__name { transition: background-color var(--dur) var(--ease),
                            color var(--dur) var(--ease),
                            opacity var(--dur) var(--ease); }

.brand:hover .brand__mark { background: #D6D6D6; }
.brand:hover .brand__name { opacity: .8; }

.brand__mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--text);
  color: #000;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

.brand__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search svg {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  stroke: var(--text-dim);
  fill: none;
  stroke-width: 1.6;
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.search input::placeholder { color: var(--text-dim); }
.search input:hover { border-color: var(--border-2); }
.search input:focus { border-color: #4A4A4A; }

.search__kbd {
  position: absolute;
  right: 8px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}

.search__kbd kbd {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1;
}

.sidebar__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--s5) var(--s3) var(--s5);
}

.navgroup + .navgroup { margin-top: var(--s6); }

.navgroup__label {
  padding: 0 var(--s2) var(--s2);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.navitem {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  min-height: 42px;
  padding: 0 var(--s2);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: 15px;
  text-align: left;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}

.navitem svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navitem__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navitem__pin {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--dot, var(--text-dim));
  opacity: .45;
  transition: opacity var(--dur) var(--ease);
}

.navitem:hover .navitem__pin { opacity: .8; }
.navitem.is-active .navitem__pin { opacity: 1; }

.navitem[data-nav-view="home"] { --dot: var(--c-green); }
.navitem[data-nav-view="docs"] { --dot: var(--c-blue); }
.navitem[data-nav-view="slime"] { --dot: var(--c-teal); }
.navitem[data-nav-view="rules"] { --dot: var(--c-amber); }
.navitem[data-nav-view="feedback"] { --dot: var(--c-purple); }

.navitem:hover {
  background: var(--surface-3);
  color: var(--text);
}

.navitem.is-active {
  background: var(--surface-4);
  color: var(--text);
  font-weight: 500;
}

.navitem.is-active svg { stroke-width: 1.8; }

.navitem--sub {
  min-height: 38px;
  font-size: 13px;
  padding-left: var(--s2);
}

.navitem--sub .navitem__dot {
  width: 5px;
  height: 5px;
  flex: none;
  margin: 0 8px 0 6px;
  border-radius: 50%;
  background: var(--view);
  opacity: .4;
  transition: opacity var(--dur) var(--ease);
}

.navitem--sub:hover .navitem__dot { opacity: .7; }
.navitem--sub.is-active .navitem__dot { opacity: 1; }

.sidebar__foot {
  padding: var(--s4);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.srv {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.srv__dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #4A4A4A;
}

.srv__dot.is-online { background: var(--c-green); }
.srv__dot.is-offline { background: var(--c-red); }

.srv__body { min-width: 0; }

.srv__line {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.srv__meta {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
}

.sidebar__ip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  width: 100%;
  height: 40px;
  padding: 0 var(--s3);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  transition: border-color var(--dur) var(--ease);
}

.sidebar__ip span { color: var(--text-dim); font-family: var(--font); font-size: 12px; }
.sidebar__ip:hover { border-color: var(--border-2); }

/* ── 侧栏搜索：内容级结果 ────────────────────────────────────── */

.hit {
  display: block;
  width: 100%;
  padding: var(--s2);
  border-radius: var(--r-sm);
  text-align: left;
  transition: background-color var(--dur) var(--ease);
}

.hit:hover { background: var(--surface-2); }

.hit__title {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hit__path {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hit__path mark {
  background: none;
  color: var(--hit-color, var(--view));
  font-weight: 500;
}

.hit__empty {
  padding: var(--s3) var(--s2);
  color: var(--text-dim);
  font-size: 13px;
}

/* 跳转后短暂标出落点，靠 outline 不占布局 */
.is-flash {
  outline: 1px solid var(--view);
  outline-offset: 6px;
  border-radius: var(--r-sm);
}

/* ── 5. 主区 ─────────────────────────────────────────────────── */

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding-inline: max(var(--s7), calc((100% - var(--container)) / 2));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--dur) var(--ease);
}

.topbar.is-scrolled { border-bottom-color: var(--border-2); }

.topbar__crumb {
  display: flex;
  align-items: center;
  gap: var(--s2);
  height: 32px;
  padding: 0 var(--s3) 0 var(--s2);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
}

.topbar__crumb svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--view);
  stroke-width: 1.5;
}

.topbar__sep { color: var(--text-dim); }
.topbar__title { color: var(--text); font-size: 13px; }

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.menu-btn:hover { background: var(--surface-3); border-color: var(--border-2); }
.menu-btn:active { background: var(--surface-4); }

.menu-btn svg { width: 20px; height: 20px; stroke: var(--text); fill: none; stroke-width: 1.6; }

.content {
  flex: 1;
  width: 100%;
  max-width: calc(var(--container) + var(--s7) * 2);
  margin-inline: auto;
  padding: var(--s7) var(--s7) var(--s9);
}

/* 视图切换：只做 160ms 透明度过渡，不位移 */
.view { transition: opacity 160ms var(--ease); }

/* ── 6. 排版 ─────────────────────────────────────────────────── */

.page-head { margin-bottom: var(--s7); }

.page-title {
  font-size: 35px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.page-title span { color: var(--text-dim); }

.page-lede {
  max-width: 62ch;
  margin-top: var(--s4);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: pretty;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

.section { margin-top: var(--s9); }
.section:first-of-type { margin-top: 0; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.section__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.section__note { color: var(--text-dim); font-size: 13px; }

/* 正文阅读宽度：68ch 在 1100px 正文区里右侧空太多，放到 720px
   （中文约 48 字一行，仍是舒服的行长），表格和步骤条也跟着够用 */
.prose { max-width: 720px; }

.prose > * + * { margin-top: var(--s4); }
.prose > :first-child { margin-top: 0; }

.prose h2 {
  margin-top: var(--s8);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
}

.prose h3 {
  margin-top: var(--s6);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.4;
}

.prose p, .prose li { color: var(--text-muted); font-size: 15px; text-wrap: pretty; }

.prose strong { color: var(--text); font-weight: 600; }

.prose ul, .prose ol {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.prose ul > li { position: relative; padding-left: var(--s5); }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4A4A4A;
}

.prose ol { counter-reset: n; }
.prose ol > li { position: relative; padding-left: var(--s6); counter-increment: n; }
.prose ol > li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: .05em;
  color: var(--text-dim);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.prose code {
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: .88em;
}

.prose pre {
  padding: var(--s4) var(--s5);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
}

.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }

.prose a:not(.btn) {
  color: var(--text);
  border-bottom: 1px solid var(--text-dim);
  transition: border-color var(--dur) var(--ease);
}

.prose a:not(.btn):hover { border-color: var(--text); }

/* ── 7. 按钮 ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 44px;
  padding: 0 var(--s5);
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              translate 90ms var(--ease);
}

.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.btn:active { translate: 0 1px; }

.btn--primary { background: var(--text); color: #000; }
.btn--primary:hover { background: #D6D6D6; }
.btn--primary:active { background: #BFBFBF; }

.btn--ghost {
  background: var(--surface);
  border-color: var(--border-2);
  color: var(--text);
}
.btn--ghost:hover { background: var(--surface-3); border-color: #3A3A3A; }
.btn--ghost:active { background: var(--surface-4); }

.btn--quiet { color: var(--text-muted); padding: 0 var(--s3); }
.btn--quiet:hover { color: var(--text); background: var(--surface-3); }
.btn--quiet:active { background: var(--surface-4); }

.btn--sm { height: 36px; padding: 0 var(--s3); font-size: 13px; }

.btn.is-loading { pointer-events: none; opacity: .55; }
.btn.is-copied { border-color: #4A4A4A; }

/* ── 悬停高光：底色微提亮 + 跟随指针的柔光 ─────────────────────── */

:is(.card, .person, .step, .rule-box, .type) {
  position: relative;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              translate var(--dur) var(--ease);
}

:is(.card, .person, .step, .rule-box, .type)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%),
              rgba(255, 255, 255, .085), transparent 62%);
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

:is(.card, .person, .step, .rule-box, .type):hover {
  background-color: var(--surface-3);
  border-color: var(--border-2);
  translate: 0 -1px;
}

:is(.card, .person, .step, .rule-box, .type):hover::after { opacity: 1; }

/* ── 8. 卡片与数据块 ─────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.stat {
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.stat__label {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text-muted);
  font-size: 13px;
}

.stat__label svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.stat__value {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.stat__value small {
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
}

.stat__meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text-dim);
  font-size: 13px;
}

#serverPing { transition: color var(--dur) var(--ease); }
#serverPing.is-good { color: var(--c-green); }
#serverPing.is-far { color: var(--c-amber); }

.meter {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-4);
  overflow: hidden;
}

.meter i {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  background: var(--text);
  transition: width 400ms var(--ease);
}

.addr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s4);
  padding: var(--s4) var(--s5);
}

.addr__label { color: var(--text-muted); font-size: 13px; }

.addr__value {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: -.01em;
}

.addr__side { display: flex; align-items: center; gap: var(--s3); }

.logo-slot {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  overflow: hidden;
}

.logo-slot img { width: 100%; height: 100%; object-fit: cover; }

.motd {
  margin-top: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 var(--s3);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}


/* ── 9. 列表行 ───────────────────────────────────────────────── */

.rows { border-top: 1px solid var(--border); }

.row {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur) var(--ease);
}

.row:hover { background-color: var(--surface-2); }

.row__icon {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

.row:hover .row__icon { background: var(--surface-3); border-color: var(--border-2); }

.row__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.row__body { flex: 1; min-width: 0; }

.row__title {
  font-size: 15px;
  font-weight: 500;
  transition: color var(--dur) var(--ease);
}

.row__desc {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.row__value {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 13px;
}

.row--link { color: inherit; }
.row--link:hover .row__title { color: var(--text); }
.row--link:hover .row__icon { background: var(--surface-3); }

.row__arrow { color: var(--text-dim); font-size: 16px; }

/* ── 10. 人员 ────────────────────────────────────────────────── */

.people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
}

.person {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4);
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
}

.person__avatar {
  width: 48px;
  height: 48px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-3);
  overflow: hidden;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}

.person__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person__avatar svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.person__body { flex: 1; min-width: 0; }

.person__name {
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person__role {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 邮箱：直接写成白字，点一下复制 */
.person__mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 3px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  transition: color var(--dur) var(--ease);
}

.person__mail span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur) var(--ease);
}

.person__mail svg {
  width: 14px;
  height: 14px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.person__mail:hover span { text-decoration-color: #5A5A5A; }
.person__mail:hover svg { opacity: .55; }
.person__mail:active { color: var(--text-dim); }

@media (hover: none) {
  .person__mail svg { opacity: .4; }
}

.person--link { transition: border-color var(--dur) var(--ease); }
.person--link:hover { border-color: var(--border-2); }

/* 致谢卡放的是品牌 logo：方形圆角块，比人像头像大一圈，
   contain 保证 logo 完整不裁切 */
.person--link .person__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  background: #060606;
}
.person--link .person__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── 11. 表格 ────────────────────────────────────────────────── */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; font-size: 15px; }

thead th {
  padding: var(--s3) var(--s5);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface); }
tbody td:first-child { color: var(--text); }

td code {
  padding: 2px 7px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: .88em;
}

/* ── 12. 提示块 ──────────────────────────────────────────────── */

.note {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.note__icon {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 2px;
  color: var(--text);
}

.note__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.note__body { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.note__body strong { color: var(--text); font-weight: 600; }
.note__body ul { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s2); }
.note__body ul > li { position: relative; padding-left: var(--s5); }
.note__body ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4A4A4A;
}
.note--strong { background: var(--surface-2); border-color: var(--border-2); }

/* ── 13. 步骤 ────────────────────────────────────────────────── */

.steps { display: flex; flex-direction: column; gap: var(--s4); }

.step {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
}

.step__num {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.step__title { font-size: 15px; font-weight: 500; }
.step__desc { margin-top: var(--s2); color: var(--text); font-size: 15px; }
.step__desc > * + * { margin-top: var(--s2); }

/* ── 14. 规则双栏 ────────────────────────────────────────────── */

.rule-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
}

.rule-box {
  padding: var(--s5);
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface);
}

.rule-box__head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
  font-size: 15px;
  font-weight: 600;
}

.rule-box__head svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.rule-box ul { display: flex; flex-direction: column; gap: var(--s3); }

.rule-box li {
  position: relative;
  padding-left: var(--s5);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.rule-box li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4A4A4A;
}

/* ── 15. 表单 ────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: var(--s2); }
.field + .field { margin-top: var(--s5); }

.field > label {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.req { margin-left: 4px; color: var(--text-dim); }

.field input,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 var(--s4);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.field textarea {
  height: auto;
  min-height: 168px;
  padding: var(--s3) var(--s4);
  line-height: 1.65;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); }

.field input:hover,
.field textarea:hover { border-color: #383838; }

.field input:focus,
.field textarea:focus { border-color: #6A6A6A; }

.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid #3A3A3A; outline-offset: 1px; }

.field input.input-error,
.field textarea.input-error { border-color: #8A8A8A; }

.field__hint { color: var(--text-dim); font-size: 13px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.grid2 .field + .field { margin-top: 0; }

.types { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }

.type {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  padding: var(--s4);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.type input { position: absolute; opacity: 0; pointer-events: none; }
.type:hover { border-color: #383838; }

.type:has(input:checked) {
  border-color: #7A7A7A;
  background: var(--surface-3);
}

.type__top { font-size: 15px; font-weight: 500; }
.type__desc { color: var(--text-dim); font-size: 13px; line-height: 1.5; }


/* 反馈页：整页收在一列里，输入框不再拉满 1100px */
.fb { max-width: 720px; }
.fb > * + * { margin-top: var(--s5); }

.fb-form { padding: var(--s5); }

.note__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s3);
}

/* 字段之间的节奏统一交给容器，不再靠内联 margin */
.field + .grid2,
.grid2 + .field { margin-top: var(--s5); }

/* ── 16. Toast ───────────────────────────────────────────────── */

.toasts {
  position: fixed;
  left: 50%;
  bottom: var(--s6);
  z-index: 140;
  width: min(400px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  color: var(--text);
  font-size: 13px;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity var(--dur) var(--ease);
}

.toast.is-leaving { opacity: 0; }

.toast__icon { width: 18px; height: 18px; flex: none; }
.toast__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.toast__msg { flex: 1; min-width: 0; }

/* ── 17. 发送 ────────────────────────────────────────────────── */

.send {
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}

.send__head { margin-bottom: var(--s4); }

.send__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.send__note {
  margin-top: var(--s1);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.send__note strong { color: var(--text); font-weight: 500; }

.send__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.send__providers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* ── 18. 页脚 ────────────────────────────────────────────────── */

.foot {
  margin-top: var(--s9);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  color: var(--text-dim);
  font-size: 13px;
}

.foot__links { display: flex; flex-wrap: wrap; gap: var(--s4); }
.foot a { color: var(--text-muted); transition: color var(--dur) var(--ease); }
.foot a:hover { color: var(--text); }

.legal { margin-top: var(--s4); color: var(--text-dim); font-size: 13px; line-height: 1.6; }

/* ── 19. 粘液科技 ────────────────────────────────────────────── */

/* 这一页是图鉴，正文列比文档页宽一点，双列卡片才装得下 */
#view-slime .prose { max-width: 860px; }

.quickfacts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: var(--s7);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--border);
  overflow: hidden;
}

.quickfacts > div {
  padding: var(--s4) var(--s5);
  background: var(--surface);
}

.quickfacts__label { display: block; color: var(--text-dim); font-size: 12px; }

.quickfacts__value {
  display: block;
  margin-top: var(--s2);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.35;
}

.quickfacts__note {
  display: block;
  margin-top: var(--s1);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.5;
}

.catalog__cat {
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.catalog__cat:first-of-type {
  margin-top: var(--s5);
  padding-top: 0;
  border-top: 0;
}

.catalog__cat span {
  margin-left: var(--s2);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
}

.addon-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s4);
}

.addon {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

.addon:hover { border-color: var(--border-2); }
.addon.is-open { border-color: var(--border-2); background: var(--surface-2); }

.addon__toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  width: 100%;
  padding: var(--s4) var(--s5);
  text-align: left;
}

.addon__names { display: block; min-width: 0; }

.addon__name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.addon__name em {
  margin-left: var(--s2);
  color: var(--text-muted);
  font-style: normal;
  font-weight: 400;
}

.addon__role {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.addon__side {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.addon__ver { color: var(--text-dim); font-size: 12px; }

.addon__chevron {
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  transition: transform 200ms var(--ease), color var(--dur) var(--ease);
}

.addon.is-open .addon__chevron { transform: rotate(180deg); color: var(--text-dim); }

/* 用 0fr → 1fr 做高度动画，不需要 JS 测量内容高度 */
.addon__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms var(--ease);
}

.addon.is-open .addon__panel { grid-template-rows: 1fr; }

.addon__inner { overflow: hidden; min-height: 0; }

.addon__facts {
  padding: 0 var(--s5) var(--s5);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: var(--s2) var(--s3);
  font-size: 13px;
  line-height: 1.7;
}

.addon__facts dt { color: var(--text-dim); }
.addon__facts dd { color: var(--text-muted); }
.addon__facts ul { gap: var(--s1); }
.addon__facts a { color: var(--text); }
.addon__facts a:hover { color: var(--view); }

/* ── 20. 响应式 ──────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .content { padding: var(--s7) var(--s6) var(--s9); }
  .topbar { padding-inline: var(--s6); }
}

@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }


  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: min(300px, 84vw);
    transform: translateX(-100%);
    transition: transform var(--dur) var(--ease);
  }

  .sidebar.is-open { transform: none; }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, .72);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), visibility var(--dur);
  }

  .scrim.is-open { opacity: 1; visibility: visible; }

  .menu-btn { display: grid; }

  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  body { font-size: 15px; }

  .quickfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .addon__facts { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .addon__facts dt { margin-top: var(--s2); }

  .content { padding: var(--s5) var(--s5) var(--s8); }
  .topbar { padding-inline: var(--s5); height: 60px; }

  .page-title { font-size: 25px; letter-spacing: -.02em; }
  .page-lede { font-size: 15px; }
  .page-actions .btn { flex: 1; }

  .section { margin-top: var(--s8); }
  .section__title { font-size: 16px; }
  .prose h2 { font-size: 18px; }
  .prose h3 { font-size: 16px; }
  .prose p, .prose li { font-size: 15px; }

  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .stat__value { font-size: 29px; }

  .rule-split { grid-template-columns: minmax(0, 1fr); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .types { grid-template-columns: minmax(0, 1fr); }

  .addr { flex-direction: column; align-items: flex-start; }
  .addr__side { width: 100%; justify-content: space-between; }

  .row { flex-wrap: wrap; }
  .row .btn { width: 100%; }


  .topbar__crumb { display: none; }

  .person--link .person__avatar {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 420px) {
  .content { padding: var(--s4) var(--s4) var(--s8); }
  .topbar { padding-inline: var(--s4); }
  .page-title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
