@charset "UTF-8";
/* =============================================================================
   hebang-base.css —— 基础层：重置、排版、容器、可访问性原语

   只放抹平浏览器差异、把排版挂到 token、补齐 WordPress 必需的可访问性类这三件事，
   不带具体外观的组件样式。本层不得出现颜色、字号、间距字面量：基础层的漏改影响全站。
   ============================================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 锚点跳转要给 sticky 页头让位，否则标题被页头压住 */
  scroll-padding-top: var(--hebang-header-h-sticky);
  /* 关于段浮图可伸出内容列；横向裁切须作用于 html，避免布局视口被撑宽。 */
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  background-color: var(--hebang-color-surface);
  color: var(--hebang-color-ink);
  font-family: var(--hebang-font-sans);
  font-size: var(--hebang-fs-body);
  font-weight: var(--hebang-weight-medium);
  line-height: var(--hebang-lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 长单词语种按内容语言自动连字符断行，保护标题、规格表与界面控件。 */
:lang(de),
:lang(ru),
:lang(fr),
:lang(es) {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--hebang-space-6);
  color: var(--hebang-color-ink);
  font-family: var(--hebang-font-sans);
  font-weight: var(--hebang-weight-semibold);
  line-height: var(--hebang-lh-head);
  /* 长单词与型号串（如 JP-2002B）在窄屏不撑破容器 */
  overflow-wrap: break-word;
}

h1 { font-size: var(--hebang-fs-h1); line-height: var(--hebang-lh-display); }
h2 { font-size: var(--hebang-fs-h2); }
h3 { font-size: var(--hebang-fs-h3); }
h4 { font-size: var(--hebang-fs-h4); }
h5 { font-size: var(--hebang-fs-h5); }
h6 { font-size: var(--hebang-fs-h6); }

p {
  margin: 0 0 var(--hebang-space-6);
  color: var(--hebang-color-text);
  line-height: var(--hebang-lh-body);
}

a {
  color: var(--hebang-color-primary-text);
  text-decoration: none;
  transition: var(--hebang-transition-fast);
}

a:hover,
a:focus {
  color: var(--hebang-color-primary);
}

/* 焦点环只在键盘操作时出现：鼠标点击也画环会让界面一直显脏 */
:focus-visible {
  outline: none;
  box-shadow: var(--hebang-focus-ring);
  border-radius: var(--hebang-radius-sm);
}

/* 不支持 :focus-visible 的浏览器退回默认轮廓，不在这里抹掉 */
:focus:not(:focus-visible) {
  outline: none;
}

ul,
ol {
  margin: 0 0 var(--hebang-space-6);
  padding-left: var(--hebang-space-6);
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

img {
  /* 图片加载完成前不留空白跳动：宽高由 HTML 属性给出，这里只兜底 */
  display: block;
}

figure {
  margin: 0 0 var(--hebang-space-6);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--hebang-space-6);
}

th,
td {
  padding: var(--hebang-space-3) var(--hebang-space-5);
  border: var(--hebang-border);
  text-align: left;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* --- 版心容器 --- */

.hebang-container,
.hebang-container-wide,
.hebang-container-std,
.hebang-container-narrow {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--hebang-gutter);
  padding-right: var(--hebang-gutter);
}

.hebang-container { max-width: var(--hebang-container); }
.hebang-container-wide { max-width: var(--hebang-container-wide); }
.hebang-container-std { max-width: var(--hebang-container-std); }
.hebang-container-narrow { max-width: var(--hebang-container-narrow); }

/* 长文阅读宽。正文行宽超过约 75 字符会显著增加跳行概率 */
.hebang-prose {
  max-width: var(--hebang-container-text);
}

.hebang-prose p,
.hebang-prose li {
  color: var(--hebang-color-text);
  line-height: var(--hebang-lh-relaxed);
}

/* --- WordPress 可访问性与核心类 --- */

/* 读屏可见、视觉隐藏。不得用 display:none —— 那会让读屏与键盘一并失去它 */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: static !important;
  width: auto;
  height: auto;
  margin: 0;
  padding: var(--hebang-space-3) var(--hebang-space-6);
  clip: auto;
  background: var(--hebang-color-surface);
  color: var(--hebang-color-ink);
  box-shadow: var(--hebang-shadow);
  z-index: var(--hebang-z-header);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--hebang-space-6);
  padding: var(--hebang-space-3) var(--hebang-space-6);
  background: var(--hebang-color-primary-dark);
  color: var(--hebang-color-white);
  z-index: var(--hebang-z-header);
}

/* 聚焦时立即盖过固定页头，避免通用隐藏文本规则和链接过渡延迟露出。 */
.skip-link.screen-reader-text:focus {
  position: fixed !important;
  top: var(--hebang-space-3);
  left: var(--hebang-space-6);
  background: var(--hebang-color-primary-dark);
  color: var(--hebang-color-white);
  z-index: 10000;
  transition: none;
}

.alignleft {
  float: left;
  margin: 0 var(--hebang-space-6) var(--hebang-space-6) 0;
}

.alignright {
  float: right;
  margin: 0 0 var(--hebang-space-6) var(--hebang-space-6);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption,
.gallery-caption {
  max-width: 100%;
  color: var(--hebang-color-muted);
  font-size: var(--hebang-fs-body-sm);
}

.sticky,
.bypostauthor {
  /* WordPress 要求的类，本主题不为其附加外观 */
}

/* --- 动效偏好 --- */

@media (width < 768px) {
  .hebang-page-content h1 {
    font-size: var(--hebang-mobile-page-title);
    line-height: 1.25;
  }

  .hebang-page-content h2 {
    font-size: var(--hebang-mobile-reading-title);
    line-height: 1.45;
  }
}

/* 只关时长与位移，不关状态变化：关掉状态变化会让交互失去反馈 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
