@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;700&display=swap");

:root {
  color-scheme: light dark;
  --label: #1d1d1f; --label2: #48484f; --label3: #6e6e76; --label4: #a1a1a8;
  --accent: #007aff; --accent-text: #0066cc; --accent-rgb: 0, 122, 255; --on-accent: #fff;
  --red: #ff3b30; --red-text: #d70015; --green: #34c759; --green-text: #248a3d; --orange: #ff9500; --indigo: #5856d6; --teal: #30b0c7; --yellow: #ffcc00;
  --glass: rgba(255, 255, 255, .5); --glass-hi: rgba(255, 255, 255, .8); --glass-clear: rgba(255, 255, 255, .3); --glass-chrome: rgba(255, 255, 255, .36); --fill: rgba(118, 118, 128, .12); --fill-2: rgba(118, 118, 128, .2);
  --rim-a: rgba(255, 255, 255, .95); --rim-b: rgba(255, 255, 255, .28); --rim-c: rgba(255, 255, 255, .7);
  --hair: rgba(60, 60, 67, .14); --inner: rgba(255, 255, 255, .55);
  --shadow: 0 1px 2px rgba(24, 40, 80, .06), 0 10px 32px rgba(24, 40, 80, .12);
  --shadow-hi: 0 2px 4px rgba(24, 40, 80, .08), 0 18px 44px rgba(24, 40, 80, .2);
  --wall-base: #e4ebf7; --blob-1: rgba(0, 105, 255, .78); --blob-2: rgba(60, 196, 255, .72); --blob-3: rgba(150, 105, 255, .58); --blob-4: rgba(255, 160, 110, .42); --ribbon: rgba(255, 255, 255, .75);
  --bubble-a: #2f8cff; --bubble-b: #0a6cf0; --mark: rgba(255, 214, 10, .45); }
@media (prefers-color-scheme: dark) { :root {
  --label: #f5f5f7; --label2: #c7c7cc; --label3: #98989f; --label4: #6c6c72;
  --accent: #0a84ff; --accent-text: #4da3ff; --accent-rgb: 10, 132, 255; --on-accent: #fff;
  --red: #ff453a; --red-text: #ff6961; --green: #30d158; --green-text: #30d158; --orange: #ff9f0a; --indigo: #5e5ce6; --teal: #40c8e0; --yellow: #ffd60a;
  --glass: rgba(28, 30, 40, .52); --glass-hi: rgba(72, 76, 92, .62); --glass-clear: rgba(40, 44, 56, .3); --glass-chrome: rgba(30, 32, 44, .38); --fill: rgba(118, 118, 128, .24); --fill-2: rgba(118, 118, 128, .34);
  --rim-a: rgba(255, 255, 255, .5); --rim-b: rgba(255, 255, 255, .06); --rim-c: rgba(255, 255, 255, .26);
  --hair: rgba(255, 255, 255, .12); --inner: rgba(255, 255, 255, .08);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 36px rgba(0, 0, 0, .4);
  --shadow-hi: 0 2px 6px rgba(0, 0, 0, .35), 0 20px 48px rgba(0, 0, 0, .5);
  --wall-base: #070912; --blob-1: rgba(0, 80, 255, .55); --blob-2: rgba(0, 170, 220, .32); --blob-3: rgba(120, 60, 230, .42); --blob-4: rgba(255, 90, 140, .16); --ribbon: rgba(160, 200, 255, .22);
  --bubble-a: #1f7cf5; --bubble-b: #0a5fd6; --mark: rgba(255, 214, 10, .32); } }
:root {
  --ink: var(--wall-base); --paper: var(--label); --soft: var(--label2); --mist: var(--label3); --dim: var(--label4);
  --gold: var(--accent-text); --gold-deep: var(--accent); --cyan: var(--teal); --good: var(--green-text); --bad: var(--red-text);
  --line: var(--hair); --line-soft: var(--hair); --line-faint: var(--hair);
  --pick: rgba(var(--accent-rgb), .12); --pick-top: var(--accent);
  --f: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; --d: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; --s: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; --t: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
* { box-sizing: border-box; }
/* 底：一层很淡的白（深色是一层很淡的黑），嵌在站点里时透出外面的玻璃；字号随画框宽度自适应 */
html { font-size: clamp(15px, calc(9px + .9vw), 18px); background: rgba(255, 255, 255, .2); }
@media (prefers-color-scheme: dark) { html { background: rgba(10, 12, 20, .22); } }
body { font: 400 1rem/1.8 var(--f); color: var(--label); max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.6rem 1.9rem; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
::selection { background: rgba(var(--accent-rgb), .3); }

/* ---- 文字：大标题粗而紧 ---- */
h1, h2, h3, h4 { line-height: 1.3; margin: 1.4em 0 .5em; color: var(--label); }
h1 { font: 700 2.1rem/1.15 var(--d); letter-spacing: -.03em; }
h2 { font: 700 1.4rem/1.3 var(--d); letter-spacing: -.02em; }
h3 { font: 600 1.1rem/1.45 var(--d); letter-spacing: -.01em; }
h4 { font: 600 .82rem/1.5 var(--f); letter-spacing: .02em; color: var(--label3); }
:is(h1, h2, h3, h4):first-child { margin-top: 0; }
p { margin: .65em 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
strong, b { font-weight: 650; color: var(--label); }
em { font-style: normal; color: var(--accent-text); }
small, .meta { color: var(--label3); font-size: .84rem; }
.meta { display: block; margin: -.3em 0 1em; }
.lede { font-size: 1.18rem; line-height: 1.7; margin: 0 0 1em; color: var(--label2); font-weight: 400; letter-spacing: -.01em; }
.muted { color: var(--label3); }
.center { text-align: center; }
mark { color: inherit; background: var(--mark); padding: 0 .15em; border-radius: 3px; }
code { font: .88em var(--mono); color: var(--label); background: var(--fill); padding: .1em .38em; border-radius: 6px; }
/* 按键：一颗小玻璃键帽 */
kbd { display: inline-block; min-width: 1.8em; padding: 0 .5em; font: 500 .8em/1.85 var(--f); text-align: center; color: var(--label); background: var(--glass-hi);
  border-radius: .5em; box-shadow: inset 0 1px 0 var(--rim-a), 0 0 0 .5px var(--hair), 0 1px 2px rgba(0, 0, 0, .12); }
pre { font: .86rem/1.6 var(--mono); color: var(--label); background: var(--fill); padding: .85rem 1rem; overflow: auto; border-radius: 14px; }
pre code { font: inherit; background: none; padding: 0; }
hr { border: 0; height: .5px; margin: 1.8em 0; background: var(--hair); }

/* 用户原话：一个蓝色的消息气泡，靠右，右下角带小尾巴；出处是气泡下面的灰色小字 */
blockquote { position: relative; width: fit-content; max-width: min(88%, 34rem); margin: 1.3em 0 1.3em auto; padding: .6rem 1rem .65rem; font-size: 1.04rem; line-height: 1.6; color: #fff;
  background: linear-gradient(180deg, var(--bubble-a), var(--bubble-b)); border-radius: 1.25rem; }
blockquote::after { content: ""; position: absolute; right: -.38rem; bottom: 0; width: 1.25rem; height: 1.25rem; background: var(--bubble-b);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2020%2020'%3E%3Cpath%20d%3D'M0%200H8Q8%2013%2020%2020Q6%2021%200%2014Z'%20fill%3D'%23000'%2F%3E%3C%2Fsvg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2020%2020'%3E%3Cpath%20d%3D'M0%200H8Q8%2013%2020%2020Q6%2021%200%2014Z'%20fill%3D'%23000'%2F%3E%3C%2Fsvg%3E") 0 0 / 100% 100% no-repeat; }
blockquote > :first-child { margin-top: 0; } blockquote > :last-child { margin-bottom: 0; }
blockquote p { margin: .3em 0; }
blockquote :is(strong, b, em) { color: #fff; }
blockquote a { color: #fff; text-decoration: underline; }
blockquote cite { position: absolute; right: .2rem; top: 100%; margin-top: .25rem; white-space: nowrap; font: 500 .74rem var(--f); font-style: normal; color: var(--label3); }
blockquote:has(cite) { margin-bottom: 2.4em; }

/* ---- 列表 / 表格：表格是分组圆角列表 ---- */
ul, ol { padding-left: 1.4em; } li { margin: .28em 0; }
ul > li::marker { color: var(--label4); }
ol > li::marker { color: var(--label3); font-weight: 600; font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; margin: 1.1em 0; font-size: .95rem;
  background: var(--glass); border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 .5px var(--hair); }
th { text-align: left; font: 600 .76rem/1.5 var(--f); letter-spacing: .02em; padding: .55rem .9rem .4rem; color: var(--label3); white-space: nowrap; }
td { padding: .55rem .9rem; border-top: .5px solid var(--hair); }
tr:hover > td { background: var(--fill); }
/* 选中的一行：系统蓝淡底，第一格前面一枚对勾 */
tr.pick > td, td.pick { background: rgba(var(--accent-rgb), .12); color: var(--accent-text); font-weight: 600; }
tr.pick > td:first-child::before { content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .45em; vertical-align: -.15em; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M6%2012.5L10.2%2016.6L18%207.8'%20fill%3D'none'%20stroke%3D'%23fff'%20stroke-width%3D'2.6'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%2F%3E%3C%2Fsvg%3E") 50% 50% / 80% no-repeat, var(--accent); }
.num { text-align: right; }
/* 键值：设置页那种分组列表，名字在左，值灰色在右 */
dl.kv { display: grid; grid-template-columns: max-content 1fr; margin: 1em 0; padding: 0 1rem; background: var(--glass); border-radius: 14px; box-shadow: inset 0 0 0 .5px var(--hair); }
dl.kv dt, dl.kv dd { padding: .55rem 0; border-top: .5px solid var(--hair); }
dl.kv dt:first-of-type, dl.kv dt:first-of-type + dd { border-top: 0; }
dl.kv dt { color: var(--label); padding-right: 1.4rem; }
dl.kv dd { margin: 0; text-align: right; color: var(--label2); font-variant-numeric: tabular-nums; }

/* ---- 媒体：大圆角，柔和投影 ---- */
img, video, svg, canvas { max-width: 100%; height: auto; }
video { width: 100%; background: #000; }
audio { width: 100%; margin: .6em 0; }
img, video { display: block; border-radius: 16px; box-shadow: 0 0 0 .5px var(--hair), 0 8px 24px rgba(0, 0, 0, .12); }
figure { position: relative; margin: 1.6em 0; }
figure > img, figure > video { margin: 0 auto; }
figcaption { color: var(--label3); font-size: .84rem; text-align: center; margin-top: .6rem; }
figure video { display: block; margin: 0 auto; max-width: 100%; height: auto; }
figure.portrait video { max-height: 720px; width: auto; }

/* ---- 窗口：分组卡片 ---- */
.win { position: relative; margin: 1em 0; padding: .85rem 1.05rem; background: var(--glass); border-radius: 18px; box-shadow: inset 0 1px 0 var(--inner), inset 0 0 0 .5px var(--hair), 0 2px 10px rgba(0, 0, 0, .05); }
.win > :first-child { margin-top: 0; } .win > :last-child { margin-bottom: 0; }
.win > :is(h2, h3):first-child { margin: 0 0 .45rem; font: 600 1.02rem/1.5 var(--d); letter-spacing: -.01em; }

/* 旁注：整理是带「整理」小标题的分组卡片；疑问是橙色的「待解」 */
.note { position: relative; margin: 1.4em 0; padding: .8rem 1.1rem .9rem; color: var(--label2); background: var(--glass); border-radius: 18px; box-shadow: inset 0 1px 0 var(--inner), inset 0 0 0 .5px var(--hair); }
.note::before { content: "整理"; display: block; margin: 0 0 .35rem; font: 600 .78rem/1.5 var(--f); letter-spacing: .02em; color: var(--accent-text); }
.note > :first-child { margin-top: 0; } .note > :last-child { margin-bottom: 0; }
.note.q::before { content: "待解"; color: var(--orange); }

/* ---- 布局 ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: .8rem; margin: 1em 0; }
:is(.grid, .cols) > .win { margin: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1em 0; }
@media (max-width: 560px) { body { padding: 1.1rem 1.05rem 1.5rem; } .cols { grid-template-columns: 1fr; } }

/* ---- 数据：小组件式的大数字，系统进度条 ---- */
.stat { display: flex; flex-direction: column; gap: .1em; text-align: left; min-width: 0; container-type: inline-size; }
.stat > span { order: -1; color: var(--label3); font: 600 .78rem/1.4 var(--f); letter-spacing: .02em; }
.stat b { font: 700 clamp(1.8rem, 7vw, 2.4rem)/1.1 var(--d); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--label); }
/* 大数字按卡片宽度缩放（「2013–2016」「100–200 万」这类长数字也放得下），不溢出卡片 */
@supports (font-size: 1cqi) { .stat b { font-size: clamp(1.15rem, 15cqi, 2.4rem); } }
.up, .down { font-variant-numeric: tabular-nums; }
.up { color: var(--good); } .up::before { content: "▲"; font-size: .55em; margin-right: .2em; vertical-align: .2em; }
.down { color: var(--bad); } .down::before { content: "▼"; font-size: .55em; margin-right: .2em; vertical-align: .2em; }
.stat b.up { color: var(--good); } .stat b.down { color: var(--bad); }
/* 数据条：胶囊进度条，蓝 / 绿 / 橙轮着用 */
.bar { position: relative; height: 8px; margin: 12px 0; background: var(--fill-2); border-radius: 999px; overflow: hidden; }
.bar::before { content: ""; display: block; height: 100%; width: var(--v, 0%); max-width: 100%; background: var(--accent); border-radius: 999px; }
.bar + .bar::before { background: var(--green); }
.bar + .bar + .bar::before { background: var(--orange); }
/* 标签：灰色小胶囊 */
.tag { display: inline-block; font: 500 .8rem/1.8 var(--f); padding: 0 .75em; white-space: nowrap; margin: 0 .4rem .4rem 0; color: var(--label2); background: var(--fill); border-radius: 999px; }

/* 时间线：一道细竖线，节点是空心圆，第一颗是系统蓝实心圆 */
ol.steps { list-style: none; padding: 0; margin: 1em 0 1em .1rem; }
ol.steps li { position: relative; padding: 0 0 1.05em 1.7rem; margin: 0; }
ol.steps li::before { content: ""; position: absolute; left: 0; top: .42em; width: .78rem; height: .78rem; border-radius: 50%; box-sizing: border-box; border: 2px solid var(--accent); background: transparent; }
ol.steps li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }
ol.steps li::after { content: ""; position: absolute; left: calc(.39rem - 1px); width: 2px; top: 1.35em; bottom: .1em; border-radius: 1px; background: var(--hair); }
ol.steps li:last-child::after { display: none; }
ol.steps time { display: block; color: var(--label3); font: 600 .8rem/1.6 var(--f); font-variant-numeric: tabular-nums; }

/* 折叠：分组卡片，右边一枚会转的 › */
details { margin: 1em 0; padding: .6rem 1rem; background: var(--glass); border-radius: 14px; box-shadow: inset 0 0 0 .5px var(--hair); }
summary { cursor: pointer; list-style: none; display: flex; align-items: center; font-weight: 600; color: var(--label); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; margin-left: auto; width: .8rem; height: .8rem; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%3E%3Cpath%20d%3D'M9%205.5L15.5%2012L9%2018.5'%20fill%3D'none'%20stroke%3D'%23a1a1a8'%20stroke-width%3D'2.4'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%2F%3E%3C%2Fsvg%3E") 50% 50% / contain no-repeat; transition: transform .2s; }
details[open] summary::after { transform: rotate(90deg); }
details[open] summary { margin-bottom: .45em; padding-bottom: .45em; border-bottom: .5px solid var(--hair); }

/* 按钮、输入框（交互式 artifact 用）：玻璃胶囊，选中是系统蓝 */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: .3rem 1.05rem; color: var(--accent-text); background: var(--glass-hi);
  border: 0; border-radius: 999px; box-shadow: inset 0 1px 0 var(--rim-a), 0 0 0 .5px var(--hair), 0 1px 3px rgba(0, 0, 0, .08); font: 500 .92rem/1.5 var(--f); cursor: pointer; transition: transform .15s; }
button:hover, .btn:hover { transform: scale(1.04); }
button.on { color: #fff; background: var(--accent); }
button:active, .btn:active { transform: scale(.97); }
button:focus-visible, .btn:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .5); outline-offset: 2px; }
input, select, textarea { font: 400 .95rem var(--f); color: var(--label); background: var(--fill); border: 0; border-radius: 10px; padding: .35rem .65rem; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .45); }
