/* 明堂 · 五色：令牌、重置，和两页都用的小件。
   规格：docs/superpowers/specs/2026-12-03-mingtang-site-design.md
   这份是正本；products/mingtang-plain/assets/ 里的由 tools/mingtang-build.mjs 拷过去，不手改。 */
:root {
  --su: oklch(0.944 0.016 86);     /* 素：纸 */
  --mo: oklch(0.19 0.009 75);      /* 墨 */
  --xuan: oklch(0.222 0.019 266);  /* 玄：天官 */
  --qing: oklch(0.442 0.054 202);  /* 青：春官 */
  --chi: oklch(0.5 0.155 31);      /* 赤：夏官 */
  --bai: oklch(0.905 0.022 86);    /* 白：秋官 */
  --hei: oklch(0.15 0.004 286);    /* 黑：冬官 */
  --huang: oklch(0.78 0.13 88);    /* 黄：地官 */

  /* 每块底色上的次要文字，从底色的同一个色相调出来 */
  --on-su-2: oklch(0.44 0.016 86);
  --on-bai-2: oklch(0.42 0.022 86);
  --on-huang-2: oklch(0.3 0.05 85);
  --on-xuan-2: oklch(0.8 0.02 266);
  --on-qing-2: oklch(0.88 0.03 202);
  --on-chi-2: oklch(0.94 0.025 31);
  --on-hei-2: oklch(0.76 0.008 286);

  --font: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);         /* 常规状态变化 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);  /* 进场 */
  --rule: 1.5px;                              /* 描边和粗分隔线 */
  --pad: 56px;                                /* 页面左右留白 */
  --side: clamp(320px, 28vw, 404px);          /* 左栏：首屏题首栏的宽度，各节右栏从这里起 */
  --bar: 54px;                                /* 吸顶条的高度 */
}
@media (max-width: 1099px) { :root { --pad: 32px; --side: 292px; } }
@media (max-width: 720px) { :root { --pad: 20px; --bar: 48px; } }

/* 对比度配对：node <fleet>/skills/ui-color/scripts/contrast.mjs --tokens 本文件 --only-declared */
/* @contrast --mo --su 4.5 */
/* @contrast --mo --bai 4.5 */
/* @contrast --mo --huang 4.5 */
/* @contrast --su --xuan 4.5 */
/* @contrast --su --qing 4.5 */
/* @contrast --su --chi 4.5 */
/* @contrast --su --hei 4.5 */
/* @contrast --on-su-2 --su 4.5 */
/* @contrast --on-bai-2 --bai 4.5 */
/* @contrast --on-huang-2 --huang 4.5 */
/* @contrast --on-xuan-2 --xuan 4.5 */
/* @contrast --on-qing-2 --qing 4.5 */
/* @contrast --on-chi-2 --chi 4.5 */
/* @contrast --on-hei-2 --hei 4.5 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--su); color: var(--mo);
  font: 400 17px/1.75 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, blockquote { margin: 0; padding: 0; font-size: inherit; font-weight: inherit; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }  /* 少一些行末的孤字；不支持的浏览器照常换行 */
[data-quote] { word-break: keep-all; overflow-wrap: anywhere; }  /* 引文只在标点后面换行；一行放不下一句时才从中间断 */
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
cite { font-style: normal; white-space: nowrap; }  /* 出处不从中间断开 */
b { font-weight: 600; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* 七块底色，各带自己的正文色和次要文字色 */
.g-su { background: var(--su); color: var(--mo); --c2: var(--on-su-2); }
.g-bai { background: var(--bai); color: var(--mo); --c2: var(--on-bai-2); }
.g-huang { background: var(--huang); color: var(--mo); --c2: var(--on-huang-2); }
.g-xuan { background: var(--xuan); color: var(--su); --c2: var(--on-xuan-2); }
.g-qing { background: var(--qing); color: var(--su); --c2: var(--on-qing-2); }
.g-chi { background: var(--chi); color: var(--su); --c2: var(--on-chi-2); }
.g-hei { background: var(--hei); color: var(--su); --c2: var(--on-hei-2); }

.sprite { position: absolute; width: 0; height: 0; }
.ext { width: .82em; height: .82em; margin-left: .3em; vertical-align: -.04em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; padding: 8px 14px; background: var(--mo); color: var(--su); font-size: 14px; }
.skip:focus { top: 12px; }

/* 现状标记：是文字，圆点只是帮着认 */
.tag {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 3px 11px 3px 9px; border: var(--rule) solid currentColor; border-radius: 999px;
  font-size: 13px; font-weight: 500; line-height: 1.5; white-space: nowrap;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: var(--rule) solid currentColor; }
.tag--live::before { background: currentColor; }

/* 两版的开关：当前这一版是实底 */
.voice { display: inline-flex; flex: none; border: var(--rule) solid currentColor; border-radius: 6px; overflow: hidden; font-size: 13px; font-weight: 500; line-height: 1.5; }
.voice > * { padding: 6px 15px; letter-spacing: .12em; }
.voice [aria-current] { background: var(--mo); color: var(--su); }
.voice a { transition: background-color 150ms var(--ease); }
.voice a:hover { background: color-mix(in oklch, var(--mo) 10%, transparent); }
.voice a:focus-visible { outline-offset: -4px; }

/* 404 */
.notfound { min-height: 100vh; padding: 30px var(--pad) 64px; display: flex; flex-direction: column; }
.notfound .brand { align-self: flex-start; font-size: 14px; font-weight: 600; letter-spacing: .28em; }
.notfound .brand:hover { text-decoration: underline; text-underline-offset: 4px; }
.notfound h1 { margin-top: auto; font-size: clamp(40px, 8vw, 88px); font-weight: 600; line-height: 1.2; }
.notfound-act { margin: 28px 0 auto; }
.notfound .back { display: inline-block; font-size: 18px; font-weight: 600; border-bottom: var(--rule) solid currentColor; }
