/* ============================================
   草莓小记 · 共享样式 /assets/site.css
   ============================================ */

/* ---------- 1. 变量与重置 ---------- */
:root {
  --color-strawberry: #E53935;
  --color-strawberry-dark: #B71C1C;
  --color-leaf-green: #7CB342;
  --color-mo-green: #33691E;
  --color-cream: #FFF8E7;
  --color-sunny-yellow: #FFD54F;
  --color-peach-orange: #FF8A65;
  --color-violet: #8E24AA;
  --color-cyan: #00BCD4;
  --color-pale-pink: #FCE4EC;
  --color-tomato: #E64A19;
  --color-mango: #FDD835;
  --color-dark-gray: #333333;
  --color-mid-gray: #666666;

  --font-headline: "ZCOOL Xiaowei", "站酷小薇LOGO体", "Yuanti SC", "YouYuan", "圆体", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Songti SC", "Noto Serif SC", "SimSun", "STSong", serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-brutal: 4px 4px 0 var(--color-mo-green);
  --shadow-brutal-hover: 6px 6px 0 var(--color-mo-green);
  --shadow-brutal-sm: 2px 2px 0 var(--color-mo-green);
  --header-desktop-width: 264px;
  --content-max: 1200px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-cream);
  color: var(--color-dark-gray);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-headline);
  line-height: 1.25;
  font-weight: 900;
}

p, figure, blockquote, dl, dd {
  margin: 0;
}

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

a {
  color: var(--color-strawberry);
}

a:hover {
  color: var(--color-strawberry-dark);
  text-decoration: underline;
}

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

button {
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--color-strawberry);
  color: var(--color-cream);
}

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

/* ---------- 2. 通用布局容器 ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
}

#main-content {
  display: block;
}

/* ---------- 3. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 3000;
  padding: 10px 18px;
  background: var(--color-mango);
  color: var(--color-dark-gray);
  border: 2px solid var(--color-mo-green);
  border-radius: var(--radius-sm);
  font-weight: 800;
  box-shadow: var(--shadow-brutal);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}

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

/* ---------- 4. 阅读进度 ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4000;
  width: 100%;
  height: 4px;
  pointer-events: none;
  background: transparent;
}

.reading-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--color-strawberry), var(--color-mango) 60%, var(--color-cyan));
}

/* ---------- 5. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-mo-green);
  color: var(--color-cream);
  border-bottom: 3px solid var(--color-mango);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 8px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--color-cream);
  text-decoration: none;
}

.brand:hover {
  color: var(--color-cream);
  text-decoration: none;
}

.brand-svg {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.25));
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.45em;
  line-height: 1.2;
  color: var(--color-sunny-yellow);
}

.brand-name {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--color-cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 6. 移动端导航开关 ---------- */
.nav-toggle {
  position: relative;
  z-index: 20;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-sunny-yellow);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-cream);
  transition: background 0.2s, border-color 0.2s;
}

.nav-toggle:hover {
  background: var(--color-leaf-green);
  border-color: var(--color-mango);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) 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(-7px) rotate(-45deg);
}

/* ---------- 7. 主导航（移动端抽屉） ---------- */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  width: min(320px, 86vw);
  padding: 72px 22px 24px;
  overflow-y: auto;
  background: var(--color-mo-green);
  color: var(--color-cream);
  border-left: 4px solid var(--color-strawberry);
  transform: translateX(105%);
  transition: transform 0.28s ease;
}

.site-nav[data-open] {
  transform: translateX(0);
}

html.is-nav-locked {
  overflow: hidden;
}

.nav-track-label {
  margin-bottom: 16px;
  font-size: 11px;
  letter-spacing: 0.35em;
  text-align: center;
  color: rgba(255, 248, 231, 0.7);
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-cream);
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--color-leaf-green);
  border-color: var(--color-mango);
  color: var(--color-dark-gray);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  background: var(--color-strawberry);
  border-color: var(--color-mango);
  color: var(--color-cream);
}

.nav-index {
  min-width: 24px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  opacity: 0.75;
}

.nav-divider {
  height: 3px;
  margin: 18px 0 0;
  background: repeating-linear-gradient(90deg, var(--color-mango) 0 8px, transparent 8px 16px);
  opacity: 0.7;
}

.search-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.18);
  border: 2px solid var(--color-sunny-yellow);
  border-radius: var(--radius-md);
  color: var(--color-cream);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.search-entry:hover {
  background: var(--color-leaf-green);
  border-color: var(--color-mango);
  color: var(--color-mo-green);
  text-decoration: none;
}

.search-entry-icon {
  flex: 0 0 auto;
  color: var(--color-sunny-yellow);
  transition: color 0.2s;
}

.search-entry:hover .search-entry-icon {
  color: var(--color-mo-green);
}

.search-entry-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-entry-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  background: var(--color-mango);
  color: var(--color-strawberry-dark);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.nav-foot {
  margin: 16px 0 0;
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.2em;
  color: rgba(255, 248, 231, 0.5);
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 48px;
  background: var(--color-strawberry);
  color: var(--color-cream);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 8px;
  background: linear-gradient(90deg,
    var(--color-mango) 0 10%,
    var(--color-leaf-green) 10% 20%,
    var(--color-cyan) 20% 30%,
    var(--color-cream) 30% 40%,
    var(--color-peach-orange) 40% 50%,
    var(--color-violet) 50% 60%,
    var(--color-mango) 60% 70%,
    var(--color-leaf-green) 70% 80%,
    var(--color-cyan) 80% 90%,
    var(--color-cream) 90% 100%);
}

.footer-inner {
  display: grid;
  gap: 28px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  grid-area: brand;
}

.footer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  background: var(--color-mango);
  color: var(--color-strawberry-dark);
  border: 3px solid var(--color-cream);
  border-radius: 50%;
  box-shadow: var(--shadow-brutal-sm);
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 900;
}

.footer-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--color-sunny-yellow);
}

.footer-title {
  display: block;
  font-family: var(--font-headline);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--color-cream);
}

.footer-links,
.footer-legal {
  display: grid;
  gap: 6px;
  align-content: start;
}

.footer-links {
  grid-area: links;
}

.footer-legal {
  grid-area: legal;
}

.footer-col-title {
  margin-bottom: 4px;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--color-sunny-yellow);
}

.footer-link {
  color: var(--color-cream);
  font-size: 14px;
  text-decoration: none;
  padding: 2px 0;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-link:hover {
  color: var(--color-mango);
  text-decoration: underline;
  padding-left: 4px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  grid-area: meta;
  padding: 16px 0;
  border-top: 2px dashed rgba(255, 248, 231, 0.35);
  border-bottom: 2px dashed rgba(255, 248, 231, 0.35);
  font-size: 13px;
}

.footer-meta-item {
  display: flex;
  gap: 8px;
}

.footer-meta-item dt {
  font-weight: 800;
  color: var(--color-sunny-yellow);
}

.footer-copyright {
  grid-area: copy;
  font-size: 13px;
  opacity: 0.85;
}

/* ---------- 9. 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-mo-green);
  border-radius: 50%;
  background: var(--color-mango);
  color: var(--color-strawberry-dark);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 2px solid var(--color-mo-green);
  border-radius: var(--radius-md);
  background: var(--color-cream);
  color: var(--color-mo-green);
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  background: var(--color-pale-pink);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-strawberry);
  color: var(--color-cream);
  border-color: var(--color-strawberry-dark);
  box-shadow: var(--shadow-brutal);
}

.btn-primary:hover {
  background: var(--color-strawberry-dark);
  box-shadow: var(--shadow-brutal-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-strawberry);
  color: var(--color-strawberry);
}

.btn-outline:hover {
  background: var(--color-strawberry);
  color: var(--color-cream);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* ---------- 11. 面包屑 ---------- */
.breadcrumb {
  padding: 16px 0;
}

.crumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.crumb-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crumb-link {
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-mid-gray);
  text-decoration: none;
}

.crumb-link:hover {
  background: var(--color-pale-pink);
  color: var(--color-strawberry);
}

.crumb-current {
  padding: 2px 6px;
  border: 2px solid var(--color-mid-gray);
  border-radius: 4px;
  color: var(--color-strawberry-dark);
  font-weight: 800;
}

.crumb-sep {
  color: var(--color-mid-gray);
  opacity: 0.5;
}

/* ---------- 12. 页首与分区标题 ---------- */
.page-head {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 64px 0 32px;
}

.page-kicker {
  display: inline-block;
  justify-self: start;
  padding: 4px 14px;
  background: var(--color-strawberry);
  color: var(--color-cream);
  border: 2px solid var(--color-mo-green);
  border-radius: 4px;
  box-shadow: var(--shadow-brutal-sm);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.page-title {
  font-size: clamp(40px, 8vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-dark-gray);
}

.page-desc {
  max-width: 60ch;
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-mid-gray);
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 40px 0 16px;
  padding: 8px 0 8px 14px;
  border-left: 8px solid var(--color-strawberry);
  background: linear-gradient(90deg, var(--color-pale-pink), transparent 60%);
  font-size: 28px;
}

.section-index {
  padding: 2px 8px;
  background: var(--color-sunny-yellow);
  border-radius: 4px;
  color: var(--color-strawberry-dark);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
}

/* ---------- 13. 卡片网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  display: grid;
  gap: 10px;
  padding: 20px;
  background: var(--color-pale-pink);
  border: 2px solid var(--color-mo-green);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-brutal);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-brutal-hover);
}

.card.is-green {
  background: var(--color-leaf-green);
}

.card.is-cream {
  background: var(--color-cream);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 20px;
  line-height: 1.35;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--color-mid-gray);
}

.card-body {
  display: grid;
  gap: 8px;
}

.card-excerpt {
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-dark-gray);
}

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 2px dashed rgba(51, 105, 30, 0.25);
}

@media (min-width: 768px) {
  .card.is-featured {
    grid-column: span 2;
  }
}

/* ---------- 14. 图片容器 ---------- */
.figure {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--color-pale-pink);
  border: 2px dashed var(--color-mo-green);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.figure.is-wide {
  aspect-ratio: 16 / 9;
}

.figure.is-tall {
  aspect-ratio: 3 / 4;
}

.figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-caption {
  margin-top: 8px;
  font-size: 12px;
  text-align: center;
  color: var(--color-mid-gray);
}

/* ---------- 15. 磁贴矩阵 ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

.tile {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 16px;
  background: var(--color-leaf-green);
  border: 2px solid var(--color-mo-green);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-brutal-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tile:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-brutal-hover);
  text-decoration: none;
}

.tile-name {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 900;
  color: var(--color-mo-green);
}

.tile-count {
  justify-self: start;
  padding: 2px 8px;
  background: var(--color-mango);
  border-radius: 999px;
  color: var(--color-strawberry-dark);
  font-size: 12px;
  font-weight: 800;
}

/* ---------- 16. 条目列表行 ---------- */
.content-list {
  display: grid;
  gap: 10px;
}

.content-list-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: var(--color-cream);
  border: 2px solid var(--color-mid-gray);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.content-list-item:hover {
  border-color: var(--color-strawberry);
  box-shadow: var(--shadow-brutal-sm);
  transform: translateX(4px);
}

.content-item-title {
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 900;
  color: var(--color-dark-gray);
}

.content-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--color-mid-gray);
}

/* ---------- 17. 标签云 ---------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: var(--color-sunny-yellow);
  border: 2px solid var(--color-mo-green);
  border-radius: 999px;
  color: var(--color-dark-gray);
  font-size: 12px;
  font-weight: 800;
}

button.tag {
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

button.tag:hover {
  transform: translateY(-1px);
}

.tag.is-hot {
  background: var(--color-mango);
}

.tag.is-yellow {
  background: var(--color-sunny-yellow);
}

.tag.is-orange {
  background: var(--color-peach-orange);
  color: #ffffff;
}

.tag.is-green {
  background: var(--color-leaf-green);
  color: var(--color-mo-green);
}

.tag.is-pink {
  background: var(--color-pale-pink);
  color: var(--color-strawberry-dark);
}

.tag.is-active {
  border-color: var(--color-strawberry-dark);
  box-shadow: var(--shadow-brutal-sm);
}

/* ---------- 18. 筛选条 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--color-cream);
  border: 2px solid var(--color-mo-green);
  border-radius: 999px;
  color: var(--color-mo-green);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.filter-btn:hover {
  background: var(--color-sunny-yellow);
}

.filter-btn.is-active {
  background: var(--color-strawberry);
  border-color: var(--color-strawberry-dark);
  color: var(--color-cream);
  box-shadow: var(--shadow-brutal-sm);
}

/* ---------- 19. 状态徽标 ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border: 2px solid var(--color-mid-gray);
  border-radius: 999px;
  background: var(--color-cream);
  color: var(--color-dark-gray);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.is-new {
  border-color: var(--color-cyan);
  background: rgba(0, 188, 212, 0.1);
  color: var(--color-cyan);
}

.status-badge.is-read {
  border-color: var(--color-violet);
  background: rgba(142, 36, 170, 0.08);
  color: var(--color-violet);
}

.status-badge.is-live {
  border-color: var(--color-leaf-green);
  background: rgba(124, 179, 66, 0.1);
  color: var(--color-mo-green);
}

/* ---------- 20. 序号标记 ---------- */
.num-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  background: var(--color-strawberry);
  color: var(--color-cream);
  border: 2px solid var(--color-mo-green);
  border-radius: var(--radius-sm);
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 900;
}

/* ---------- 21. 指标条 ---------- */
.metric {
  display: grid;
  gap: 6px;
}

.metric-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-dark-gray);
}

.metric-bar {
  height: 12px;
  background: var(--color-pale-pink);
  border: 2px solid var(--color-mo-green);
  border-radius: 999px;
  overflow: hidden;
}

.metric-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px 0 0 999px;
  background: linear-gradient(90deg, var(--color-tomato), var(--color-strawberry));
}

/* ---------- 22. 索引条 ---------- */
.index-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 8px;
}

.index-bar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 6px;
  background: var(--color-leaf-green);
  border: 2px solid var(--color-mo-green);
  border-radius: var(--radius-sm);
  color: var(--color-mo-green);
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, color 0.2s;
}

.index-bar-item:hover {
  background: var(--color-mango);
  transform: translateY(-2px);
  text-decoration: none;
}

.index-bar-item.is-current {
  background: var(--color-strawberry);
  border-color: var(--color-strawberry-dark);
  color: var(--color-cream);
}

/* ---------- 23. 横向滑轨 ---------- */
.scroll-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--color-strawberry) var(--color-pale-pink);
}

.scroll-rail > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.scroll-rail::-webkit-scrollbar {
  height: 6px;
}

.scroll-rail::-webkit-scrollbar-track {
  background: var(--color-pale-pink);
  border-radius: 999px;
}

.scroll-rail::-webkit-scrollbar-thumb {
  background: var(--color-strawberry);
  border-radius: 999px;
}

/* ---------- 24. 表格 ---------- */
.table-scroll {
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--color-cream);
  border: 2px solid var(--color-mo-green);
  font-size: 13px;
}

.data-table caption {
  padding: 10px 14px;
  background: var(--color-mo-green);
  color: var(--color-cream);
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 900;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border: 1px solid rgba(51, 105, 30, 0.25);
  text-align: left;
  vertical-align: middle;
}

.data-table thead th {
  background: var(--color-mo-green);
  color: var(--color-cream);
  font-family: var(--font-headline);
  font-weight: 900;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background: var(--color-pale-pink);
}

.data-table tbody tr:hover {
  background: var(--color-sunny-yellow);
}

/* ---------- 25. 可折叠面板 ---------- */
.accordion {
  margin-bottom: 12px;
  background: var(--color-cream);
  border: 2px solid var(--color-mo-green);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-brutal-sm);
  overflow: hidden;
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-family: var(--font-headline);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  background: var(--color-sunny-yellow);
  border: 2px solid var(--color-mo-green);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.accordion[open] summary::after {
  content: "−";
}

.accordion-body {
  padding: 14px 18px 18px;
  border-top: 2px dashed rgba(51, 105, 30, 0.25);
  font-size: 14px;
}

/* ---------- 26. 桌面端侧边轨道 ---------- */
@media (min-width: 1024px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: var(--header-desktop-width);
    height: 100vh;
    padding: 32px 0 20px;
    border-right: 4px solid var(--color-strawberry);
    border-bottom: none;
  }

  .header-bar {
    display: block;
    min-height: 0;
    padding: 0 24px;
  }

  .brand {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 2px;
    align-items: center;
  }

  .brand-svg {
    grid-row: 1 / 3;
    width: 52px;
    height: 52px;
  }

  .brand-tag {
    font-size: 12px;
    align-self: end;
  }

  .brand-name {
    font-size: 20px;
    line-height: 1.2;
    white-space: normal;
    align-self: start;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: auto;
    padding: 20px 16px 0;
    transform: none;
    border-left: none;
    background: transparent;
  }

  .nav-track-label {
    text-align: center;
  }

  .nav-list {
    margin-top: 20px;
  }

  .nav-link {
    padding: 10px 12px;
    font-size: 15px;
  }

  .search-entry {
    margin-top: 20px;
  }

  .nav-foot {
    margin-top: auto;
    padding-top: 16px;
  }

  #main-content,
  .site-footer {
    margin-left: var(--header-desktop-width);
  }
}

/* ---------- 27. 平板页脚布局 ---------- */
@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-areas:
      "brand links legal"
      "meta meta meta"
      "copy copy copy";
  }
}

/* ---------- 28. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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