/* base.css — 字体加载 + reset 与元素默认样式（frontend-execute.md §3.3/§4） */
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-text-1);
  background: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3 {
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-title);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
/* 视觉隐藏但保留在无障碍树里（2026-09-23 新增；供补全标题层级等场景）。
   ⚠ 不用 `display:none` / `visibility:hidden` / `hidden` 属性 —— 那些会把元素**移出无障碍树**，等于没加。
   ⚠ `position:absolute` 是必需的：否则 1×1 的盒仍会占一行，把后续内容推下去。
   ⚠ `clip` 是兼容回退，`clip-path: inset(50%)` 是现行写法，两者都写。 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 桌面稿的硬换行仅在大屏生效（§2 断点行为） */
.title-break {
  display: none;
}

@media (min-width: 1024px) {
  .title-break {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
