/* ==========================================================================
   Hyico · Base
   reset + 语义化排版 + 可访问性基线。不含任何组件样式。
   ========================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  font-weight: var(--fw-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* 主题切换时颜色平滑过渡，避免生硬闪变 */
  transition: background-color var(--dur-3) var(--ease), color var(--dur-3) var(--ease);
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

/* ---------- 标题 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semi);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: var(--fs-display); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-lg); line-height: var(--lh-snug); }

/* ---------- 正文元素 ---------- */
p {
  text-wrap: pretty;
}

a {
  color: var(--accent-strong);
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 0.22em;
  transition: color var(--dur-1) var(--ease), text-decoration-color var(--dur-1) var(--ease);
}

a:hover { text-decoration-color: currentColor; }

a:not([class]):hover { color: var(--text); }

strong, b { font-weight: var(--fw-semi); color: var(--text); }

small { font-size: var(--fs-sm); }

hr {
  height: 1px;
  border: 0;
  background: var(--border);
}

/* ---------- 列表 ---------- */
ul, ol { padding-inline-start: 1.25em; }

li::marker { color: var(--text-3); }

/* ---------- 媒体 ---------- */
img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

svg { fill: none; }

img { object-fit: cover; }

/* ---------- 表单基线 ---------- */
input, textarea, select, button {
  font: inherit;
  color: inherit;
  border-radius: var(--r-sm);
}

button { cursor: pointer; background: none; border: 0; padding: 0; }

textarea { resize: vertical; }

::placeholder { color: var(--text-3); opacity: 1; }

/* ---------- 焦点可见性：只在键盘操作时出现 ---------- */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---------- 选区 ---------- */
::selection {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* ---------- 滚动条（仅 WebKit，保持克制） ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--border-strong) 70%, transparent);
  border-radius: var(--r-full);
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--border-strong); background-clip: content-box; }

/* ==========================================================================
   可访问性工具类
   ========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: var(--s-3);
  left: var(--s-3);
  z-index: var(--z-skip);
  padding: var(--s-2) var(--s-4);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  transform: translateY(calc(-100% - var(--s-4)));
  transition: transform var(--dur-2) var(--ease);
}

.skip-link:focus-visible { transform: translateY(0); }

[hidden] { display: none !important; }

/* 减少动效偏好下，关闭所有装饰性动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   .prose —— 长文正文排版（新闻 / 职位详情 / FAQ 答案）
   ========================================================================== */
.prose {
  font-size: var(--fs-lg);
  line-height: 1.85;
  color: var(--text-2);
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  margin-top: 2em;
  font-size: var(--fs-h3);
  color: var(--text);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: var(--fs-lg);
  color: var(--text);
}

.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: 0.4em; }

.prose blockquote {
  margin: 1.6em 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.15em 0.4em;
  background: var(--accent-soft);
  border-radius: var(--r-xs);
}

/* 强制换行保护：中文长串不撑破容器 */
.prose, .card, .section__head { overflow-wrap: anywhere; }
.prose :is(h1, h2, h3) { overflow-wrap: normal; }
