/* ==========================================================================
   Shenmac-001 天马行空 · foundation（重置 + 设计令牌 + 基础排版）
   --------------------------------------------------------------------------
   设计语系：夜空 / 星芒金 / 宋体标题 / 细线分面 / 星穹弧圆角。
   ⚠️ 与站内其它模板的分界（改样式前先看这几条，避免不知不觉「长回现款」）：
     · 底色是**深空蓝黑**（冷色相，不是纯黑也不是暖灰）
     · 强调色**只有星芒金一种**（按钮一律深金底白字，禁金底黑字）
     · 标题一律**宋体衬线**（--tm-serif），正文/界面用无衬线（--tm-sans）
     · 圆角最大 16px（星穹弧 4/8/12/16），阴影冷调深投，悬停点亮靠金晕
   ========================================================================== */

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

html {
    min-width: 320px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--tm-anchor-offset, 80px);
}

body {
    margin: 0;
    background: var(--tm-paper);
    color: var(--tm-ink);
    font: var(--tm-fs-base)/var(--tm-lh) var(--tm-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: var(--tm-lh-tight); color: var(--tm-ink); }
h1 { font-size: var(--tm-fs-h1); font-family: var(--tm-serif); }
h2 { font-size: var(--tm-fs-lg); font-family: var(--tm-serif); }
h3 { font-size: var(--tm-fs-md); font-family: var(--tm-serif); }
h4 { font-size: var(--tm-fs-base); }
p, dl, dd, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
::selection { background: var(--tm-accent-soft); color: var(--tm-ink); }

/* 键盘可达性：只在键盘导航时出焦点环（鼠标点击不出，保证画面干净） */
:focus-visible {
    outline: 2px solid var(--tm-accent);
    outline-offset: 2px;
    border-radius: var(--tm-r-xs);
}

/* 视觉隐藏但保留语义（页头 h1 / 表格说明等） */
.tm-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* 图片/区块的骨架底色：加载期间不该是刺眼的纯白 */
.tm-ph { background: var(--tm-surface-3); }
