/* 星屿光年设计语言 · 组件层（/resources/brand/components.css）。只用 tokens.css 的变量；页面 CSS 只管排版位置。 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--canvas); overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; font-family: var(--sans); font-size: 15px; line-height: 1.6; font-weight: 400;
  color: var(--ink); background: var(--ambient), var(--canvas); background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-autospace: normal; text-spacing-trim: space-first; font-kerning: normal;
  overflow-x: clip; transition: --h 1.2s var(--ease);
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-wash); color: var(--ink); }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.ph { display: inline-block; }                     /* 分句成组断行：一个分句不拆到两行 */
.latin { font-family: "Geist", var(--sans); letter-spacing: -.045em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 眉题：光点 + 等宽小字 + 细线 ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: var(--fs-meta); line-height: 1; letter-spacing: var(--ls-meta); color: var(--ink-3); text-transform: uppercase; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash), 0 0 12px var(--accent-soft); }
.eyebrow .sep { width: 18px; height: 1px; background: var(--hair-2); }
.eyebrow b { font-weight: 500; color: var(--ink-2); }

/* ---------- 元信息：等宽标签在上，值在下 ---------- */
.meta { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.meta > div { display: grid; gap: 6px; }
.meta span { font-family: var(--mono); font-size: 11px; letter-spacing: var(--ls-meta); color: var(--ink-3); text-transform: uppercase; }
.meta b { font-size: 15px; font-weight: 500; color: var(--ink); }

/* ---------- 顶栏：毛玻璃 + 发丝线 ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--glass); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter); border-bottom: 1px solid var(--hair); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.brand .mark { width: 22px; height: 22px; }
.brand .where { color: var(--ink-3); font-weight: 400; }
.brand .where::before { content: "/"; margin: 0 8px 0 2px; color: var(--ink-4); }
.nav-links { display: flex; gap: 2px; min-width: 0; overflow: hidden; }
.nav-links a { position: relative; padding: 7px 11px; font-size: 14px; color: var(--ink-2); border-radius: 8px; white-space: nowrap; transition: color var(--t-fast), background var(--t-fast); }
.nav-links a:hover { color: var(--ink); background: var(--sunk); }
.nav-links a[aria-current] { color: var(--ink); font-weight: 500; }
.nav-links a[aria-current]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -11px; height: 1.5px; background: var(--ink); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-menu { display: none; width: 40px; height: 40px; border-radius: 12px; align-items: center; justify-content: center; box-shadow: var(--shadow-1); background: var(--paper); }
.nav-menu span { display: block; width: 16px; height: 1.5px; background: var(--ink); box-shadow: 0 5px 0 var(--ink); transform: translateY(-2.5px); }

/* 手机菜单：顶栏下面展开一张毛玻璃的栏目表 */
.nav-sheet { border-top: 1px solid var(--hair); max-height: calc(100svh - 56px); overflow: auto; overscroll-behavior: contain; }
.nav-sheet .wrap { display: grid; padding-top: 6px; padding-bottom: 20px; }
.nav-sheet a { display: grid; gap: 2px; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.nav-sheet a:last-child { border-bottom: 0; }
.nav-sheet b { font-size: 16px; font-weight: 500; }
.nav-sheet span { font-size: 13px; color: var(--ink-3); }
.nav-sheet a[aria-current] b { color: var(--accent); }
.nav-menu span { transition: transform var(--t) var(--ease), box-shadow var(--t-fast); }
.nav-menu[aria-expanded="true"] span { box-shadow: none; transform: rotate(45deg); }
.nav-menu[aria-expanded="true"] span::after { content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 1.5px; background: var(--ink); transform: rotate(-90deg); }
.nav-menu span { position: relative; }
@media (min-width: 861px) { .nav-sheet { display: none !important; } }

/* ---------- 按钮：主按钮是墨色，不是蓝色 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t-fast); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--ink); color: var(--on-ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px var(--ink), 0 1px 2px rgba(11,13,18,.2), 0 10px 24px -10px rgba(11,13,18,.45); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px var(--ink), 0 2px 4px rgba(11,13,18,.2), 0 18px 34px -12px oklch(0.45 0.15 var(--h) / .55); }
.btn-quiet { background: var(--paper); color: var(--ink); box-shadow: var(--highlight), var(--shadow-1); }
.btn-quiet:hover { transform: translateY(-1px); box-shadow: var(--highlight), var(--shadow-2); }
.btn-s { height: 36px; padding: 0 15px; font-size: 13px; }
.btn .arr { transition: transform var(--t) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn .fine { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--ink-3); }
.btn-primary .fine { color: color-mix(in srgb, var(--on-ink) 60%, transparent); }

/* ---------- 段头：编号 + 眉题 + 标题 + 去处，底下一条发丝线 ---------- */
.sec { position: relative; padding-top: var(--section); }
.sec-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 28px; padding-bottom: 28px; margin-bottom: 40px; border-bottom: 1px solid var(--hair); }
.sec-no { align-self: start; padding-top: 4px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.sec-title .eyebrow { margin-bottom: 16px; }
.sec-title h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: 700; letter-spacing: var(--ls-h2); text-wrap: balance; }
.sec-more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: color var(--t-fast); }
.sec-more:hover { color: var(--ink); }
.sec-more .arr { transition: transform var(--t) var(--ease); }
.sec-more:hover .arr { transform: translateX(3px); }
.sec-note { margin-top: 20px; font-family: var(--mono); font-size: var(--fs-meta); color: var(--ink-3); }

/* ---------- 纸：唯一的"卡片"。放在画布上，靠投影浮起，不靠灰底和描边 ---------- */
.paper { background: var(--paper); border-radius: var(--r-l); box-shadow: var(--highlight), var(--shadow-2); }
a.paper, .paper.lift { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
a.paper:hover, .paper.lift:hover { transform: translateY(-3px); box-shadow: var(--highlight), var(--shadow-3); }

/* ---------- 标签 ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; color: var(--ink-2); background: var(--sunk); white-space: nowrap; }
.chip.c { color: var(--accent); background: var(--accent-wash); }

/* ---------- 栏目图形：墨色线条 + 一颗本色的核（参数生成，见 core.js glyph） ---------- */
.glyph { width: 28px; height: 28px; flex: none; color: var(--ink-3); transition: color var(--t) var(--ease); }
.glyph .core { fill: var(--accent); }

/* ---------- 一件实物：立体的书。浅色页面上唯一的深色东西，景深由它自己带来 ---------- */
.book3d { --w: 240px; position: relative; width: var(--w); aspect-ratio: 3 / 4.1; transform-style: preserve-3d;
  transform: rotateY(var(--ry, -26deg)) rotateX(var(--rx, 5deg)); transition: transform 1s var(--ease); }
.book3d .face, .book3d .spine, .book3d .pages { position: absolute; }
.book3d .face { inset: 0; overflow: hidden; border-radius: 3px 9px 9px 3px; padding: calc(var(--w) * .1) calc(var(--w) * .09) calc(var(--w) * .085) calc(var(--w) * .12); display: flex; flex-direction: column; color: #fff;
  background:
    radial-gradient(120% 70% at 100% 0%, oklch(0.62 0.13 var(--h) / .55), transparent 62%),
    linear-gradient(162deg, oklch(0.34 0.05 var(--h)), oklch(0.19 0.025 var(--h)) 74%);
  transform: translateZ(calc(var(--w) * .066));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), inset 0 1px 0 rgba(255,255,255,.25); }
.book3d .face::before { content: ""; position: absolute; left: calc(var(--w) * .055); top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.12); box-shadow: 1px 0 0 rgba(0,0,0,.25); } /* 书脊压痕 */
.book3d .face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(112deg, rgba(255,255,255,.20), transparent 30%, transparent 72%, rgba(255,255,255,.06)); } /* 覆膜反光 */
.book3d .spine { left: 0; top: 0; bottom: 0; width: calc(var(--w) * .132); border-radius: 3px; background: linear-gradient(90deg, oklch(0.16 0.02 var(--h)), oklch(0.26 0.04 var(--h))); transform-origin: left; transform: rotateY(-90deg) translateX(calc(var(--w) * -.066)); }
.book3d .pages { top: 5px; bottom: 5px; right: 0; width: calc(var(--w) * .125); border-radius: 2px; background: repeating-linear-gradient(90deg, #d9dbe1 0 1px, #f6f7f9 1px 3px); transform-origin: right; transform: rotateY(90deg) translateX(calc(var(--w) * .0625)); }
.book3d .glyph { position: absolute; right: -22%; bottom: -14%; width: 88%; height: auto; aspect-ratio: 1; color: oklch(0.86 0.16 var(--h)); filter: drop-shadow(0 0 14px oklch(0.80 0.15 var(--h) / .7)); }
.book3d .glyph .core { fill: oklch(0.86 0.16 var(--h)); }
.book3d .t { position: relative; font-size: calc(var(--w) * .15); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.book3d .s { position: relative; margin-top: calc(var(--w) * .045); font-size: max(11px, calc(var(--w) * .052)); line-height: 1.5; color: rgba(255,255,255,.72); max-width: 11em; }
.book3d .a { position: relative; margin-top: auto; font-size: max(11px, calc(var(--w) * .05)); color: rgba(255,255,255,.78); }
.book3d .k { position: relative; margin-top: 6px; font-family: var(--mono); font-size: max(9px, calc(var(--w) * .038)); letter-spacing: .12em; color: rgba(255,255,255,.45); }
/* 小于 120px 的书只留书名和图形 */
.book3d.sm .s, .book3d.sm .a, .book3d.sm .k { display: none; }
.book3d.sm .t { font-size: calc(var(--w) * .17); }
/* 书放在台面上：接触阴影 + 投到地上的长影 + 本色的环境光 */
.stage { position: relative; display: grid; place-items: center; perspective: 1400px; }
.stage::before { content: ""; position: absolute; left: 50%; bottom: var(--floor, 8%); width: 78%; height: 44px; transform: translateX(-42%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(11,13,18,.34), rgba(11,13,18,.10) 60%, transparent); filter: blur(10px); }
.stage::after { content: ""; position: absolute; inset: -10% -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, oklch(0.84 0.14 var(--h) / .34), oklch(0.84 0.14 var(--h) / .10) 50%, transparent); filter: blur(28px); }

/* 平面的小封面（书架上的书）：同一套颜色，没有厚度 */
.cover { position: relative; aspect-ratio: 3 / 4; border-radius: 3px 7px 7px 3px; overflow: hidden; padding: 10px 9px; display: flex; flex-direction: column; color: #fff;
  background: radial-gradient(120% 80% at 100% 0%, oklch(0.62 0.13 var(--h) / .5), transparent 60%), linear-gradient(162deg, oklch(0.34 0.05 var(--h)), oklch(0.19 0.025 var(--h)) 74%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 1px 2px rgba(11,13,18,.2), 0 10px 20px -10px rgba(11,13,18,.45); }
.cover::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.12); }
.cover .glyph { position: absolute; right: -20%; bottom: -12%; width: 80%; height: auto; aspect-ratio: 1; color: oklch(0.86 0.16 var(--h)); }
.cover .glyph .core { fill: oklch(0.86 0.16 var(--h)); }
.cover-t { position: relative; padding-left: 4px; font-size: 12px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }

/* ---------- 列表行：发丝线分隔，整行可点 ---------- */
.row-link { position: relative; display: grid; align-items: center; transition: background var(--t-fast); border-radius: 12px; }
.row-link + .row-link::before { content: ""; position: absolute; left: var(--inset, 0); right: 0; top: 0; height: 1px; background: var(--hair); }
.row-link:hover { background: var(--sunk); }
.row-link:hover::before, .row-link:hover + .row-link::before { opacity: 0; }
.chev { color: var(--ink-4); transition: transform var(--t) var(--ease), color var(--t-fast); }
.row-link:hover .chev { color: var(--ink); transform: translateX(3px); }

/* ---------- 进场：上浮 12px + 淡入，逐个错开 60ms；截图与"减少动态效果"时直接到位 ---------- */
.rv { opacity: 0; transform: translateY(12px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.rv.in { opacity: 1; transform: none; }
.is-static .rv { opacity: 1; transform: none; transition: none; }
.is-static *, .is-static *::before, .is-static *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ---------- 页脚 ---------- */
.foot { position: relative; margin-top: var(--section); padding: 64px 0 40px; border-top: 1px solid var(--hair); overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; }
.foot p { color: var(--ink-3); font-size: 14px; max-width: 30em; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 24px; }
.foot-cols a { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; padding: 4px 0; transition: color var(--t-fast); }
.foot-cols a:hover { color: var(--ink); }
.foot-word { margin-top: 72px; font-size: clamp(64px, 15vw, 220px); line-height: .9; font-weight: 700; letter-spacing: -.04em; white-space: nowrap; user-select: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 9%, transparent), transparent 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.foot-fine { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; font-size: 12px; color: var(--ink-3); }

@media (max-width: 860px) {
  :root { --section: 88px; }
  .nav-links { display: none; }
  .nav-menu { display: inline-flex; }
  .nav-end .btn { display: none; }
  .nav-in { height: 56px; }
  .sec-head { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-bottom: 20px; margin-bottom: 24px; }
  .sec-no { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-fine { flex-direction: column; }
}

/* ---------- 应用图标：一块本色的"釉"，白色线条图标。入口卡片、通知缩略图、任何"这是哪个功能"的地方用它 ---------- */
.app-icon { --s: 48px; position: relative; flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .3); color: #fff;
  background: var(--glaze);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -1px 0 rgba(0,0,0,.08), inset 0 0 0 1px rgba(0,0,0,.05), 0 1px 2px rgba(11,13,18,.12), 0 8px 18px -8px oklch(0.5 0.15 var(--h) / .6);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.app-icon::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,0) 52%); }
.app-icon .icon, .app-icon .glyph { position: relative; z-index: 1; width: 50%; height: 50%; color: #fff; }
.app-icon .icon { stroke-width: 1.7; }
.app-icon .glyph .core { fill: #fff; }
@supports not (color: oklch(0 0 0)) {
  .app-icon { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 2px rgba(11,13,18,.12), 0 8px 18px -8px rgba(11,13,18,.35); }
}

/* ---------- 状态点：只在"有事"时出现（未响应、失败），平时不占位 ---------- */
.pulse { position: relative; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex: none; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } }
