/* ==========================================================================
   Folio 模板 · foundation（重置 + 设计令牌 + 基础排版）
   --------------------------------------------------------------------------
   设计语系：宣纸 / 朱砂 / 宋体标题 / 细线分面 / 小圆角。
   ⚠️ 与站内其它模板的分界（改样式前先看这几条，避免不知不觉「长回现款」）：
     · 底色是**宣纸米白**（暖色相，不是纯白也不是冷灰）
     · 强调色**只有朱砂红一种**，不给渐变、不给第二个彩色
     · 标题一律**宋体衬线**（--fo-serif），正文/界面用无衬线（--fo-sans）
     · 圆角最大 10px（现款多为 13–18px 大圆角），阴影极浅或不用，靠 1px 线分面
   ========================================================================== */

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

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

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

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: var(--fo-lh-tight); color: var(--fo-ink); }
h1 { font-size: var(--fo-fs-h1); font-family: var(--fo-serif); }
h2 { font-size: var(--fo-fs-lg); font-family: var(--fo-serif); }
h3 { font-size: var(--fo-fs-md); font-family: var(--fo-serif); }
h4 { font-size: var(--fo-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(--fo-accent-soft); color: var(--fo-ink); }

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

/* 视觉隐藏但保留语义（页头 h1 / 表格说明等） */
.fo-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;
}

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