Spaces:
Running on Zero
Running on Zero
File size: 4,760 Bytes
86020e3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | /* =============================================================================
base.css · reset、字体、排版基础
============================================================================= */
/* ── 字体 ────────────────────────────────────────────────────────────────────
自托管,不走 CDN:Google Fonts 在中国大陆被墙,jsdelivr 也不稳。
unicode-range 必须写 —— 保证中英混排时英文一定落在 Instrument Sans 上,
不会被中文字体里的拉丁字形接管(中英混排最常见的翻车点)。 */
@font-face {
font-family: "Instrument Sans";
font-style: normal;
font-weight: 400 700; /* 可变字重,一个 30KB 文件覆盖全部 */
font-display: swap;
src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2-variations");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Instrument Serif";
font-style: italic;
font-weight: 400;
font-display: swap;
src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
unicode-range: U+0000-00FF, U+2000-206F;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* hidden 属性必须能压过组件自己的 display。
UA 样式表里的 [hidden]{display:none} 特异性只有 0-1-0,
任何 .field{display:flex} 都会把它盖掉 —— 元素会"逻辑上隐藏、视觉上还在"。 */
[hidden] { display: none !important; }
html {
-webkit-text-size-adjust: 100%;
scroll-behavior: smooth;
}
html, body { height: 100%; }
body {
font-family: var(--font-sans);
background: var(--field);
color: var(--ink);
font-size: var(--fs-body);
line-height: var(--lh-normal);
letter-spacing: var(--tr-body);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow: hidden; /* 应用外壳自己管滚动 */
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { background: var(--field-sunk); } /* 加载中不留白洞 */
button, input, textarea, select {
font: inherit;
color: inherit;
letter-spacing: inherit;
}
button { background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
textarea { resize: none; }
/* 键盘焦点:墨色实线,任何底色上都清楚。鼠标点击不出现。 */
:focus-visible {
outline: 2px solid var(--ink);
outline-offset: 2px;
border-radius: var(--r-sm);
}
::selection { background: var(--bronze-wash); }
.sr-only {
position: absolute; width: 1px; height: 1px;
padding: 0; margin: -1px; overflow: hidden;
clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* 时间码、时长、计数一律用等宽数字,不用等宽字体 ——
等宽字体会让播放器带上"终端工具"的味道,和 Apple 观感相反。 */
.tnum { font-variant-numeric: tabular-nums; }
/* 细滚动条,不抢视觉 */
* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
background: var(--rule-strong);
border: 3px solid transparent;
border-radius: 99px;
background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: content-box; }
/* ── 通用排版件 ──────────────────────────────────────────────────────────── */
.eyebrow {
font-size: var(--fs-eyebrow);
font-weight: var(--fw-semi);
letter-spacing: var(--tr-eyebrow);
text-transform: uppercase;
color: var(--bronze);
display: inline-flex;
align-items: center;
gap: 9px;
font-family: var(--font-mono);
}
.eyebrow::before {
content: "";
width: 18px; height: 1.5px;
background: var(--bronze);
flex: none;
}
.page-title {
font-size: var(--fs-h1);
font-weight: var(--fw-semi);
letter-spacing: var(--tr-h1);
line-height: var(--lh-snug);
}
.page-lead {
font-size: var(--fs-lead);
color: var(--ink-2);
margin-top: 10px;
max-width: 62ch;
line-height: 1.6;
}
.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; flex: none; }
@media (prefers-reduced-motion: reduce) {
html { scroll-behavior: auto; }
}
|