/* ==========================================================================
   设计令牌 + 基础重置（导航站与个人主页共用）
   法律编辑风 · 沉稳专业：琥珀 / 石墨墨 / 奶油纸白
   零网络字体，离线可用
   ========================================================================== */

:root {
  /* 色板 */
  --paper:          #faf8f4;
  --paper-2:        #f4f0e8;
  --card:           #ffffff;
  --ink:            #1c1917;
  --ink-soft:       #57534e;
  --ink-mute:       #6b6359; /* 加深以满足 WCAG AA 小字对比（原 #8a8279 偏浅） */
  --ink-panel:      #211d1a;
  --ink-panel-2:    #2c2722;
  --amber:          #b45309;
  --amber-deep:     #78350f;
  --amber-bright:   #e0902f;
  --hairline:       #e7e1d4;
  --hairline-strong:#d6cdba;

  /* 字体栈（系统衬线 + 中文无衬线，无外部加载） */
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", Georgia,
                "Times New Roman", serif;
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei",
               "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* 字号（流式） */
  --fs-eyebrow: 0.76rem;
  --fs-small:   0.86rem;
  --fs-body:    1rem;
  --fs-lead:    clamp(1.05rem, 0.98rem + 0.4vw, 1.22rem);
  --fs-h3:      1.15rem;
  --fs-h2:      clamp(1.45rem, 1.15rem + 1.3vw, 2.05rem);
  --fs-display: clamp(2.1rem, 1.35rem + 3.3vw, 3.5rem);

  /* 间距 / 尺寸 */
  --maxw:          1180px;
  --space-section: clamp(2.6rem, 1.9rem + 3vw, 4.6rem);
  --gap:           1rem;
  --radius:        11px;
  --radius-sm:     7px;

  /* 动效 */
  --dur:  200ms;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);

  /* 阴影 */
  --shadow-1: 0 1px 2px rgba(28, 25, 23, 0.05), 0 1px 0 rgba(28, 25, 23, 0.02);
  --shadow-2: 0 14px 34px -20px rgba(28, 25, 23, 0.4);
}

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

html { -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 6.5rem; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

img { max-width: 100%; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

/* 编辑风栏目眉标 */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber-deep);
}

.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-left: max(clamp(1.1rem, 0.6rem + 2vw, 2.4rem), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(1.1rem, 0.6rem + 2vw, 2.4rem), env(safe-area-inset-right, 0px));
}

/* 可见焦点环（无障碍） */
:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 跳到主内容（键盘无障碍）：聚焦前隐藏，聚焦显现 */
.skip-link {
  position: absolute;
  left: 10px;
  top: -52px;
  z-index: 60;
  padding: 0.55rem 1.05rem;
  background: var(--ink-panel);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  box-shadow: var(--shadow-2);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 10px; outline: 2px solid var(--amber); outline-offset: 2px; }

/* 仅供屏幕阅读器（全站共用） */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
