/* =========================================================
   亚文网 · Site Kit 共享样式
   文件路径：/assets/site.css
   负责：reset / 变量 / 中文排版 / 页头 / 页脚 / 通用组件
   ========================================================= */

/* ---------------------------------------------------------
   1. Reset
   --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  margin: 0;
  padding: 0;
  list-style: none;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a {
  color: inherit;
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
}

#main-content {
  flex: 1 0 auto;
}

/* ---------------------------------------------------------
   2. 设计变量
   --------------------------------------------------------- */
:root {
  /* 主色 */
  --night: #0B1F33;
  --night-2: #132C46;
  --night-3: #1B3A5A;
  --paper: #F5EFE3;
  --paper-2: #E7E1D6;
  --amber: #F2A33A;
  --amber-deep: #B96B1F;
  --celadon: #4FA58D;
  --celadon-mist: #BFD8CE;
  --coral: #D65A3A;
  --ink: #1B1A17;

  /* 线材 */
  --line-night: rgba(245, 239, 227, 0.16);
  --line-night-soft: rgba(245, 239, 227, 0.09);
  --line-night-strong: rgba(245, 239, 227, 0.32);
  --line-paper: rgba(27, 26, 23, 0.16);

  /* 尺寸 */
  --shell-max: 1240px;
  --gutter: clamp(18px, 3.4vw, 40px);
  --radius: 3px;
  --header-offset: 130px;

  /* 字体 */
  --font-head: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  /* 缓动 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------------------------------------------------
   3. 中文排版
   --------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: clamp(34px, 5.2vw, 72px); }
h2 { font-size: clamp(26px, 3.4vw, 46px); }
h3 { font-size: clamp(20px, 2.1vw, 28px); }
h4 { font-size: clamp(17px, 1.5vw, 20px); letter-spacing: 0; line-height: 1.4; }

p {
  text-wrap: pretty;
}

.lede {
  max-width: 62ch;
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.8;
  color: var(--lede-color, rgba(245, 239, 227, 0.8));
}

.measure {
  max-width: 68ch;
}

/* ---------------------------------------------------------
   4. 布局容器
   --------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(44px, 6vw, 88px);
}

.section--paper {
  --lede-color: rgba(27, 26, 23, 0.72);
  --rule-color: rgba(27, 26, 23, 0.14);
  background: var(--paper);
  color: var(--ink);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--rule-color, var(--line-night));
}

/* ---------------------------------------------------------
   5. 跳转链接与焦点
   --------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 999;
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  background: var(--amber);
  color: var(--night);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  transition: top 0.16s var(--ease);
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

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

/* ---------------------------------------------------------
   6. 页头
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--night);
  box-shadow: 0 24px 46px -36px rgba(0, 0, 0, 0.95);
}

/* --- 上层：品牌条 --- */
.header-utility {
  background: var(--night);
  border-bottom: 1px solid var(--line-night-soft);
}

.header-utility__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 2px solid var(--amber);
  border-radius: 2px;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 4px 4px 4px 4px;
  border-radius: 1px;
  background: var(--amber);
}

.brand__name {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--paper);
  white-space: nowrap;
}

.brand__line {
  padding-left: 12px;
  border-left: 1px solid var(--line-night);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(245, 239, 227, 0.52);
  white-space: nowrap;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.header-meta__item {
  color: rgba(245, 239, 227, 0.66);
  transition: color 0.16s var(--ease);
}

a.header-meta__item:hover {
  color: var(--amber);
}

.header-meta__item--time {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(245, 239, 227, 0.46);
}

.header-meta__item--time::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--celadon);
  flex: none;
}

/* --- 下层：栏目索引带 --- */
.header-index {
  position: relative;
  background: var(--night-2);
  border-bottom: 2px solid rgba(242, 163, 58, 0.42);
}

.header-index__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.primary-nav {
  flex: 0 0 auto;
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.primary-nav__list a {
  position: relative;
  display: block;
  padding: 9px 13px;
  border-radius: 2px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(245, 239, 227, 0.76);
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.primary-nav__list a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s var(--ease);
}

.primary-nav__list a:hover {
  color: var(--paper);
  background: rgba(245, 239, 227, 0.07);
}

.primary-nav__list a:hover::after {
  transform: scaleX(1);
}

.primary-nav__list a[aria-current="page"] {
  background: var(--amber);
  color: var(--night);
  box-shadow: inset 0 -2px 0 var(--amber-deep);
}

.primary-nav__list a[aria-current="page"]::after {
  display: none;
}

.primary-nav__list a[aria-current="page"]:hover {
  background: var(--amber);
  color: var(--night);
}

/* --- 检索提示（伪检索框） --- */
.search-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 360px;
  margin-left: 4px;
  padding: 8px 12px;
  border: 1px solid var(--line-night-strong);
  border-radius: 2px;
  background: rgba(11, 31, 51, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(245, 239, 227, 0.6);
  overflow: hidden;
  white-space: nowrap;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease), background-color 0.16s var(--ease);
}

.search-hint:hover {
  border-color: var(--amber);
  background: rgba(11, 31, 51, 0.85);
  color: var(--paper);
}

.search-hint__key {
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(242, 163, 58, 0.6);
  border-radius: 2px;
  background: rgba(242, 163, 58, 0.1);
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.search-hint__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-cta {
  flex: none;
  margin-left: auto;
}

/* --- 移动导航按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line-night-strong);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: border-color 0.16s var(--ease), color 0.16s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.nav-toggle[aria-expanded="true"] {
  border-color: var(--amber);
  color: var(--amber);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
  flex: none;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle__label {
  white-space: nowrap;
}

/* --- 滚动进度 --- */
.scroll-progress {
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0%, var(--celadon) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.1s linear;
  pointer-events: none;
}

/* ---------------------------------------------------------
   7. 按钮
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: center;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease),
    border-color 0.16s var(--ease);
}

.btn--primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--night);
}

.btn--primary:hover {
  background: var(--amber-deep);
  border-color: var(--amber-deep);
  color: var(--paper);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-night-strong);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(242, 163, 58, 0.08);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* ---------------------------------------------------------
   8. 页脚
   --------------------------------------------------------- */
.site-footer {
  margin-top: clamp(40px, 6vw, 72px);
  background: var(--night);
  color: var(--paper);
  border-top: 2px solid rgba(242, 163, 58, 0.5);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3.4vw, 52px);
  padding-top: clamp(38px, 4.6vw, 60px);
  padding-bottom: clamp(32px, 4vw, 52px);
}

.footer-brand__name {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.footer-brand__line {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--amber);
}

.footer-brand__summary {
  margin-top: 16px;
  max-width: 36ch;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(245, 239, 227, 0.64);
}

.footer-brand__cta {
  margin-top: 20px;
}

.footer-col__title {
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-night);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--amber);
}

.footer-col__list {
  display: grid;
  gap: 9px;
}

.footer-col__list a {
  display: inline-block;
  font-size: 14px;
  color: rgba(245, 239, 227, 0.72);
  transition: color 0.16s var(--ease), transform 0.16s var(--ease);
}

.footer-col__list a:hover {
  color: var(--amber);
  transform: translateX(4px);
}

.footer-contact__list {
  display: grid;
  gap: 10px;
}

.footer-contact__item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 239, 227, 0.72);
  word-break: break-word;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(245, 239, 227, 0.4);
  padding-top: 2px;
}

.footer-base {
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid var(--line-night-soft);
}

.footer-base__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(245, 239, 227, 0.5);
}

.footer-base__item--dim {
  color: rgba(245, 239, 227, 0.3);
}

/* ---------------------------------------------------------
   9. 面包屑
   --------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--crumb-color, rgba(245, 239, 227, 0.55));
}

.breadcrumb a {
  transition: color 0.16s var(--ease);
}

.breadcrumb a:hover {
  color: var(--amber);
}

.breadcrumb__sep {
  color: var(--amber);
  opacity: 0.7;
}

.breadcrumb--paper {
  --crumb-color: rgba(27, 26, 23, 0.6);
}

.breadcrumb--paper a:hover {
  color: var(--amber-deep);
}

.breadcrumb--paper .breadcrumb__sep {
  color: var(--amber-deep);
}

/* ---------------------------------------------------------
   10. 章节头
   --------------------------------------------------------- */
.section-head {
  display: grid;
  gap: 10px;
}

.section-head__num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--amber);
}

.section-head__title {
  font-family: var(--font-head);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-head__lead {
  max-width: 58ch;
  color: var(--head-lead-color, rgba(245, 239, 227, 0.68));
}

.section-head--paper {
  --head-lead-color: rgba(27, 26, 23, 0.68);
}

.section-head--paper .section-head__num {
  color: var(--amber-deep);
}

/* ---------------------------------------------------------
   11. 资料卡 / 标签 / 路径编号
   --------------------------------------------------------- */
.paper-card {
  position: relative;
  padding: 26px 26px 24px;
  border: 1px solid rgba(27, 26, 23, 0.14);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow:
    0 0 0 1px rgba(27, 26, 23, 0.06),
    6px 6px 0 -1px var(--paper-2),
    6px 6px 0 0 rgba(27, 26, 23, 0.14),
    0 22px 36px -30px rgba(0, 0, 0, 0.85);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  white-space: nowrap;
}

.tag--amber {
  color: var(--amber-deep);
  background: rgba(242, 163, 58, 0.16);
  border-color: rgba(185, 107, 31, 0.45);
}

.tag--celadon {
  color: #2C6656;
  background: rgba(79, 165, 141, 0.18);
  border-color: rgba(79, 165, 141, 0.5);
}

.tag--coral {
  color: #A03A21;
  background: rgba(214, 90, 58, 0.14);
  border-color: rgba(214, 90, 58, 0.45);
}

.tag--night {
  color: var(--paper);
  background: rgba(245, 239, 227, 0.1);
  border-color: rgba(245, 239, 227, 0.3);
}

.path-code {
  display: inline-block;
  padding: 2px 9px;
  border-left: 2px solid var(--amber);
  background: rgba(242, 163, 58, 0.1);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--amber);
  white-space: nowrap;
}

.path-code--paper {
  border-left-color: var(--amber-deep);
  background: rgba(185, 107, 31, 0.1);
  color: var(--amber-deep);
}

/* ---------------------------------------------------------
   12. 标签页
   --------------------------------------------------------- */
.tabs {
  display: block;
}

.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line-paper);
  border-radius: var(--radius);
  background: rgba(27, 26, 23, 0.05);
}

.tabs__tab {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: rgba(27, 26, 23, 0.64);
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease);
}

.tabs__tab:hover {
  color: var(--ink);
  background: rgba(27, 26, 23, 0.07);
}

.tabs__tab[aria-selected="true"] {
  background: var(--night);
  border-color: var(--night);
  color: var(--paper);
  box-shadow: inset 0 -2px 0 var(--amber);
}

.tabs__panel[hidden] {
  display: none;
}

.tabs--night .tabs__list {
  border-color: var(--line-night);
  background: rgba(245, 239, 227, 0.06);
}

.tabs--night .tabs__tab {
  color: rgba(245, 239, 227, 0.7);
}

.tabs--night .tabs__tab:hover {
  color: var(--paper);
  background: rgba(245, 239, 227, 0.09);
}

.tabs--night .tabs__tab[aria-selected="true"] {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--night);
  box-shadow: none;
}

/* ---------------------------------------------------------
   13. 网格
   --------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--gap, 24px);
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------------------------------------------------------
   14. 图片容器基础规则
   --------------------------------------------------------- */
.img-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line-night);
  border-radius: var(--radius);
  background: var(--night-2);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(242, 163, 58, 0.34);
  border-radius: 2px;
  pointer-events: none;
}

.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }

.img-frame--paper {
  border-color: var(--line-paper);
  background: var(--paper-2);
}

.img-frame--paper::after {
  border-color: rgba(185, 107, 31, 0.34);
}

/* ---------------------------------------------------------
   15. 显现动效
   --------------------------------------------------------- */
[data-reveal] {
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.js-reveal [data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------
   16. 响应式
   --------------------------------------------------------- */
@media (max-width: 1180px) {
  .search-hint {
    display: none;
  }
}

@media (max-width: 1024px) {
  .brand__line {
    display: none;
  }

  .header-meta {
    gap: 16px;
  }
}

@media (max-width: 980px) {
  html {
    scroll-padding-top: 116px;
  }

  .header-index__inner {
    min-height: 60px;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 40;
    display: block;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--night-2);
    border-bottom: 2px solid rgba(242, 163, 58, 0.42);
    box-shadow: 0 30px 44px -32px rgba(0, 0, 0, 0.95);
    transition: max-height 0.24s var(--ease), visibility 0.24s var(--ease);
  }

  .primary-nav[data-open="true"] {
    max-height: 76vh;
    overflow-y: auto;
    visibility: visible;
  }

  .primary-nav__list {
    display: block;
    padding: 8px var(--gutter) 18px;
  }

  .primary-nav__list li + li {
    border-top: 1px solid var(--line-night-soft);
  }

  .primary-nav__list a {
    padding: 14px 4px;
    border-radius: 0;
    font-size: 17px;
  }

  .primary-nav__list a::after {
    display: none;
  }

  .primary-nav__list a:hover {
    background: rgba(245, 239, 227, 0.05);
  }

  .primary-nav__list a[aria-current="page"] {
    background: transparent;
    color: var(--amber);
    box-shadow: inset 3px 0 0 var(--amber);
    padding-left: 14px;
  }

  .primary-nav__list a[aria-current="page"]:hover {
    background: rgba(245, 239, 227, 0.05);
    color: var(--amber);
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .header-utility__inner {
    min-height: 50px;
    gap: 12px;
  }

  .brand__name {
    font-size: 19px;
  }

  .brand__mark {
    width: 18px;
    height: 18px;
  }

  .brand__mark::after {
    inset: 3px;
  }

  .header-meta {
    gap: 12px;
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  .header-meta__item--time {
    display: none;
  }

  .header-cta {
    padding: 8px 12px;
    font-size: 13px;
  }

  .nav-toggle {
    padding: 7px 10px;
    letter-spacing: 0.06em;
  }

  .nav-toggle__label {
    display: none;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-base__inner {
    justify-content: flex-start;
    font-size: 11px;
  }

  .paper-card {
    padding: 20px 18px 18px;
    box-shadow:
      0 0 0 1px rgba(27, 26, 23, 0.06),
      4px 4px 0 -1px var(--paper-2),
      4px 4px 0 0 rgba(27, 26, 23, 0.14);
  }

  .tabs__tab {
    padding: 7px 12px;
    font-size: 13px;
  }
}

/* ---------------------------------------------------------
   17. 降低动效
   --------------------------------------------------------- */
@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;
  }

  .js-reveal [data-reveal],
  .js-reveal [data-reveal][data-revealed="true"] {
    opacity: 1;
    transform: none;
  }

  .scroll-progress {
    transition: none;
  }
}
