/* ==========================================================================
   Atlas 模板 · foundation（重置 + 设计令牌 + 基础排版）
   --------------------------------------------------------------------------
   设计语系：冷白纸底 / 靛蓝主色 / 橙色点缀 / 全无衬线 / 锐利小圆角 / 高信息密度。
   ⚠️ 与站内其它模板的分界线（改样式前先看这几条，避免不知不觉「长回现款」）：
     · 底色是**冷色相的白**（带蓝调，不是 folio 的暖米白，也不是纯白）
     · 主色只有**靛蓝**一种，**橙**只用于「当前态 / 强调数字」，不做渐变
     · 标题与正文**同一个无衬线字族**（folio 是宋体衬线标题），靠字重与字号分层
     · 圆角最大 8px（现款多为 13–18px 大圆角），分面靠 1px 线，阴影只在悬浮时出现
     · 版面密度是身份：板块间距 14–18px，卡片间隙 8px（folio 是 20–30px）
   ========================================================================== */

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

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

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

h1, h2, h3, h4, h5 { margin: 0; font-weight: 700; line-height: var(--at-lh-tight); color: var(--at-ink); }
h1 { font-size: var(--at-fs-h1); }
h2 { font-size: var(--at-fs-xl); }
h3 { font-size: var(--at-fs-md); }
h4 { font-size: var(--at-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(--at-navy-s); color: var(--at-ink); }

/* 数字一律等宽，行式榜单与统计条才不会左右抖 */
strong, b, em, i, .at-num, .at-card__score, .at-resultbar b {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* 键盘可达性：只给键盘导航出焦点环 */
:focus-visible {
    outline: 2px solid var(--at-orange);
    outline-offset: 2px;
    border-radius: var(--at-r-xs);
}

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

/* 图片骨架底色：加载期间不刺眼 */
.at-ph { background: var(--at-surface-3); }
