/* ============================================================
   亚文网 /assets/site.css  —  共享外壳样式
   网格与坐标 · 双层头部 · 档案室页脚 · 通用组件
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

ul, ol { padding: 0; list-style: none; }

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

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

button { background: none; border: 0; }

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

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

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink: #0E2A47;
  --paper: #F6F7F9;
  --warm: #FBF8F2;
  --grey: #6B7F94;
  --line: #C9D2DB;
  --indigo: #1F4E79;
  --indigo-deep: #123A5C;
  --pom: #C0392B;
  --pom-deep: #A32B1E;
  --sand: #D3A24E;
  --jade: #2E7D74;
  --glass: rgba(255, 255, 255, .62);

  /* 字体 */
  --font-display: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB",
                  "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB",
             "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun",
               Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular,
               Menlo, Consolas, "Courier New", monospace;

  /* 版式尺寸 */
  --fs-h1: clamp(2.2rem, 4vw, 3.4rem);
  --fs-h2: clamp(1.6rem, 2.4vw, 2.2rem);
  --fs-h3: 1.25rem;
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-mono: .9375rem;

  /* 网格与节奏 */
  --shell-max: 1440px;
  --pad: 64px;
  --gap: 24px;
  --baseline: 8px;
  --section-gap: 112px;

  /* 动效 */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 240ms;
}

@media (max-width: 1100px) { :root { --pad: 40px; --section-gap: 88px; } }
@media (max-width: 640px)  { :root { --pad: 20px; --section-gap: 64px; --gap: 16px; } }

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.85;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 蓝图网格底纹：8px 细网格 + 64px 主网格 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(31, 78, 121, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 78, 121, .028) 1px, transparent 1px),
    linear-gradient(to right, rgba(31, 78, 121, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 78, 121, .07) 1px, transparent 1px);
  background-size: 8px 8px, 8px 8px, 64px 64px, 64px 64px;
}

.site-header,
main,
.site-footer,
.skip-link { position: relative; z-index: 1; }

main { flex: 1 0 auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.22;
  color: var(--ink);
}

h1 { font-size: var(--fs-h1); letter-spacing: -.03em; }
h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -.015em; }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; }

main p { max-width: 68ch; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--pom);
  vertical-align: middle;
  flex: 0 0 auto;
}

.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;
}

/* 焦点 */
:focus-visible {
  outline: 2px solid var(--pom);
  outline-offset: 2px;
}
.site-nav :focus-visible,
.site-footer :focus-visible,
.header-utility :focus-visible { outline-color: var(--sand); }

/* ---------- 4. 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .col-3, .col-4 { grid-column: span 12; }
  .col-6, .col-8, .col-9 { grid-column: span 12; }
}

/* 左侧索引 / 右侧正文 的非对称分栏 */
.split {
  display: grid;
  grid-template-columns: minmax(216px, 3fr) minmax(0, 9fr);
  gap: 48px;
  align-items: start;
}

@media (max-width: 1024px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

.prose { max-width: 68ch; }

.section-gap { padding-block: 0 var(--section-gap); }

/* ---------- 5. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  font-family: var(--font-ui);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.btn--solid {
  background: var(--pom);
  border-color: var(--pom);
  color: #fff;
}
.btn--solid:hover { background: var(--pom-deep); border-color: var(--pom-deep); transform: translateY(-2px); }

.btn--indigo {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.btn--indigo:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); transform: translateY(-2px); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--indigo);
}
.btn--ghost:hover { border-color: var(--indigo); color: var(--indigo-deep); transform: translateY(-2px); }

/* ---------- 6. 头部 ---------- */
.site-header {
  position: relative;
  z-index: 80;
  background: var(--paper);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -120px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--pom);
  color: #fff;
  font-family: var(--font-ui);
  font-size: .875rem;
  font-weight: 700;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; }

/* 上层：品牌说明带 */
.header-utility {
  max-height: 60px;
  overflow: hidden;
  background: var(--ink);
  color: rgba(255, 255, 255, .76);
  font-family: var(--font-ui);
  font-size: .8125rem;
  letter-spacing: .02em;
  transition: max-height .28s var(--ease), opacity .24s var(--ease);
}

.header-utility__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 44px;
}

.header-motto {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-motto__mark {
  display: inline-block;
  width: 20px;
  height: 3px;
  background: var(--sand);
  flex: 0 0 auto;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .55);
  font-size: .75rem;
  white-space: nowrap;
}
.header-meta .mono { font-size: .75rem; }

/* 主行：品牌 + 检索 + CTA */
.header-main {
  background: rgba(246, 247, 249, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-main__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 78px;
  padding-block: 12px;
}

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

.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--indigo);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 -3px 0 var(--sand);
}

.brand__body { display: flex; flex-direction: column; line-height: 1.25; }

.brand__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 900;
  letter-spacing: -.02em;
  color: var(--ink);
}

.brand__line {
  font-family: var(--font-mono);
  font-size: .6875rem;
  color: var(--grey);
  letter-spacing: .02em;
}

/* 检索 */
.search {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
  max-width: 420px;
  margin-left: auto;
}

.search__icon {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -8px;
  border: 1.5px solid var(--grey);
  border-radius: 50%;
  pointer-events: none;
}

.search__icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.5px;
  background: var(--grey);
  transform: rotate(45deg);
}

.search__input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: .9375rem;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.search__input::placeholder { color: var(--grey); }
.search__input:focus {
  outline: none;
  border-color: var(--indigo);
  background: #fff;
}
.search__input:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }
.search__input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 95;
  max-height: 292px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 22px 48px -30px rgba(14, 42, 71, .7);
}
.search__list[hidden] { display: none; }

.search__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-left: 3px solid transparent;
  font-family: var(--font-ui);
  font-size: .875rem;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .16s var(--ease), border-color .16s var(--ease);
}
.search__item:hover,
.search__item[aria-selected="true"] {
  background: var(--warm);
  border-left-color: var(--pom);
}

.search__item-type {
  font-family: var(--font-mono);
  font-size: .6875rem;
  color: var(--grey);
  letter-spacing: .02em;
}

.search__empty {
  padding: 14px;
  font-family: var(--font-ui);
  font-size: .8125rem;
  color: var(--grey);
}

.header-cta { flex: 0 0 auto; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--warm);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
  transition: border-color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--indigo); }

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bar {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity .16s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 栏目条 */
.site-nav {
  background: var(--indigo);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.site-nav__list > li { margin-right: 34px; }
.site-nav__list > li:last-child { margin-right: 0; }

.site-nav__link {
  position: relative;
  display: block;
  padding: 15px 0;
  color: rgba(255, 255, 255, .78);
  font-family: var(--font-ui);
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .02em;
  transition: color var(--dur) var(--ease);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 9px;
  width: 0;
  height: 3px;
  background: var(--pom);
  transition: width var(--dur) var(--ease);
}

.site-nav__link:hover { color: #fff; }
.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after { width: 100%; }
.site-nav__link[aria-current="page"] { color: #fff; }

.site-nav__note {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .02em;
  white-space: nowrap;
}

/* 滚动进度条 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--indigo), var(--sand) 62%, var(--pom));
  pointer-events: none;
}

/* 头部移动端 / 平板 */
@media (max-width: 900px) {
  .site-header { position: relative; }

  .header-main__inner {
    flex-wrap: wrap;
    gap: 12px;
    min-height: 0;
    padding-block: 14px;
  }

  .brand { flex: 1 1 auto; }
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }

  .search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
    margin-left: 0;
  }

  .site-nav { display: none; background: var(--ink); }
  .site-nav[data-open="true"] { display: block; }

  .site-nav__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 6px 18px;
  }

  .site-nav__list { flex-direction: column; }
  .site-nav__list > li {
    margin-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .site-nav__list > li:last-child { border-bottom: 0; }

  .site-nav__link { padding: 14px 0; font-size: 1rem; }
  .site-nav__link::after { bottom: 12px; }
  .site-nav__link:hover::after,
  .site-nav__link[aria-current="page"]::after { width: 30px; }

  .site-nav__note { display: none; }
}

@media (max-width: 480px) {
  .header-meta { display: none; }
  .header-utility__inner { justify-content: flex-start; }
  .brand__line { display: none; }
}

/* 桌面端吸附：滚动后收起上层 */
@media (min-width: 901px) {
  .site-header { position: sticky; top: 0; }
  .site-header[data-scrolled="true"] .header-utility {
    max-height: 0;
    opacity: 0;
  }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: auto;
  background: var(--ink);
  border-top: 3px solid var(--indigo);
  color: rgba(255, 255, 255, .72);
  font-family: var(--font-ui);
  font-size: .9375rem;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 64px 64px;
}

.site-footer > .shell { position: relative; z-index: 1; }

.footer-lead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 56px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.footer-brand { display: flex; align-items: center; gap: 14px; }

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: var(--indigo);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 var(--sand);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.3;
  color: #fff;
}

.footer-brand__desc {
  font-size: .875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .6);
  max-width: 42ch;
}

.footer-version {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .02em;
  color: var(--sand);
  white-space: nowrap;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  padding: 40px 0 44px;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--font-ui);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #fff;
}
.footer-col__title::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--sand);
  flex: 0 0 auto;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col__list li {
  font-size: .875rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .66);
  word-break: break-word;
}

.footer-col__list a {
  display: inline-block;
  width: fit-content;
  color: rgba(255, 255, 255, .72);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-col__list a:hover {
  color: #fff;
  border-bottom-color: var(--sand);
}

.footer-col__list .mono { font-size: .8125rem; color: rgba(255, 255, 255, .8); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 20px 0 34px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .8125rem;
  color: rgba(255, 255, 255, .52);
}

.footer-legal p { max-width: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.footer-legal a {
  color: rgba(255, 255, 255, .74);
  border-bottom: 1px solid rgba(255, 255, 255, .26);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-legal a:hover { color: #fff; border-bottom-color: var(--sand); }

@media (max-width: 900px) {
  .footer-lead { flex-direction: column; align-items: flex-start; gap: 20px; padding-top: 44px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding: 32px 0 36px; }
  .footer-version { white-space: normal; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; gap: 26px; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

/* ---------- 8. 页面通用组件 ---------- */
/* 面包屑 */
.breadcrumb {
  padding: 22px 0 0;
  font-family: var(--font-ui);
  font-size: .8125rem;
  color: var(--grey);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before {
  content: "/";
  color: var(--line);
  font-family: var(--font-mono);
}
.breadcrumb a { transition: color var(--dur) var(--ease); }
.breadcrumb a:hover { color: var(--indigo); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* 章节标题 */
.chapter {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.chapter__num {
  font-family: var(--font-mono);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--pom);
  flex: 0 0 auto;
}

.chapter__title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 900;
  letter-spacing: -.015em;
  line-height: 1.25;
}

/* 数据锚点 */
.data-point {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--pom);
}

.data-point__label {
  display: block;
  margin-top: 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--grey);
  line-height: 1.6;
}

/* 档案卡片 */
.doc-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px 22px;
  transition: transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--indigo);
  box-shadow: 0 18px 36px -28px rgba(14, 42, 71, .8);
}

.doc-card__no {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--grey);
}

.doc-card__title {
  margin: 8px 0 10px;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
}

.doc-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--grey);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--indigo);
  border-radius: 0;
  font-family: var(--font-ui);
  font-size: .75rem;
  line-height: 1.6;
  color: var(--indigo);
  white-space: nowrap;
}
.tag--sand { border-left-color: var(--sand); color: #8A6520; }
.tag--jade { border-left-color: var(--jade); color: var(--jade); }
.tag--pom  { border-left-color: var(--pom);  color: var(--pom); }

/* 玻璃层 */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .7);
}

/* 温纸底摘要块 */
.note-block {
  background: var(--warm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sand);
  padding: 18px 20px;
  font-size: .9375rem;
  color: var(--ink);
}

/* ---------- 9. 图片容器 ---------- */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--warm);
  border: 1px solid var(--line);
}

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

.figure--16x9 { aspect-ratio: 16 / 9; }
.figure--4x3  { aspect-ratio: 4 / 3; }
.figure--3x4  { aspect-ratio: 3 / 4; }
.figure--1x1  { aspect-ratio: 1 / 1; }
.figure--wide { aspect-ratio: 21 / 9; }

.figure--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(31, 78, 121, .09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 78, 121, .09) 1px, transparent 1px);
  background-size: 32px 32px;
}

.figure__caption {
  margin-top: 10px;
  font-family: var(--font-ui);
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--grey);
}

@media (max-width: 640px) {
  .figure--wide { aspect-ratio: 16 / 9; }
}

/* ---------- 10. 显现与返回顶部 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .32s var(--ease) var(--reveal-delay, 0ms),
              transform .32s var(--ease) var(--reveal-delay, 0ms);
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--ink);
  border: 1px solid var(--indigo);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              visibility var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover { background: var(--indigo); }

@media (max-width: 640px) {
  .to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* 目录当前项 */
[data-toc] a.is-current {
  color: var(--indigo-deep);
  font-weight: 700;
  border-left-color: var(--pom);
}

/* ---------- 11. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .site-header[data-scrolled="true"] .header-utility { max-height: 60px; opacity: 1; }
}
