/* ==========================================================================
   AIFA体育 — 共享样式 /assets/site.css
   视觉母题：赛事数据内容地图 · 坐标索引 · 纸张叠层 · 动态斜线
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  /* 色彩系统 */
  --paper: #F5F1E8;
  --ink: #1A1D1F;
  --neon: #C6FF00;
  --orange: #FF6B1A;
  --deep-blue: #0B3D56;
  --gray: #6B6E70;
  --border: #D8D3C8;
  --tag-bg: #E8E2D5;
  --shadow: rgba(26, 29, 31, 0.15);
  --code-bg: #F0EBE0;
  --footer-text: rgba(245, 241, 232, 0.78);

  /* 字体 */
  --font-heading: 'Noto Sans SC', sans-serif;
  --font-body: 'Source Sans SC', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* 布局 */
  --container-w: 1200px;
  --header-z: 100;
  --footer-z: 10;

  /* 动效 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --speed: 0.2s;
}

/* ---------- 2. Reset 与基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(11, 61, 86, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 61, 86, 0.04) 1px, transparent 1px);
  background-size: 80px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

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

/* ---------- 3. 排版 ---------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.3;
  color: var(--deep-blue);
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.05rem;
}

p {
  margin-bottom: 1em;
}

strong,
b {
  font-weight: 700;
  color: var(--ink);
}

::selection {
  background: var(--neon);
  color: var(--ink);
}

/* ---------- 4. 焦点反馈 ---------- */
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--neon);
}

.site-nav :focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--ink);
}

.site-footer :focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(198, 255, 0, 0.35);
}

/* ---------- 5. 布局工具 ---------- */
.container {
  width: min(var(--container-w), calc(100% - 48px));
  margin-inline: auto;
}

.main-content {
  flex: 1 0 auto;
  width: 100%;
}

#main-content {
  outline: none;
}

.page-wrap {
  width: min(var(--container-w), calc(100% - 48px));
  margin-inline: auto;
  padding: 40px 0 64px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
}

/* ==========================================================================
   6. 页头组件
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--header-z);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--border), 0 8px 24px rgba(26, 29, 31, 0.06);
}

/* 跳转链接 */
.skip-link {
  position: fixed;
  top: -100px;
  left: 24px;
  z-index: 2000;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  border: 2px solid var(--neon);
  box-shadow: 4px 4px 0 var(--orange);
  transition: top var(--speed) var(--ease);
}

.skip-link:focus {
  top: 20px;
}

/* 顶部深墨信息条 */
.header-meta {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 24px;
  position: relative;
}

.header-meta::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--neon) 0 12px, transparent 12px 18px);
  opacity: 0.4;
}

.meta-site {
  color: var(--paper);
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta-site::before {
  content: '▚ ';
  color: var(--neon);
}

.meta-version {
  color: var(--neon);
  letter-spacing: 0.08em;
  padding: 2px 10px;
  border: 1px solid currentColor;
  white-space: nowrap;
  transition: background var(--speed), color var(--speed);
}

.meta-version:hover {
  background: var(--neon);
  color: var(--ink);
}

/* 居中刊头 */
.header-masthead {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 24px;
  background:
    radial-gradient(circle at 85% 15%, rgba(198, 255, 0, 0.07) 0, transparent 140px),
    var(--paper);
}

.header-masthead::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--neon) 0 25%,
    var(--deep-blue) 25% 50%,
    var(--orange) 50% 75%,
    var(--ink) 75% 100%);
}

.masthead-coords {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--gray);
  opacity: 0.6;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.masthead-tick {
  position: absolute;
  right: 40px;
  bottom: 20px;
  width: 24px;
  height: 24px;
  border-right: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
  opacity: 0.7;
}

/* 品牌块 */
.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.brand-index {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--deep-blue);
}

.brand-index::before,
.brand-index::after {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--orange);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-cn {
  display: inline-block;
  color: var(--ink);
  background: var(--neon);
  padding: 2px 10px;
  font-size: 0.62em;
  letter-spacing: 0.06em;
  line-height: 1.15;
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--deep-blue);
  transform: rotate(-1deg);
}

.brand-desc {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gray);
  text-transform: uppercase;
}

/* 移动端目录按钮 */
.nav-toggle {
  display: none;
}

/* 导航带 */
.site-nav {
  display: block;
  position: relative;
  border-top: 2px solid var(--ink);
  background-color: var(--deep-blue);
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(198, 255, 0, 0.07) 0 1px,
    transparent 1px 14px
  );
}

.nav-list {
  display: flex;
  justify-content: center;
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 0 24px;
}

.nav-item {
  position: relative;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--paper);
  position: relative;
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.nav-item a::after {
  content: '';
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  height: 3px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--speed) var(--ease);
}

.nav-item a:hover::after,
.nav-item a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: rgba(198, 255, 0, 0.7);
  transition: color var(--speed) var(--ease);
}

.nav-item a:hover,
.nav-item a[aria-current="page"] {
  background: var(--neon);
  color: var(--ink);
}

.nav-item a:hover .nav-num,
.nav-item a[aria-current="page"] .nav-num {
  color: var(--deep-blue);
}

.nav-item a[aria-current="page"] {
  box-shadow: inset 4px 0 0 var(--orange);
}

.nav-item a[aria-current="page"]::after {
  background: var(--ink);
  height: 4px;
}

/* 滚动进度线 */
.progress-track {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  z-index: 30;
  pointer-events: none;
  background: transparent;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--neon);
  box-shadow: 0 0 8px rgba(198, 255, 0, 0.7);
  transition: width 0.1s linear;
}

/* ==========================================================================
   7. 页脚组件
   ========================================================================== */
.site-footer {
  flex-shrink: 0;
  background: var(--deep-blue);
  color: var(--footer-text);
  margin-top: auto;
  position: relative;
  z-index: var(--footer-z);
}

.footer-accent {
  height: 4px;
  background: linear-gradient(90deg,
    var(--ink) 0 25%,
    var(--orange) 25% 50%,
    var(--deep-blue) 50% 75%,
    var(--neon) 75% 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding: 48px 0 40px;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--paper);
  letter-spacing: 0.04em;
}

.footer-brand-cn {
  display: inline-block;
  color: var(--ink);
  background: var(--neon);
  padding: 2px 6px;
  margin-left: 4px;
  font-size: 0.72em;
  border-radius: 2px;
  box-shadow: 2px 2px 0 rgba(26, 29, 31, 0.5);
}

.footer-brand-desc {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(245, 241, 232, 0.72);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--neon);
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(245, 241, 232, 0.18);
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.footer-index {
  color: var(--orange);
  font-weight: 700;
}

.footer-list li {
  margin-bottom: 10px;
}

.footer-list a {
  position: relative;
  padding-left: 18px;
  color: rgba(245, 241, 232, 0.82);
  font-size: 14px;
  transition: color var(--speed) var(--ease), padding-left var(--speed) var(--ease);
}

.footer-list a::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--neon);
  font-size: 12px;
  line-height: inherit;
}

.footer-list a:hover {
  color: var(--neon);
  padding-left: 22px;
}

.footer-contact li {
  padding-left: 0;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(245, 241, 232, 0.78);
}

.footer-contact .contact-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--neon);
  min-width: 2.6em;
  margin-right: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(245, 241, 232, 0.16);
  padding: 16px 24px;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(245, 241, 232, 0.55);
}

.footer-copy {
  color: rgba(245, 241, 232, 0.72);
}

.footer-icp {
  color: rgba(245, 241, 232, 0.55);
}

.footer-icp::before {
  content: '◈ ';
  color: var(--neon);
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--orange);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--speed) var(--ease), visibility var(--speed) var(--ease), transform var(--speed) var(--ease), background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--neon);
  color: var(--ink);
}

/* ==========================================================================
   8. 面包屑
   ========================================================================== */
.breadcrumb {
  padding: 16px 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
}

.breadcrumb-list li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--border);
}

.breadcrumb-list a {
  color: var(--deep-blue);
  border-bottom: 1px solid transparent;
  transition: border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.breadcrumb-list a:hover {
  border-bottom-color: var(--orange);
  color: var(--orange);
}

.breadcrumb-list [aria-current="page"] {
  color: var(--gray);
}

/* ==========================================================================
   9. 章节标题条
   ========================================================================== */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  padding-left: 14px;
  border-left: 4px solid var(--orange);
  border-bottom: 2px solid var(--ink);
  position: relative;
}

.section-head::after {
  content: '';
  position: absolute;
  left: 14px;
  bottom: -2px;
  width: 72px;
  height: 4px;
  background: var(--neon);
}

.section-number {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--deep-blue);
  letter-spacing: 0.08em;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.2;
}

/* ==========================================================================
   10. 按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease), transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.btn:hover {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--deep-blue);
  border-color: var(--deep-blue);
}

.btn--primary:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn--ghost:hover {
  background: var(--neon);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--deep-blue);
}

.btn--small {
  padding: 8px 16px;
  font-size: 13px;
}

.btn--block {
  width: 100%;
}

/* ==========================================================================
   11. 标签
   ========================================================================== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 1.4;
}

.tag--neon {
  background: var(--neon);
  border-color: var(--ink);
}

.tag--orange {
  background: var(--orange);
  border-color: var(--ink);
  color: var(--ink);
}

.tag--blue {
  background: var(--deep-blue);
  border-color: var(--deep-blue);
  color: var(--paper);
}

/* ==========================================================================
   12. 卡片
   ========================================================================== */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-top: 3px solid var(--deep-blue);
  padding: 24px;
  box-shadow: 2px 2px 0 var(--shadow);
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 4px 6px 0 var(--shadow);
}

.card--flat {
  box-shadow: none;
  border-top-width: 1px;
}

.card--accent {
  border-top-color: var(--orange);
}

.card--neon {
  border-top-color: var(--neon);
  background: #FBFFE6;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ==========================================================================
   13. 数据表格
   ========================================================================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--paper);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table caption {
  caption-side: top;
  text-align: left;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gray);
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--ink);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--speed) var(--ease);
}

.data-table tbody tr:hover {
  background: var(--tag-bg);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   14. 信息条
   ========================================================================== */
.note {
  padding: 16px 20px;
  background: var(--tag-bg);
  border-left: 4px solid var(--deep-blue);
  font-size: 14px;
  margin: 24px 0;
}

.note--warn {
  border-left-color: var(--orange);
  background: #FDF3E7;
}

.note--lime {
  border-left-color: var(--neon);
  background: #F4FBE0;
}

.note-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* ==========================================================================
   15. 图例
   ========================================================================== */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 16px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  flex-shrink: 0;
}

.legend-swatch--neon {
  background: var(--neon);
}

.legend-swatch--orange {
  background: var(--orange);
}

.legend-swatch--blue {
  background: var(--deep-blue);
}

.legend-swatch--ink {
  background: var(--ink);
}

/* ==========================================================================
   16. 目录列表
   ========================================================================== */
.toc-list {
  border: 1px solid var(--border);
  background: var(--paper);
}

.toc-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px dashed var(--border);
  font-size: 15px;
  transition: background var(--speed) var(--ease), padding-left var(--speed) var(--ease);
}

.toc-item:last-child {
  border-bottom: none;
}

.toc-item:hover {
  background: var(--tag-bg);
  padding-left: 20px;
}

.toc-number {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--deep-blue);
}

.toc-title {
  flex: 1;
  font-weight: 700;
  color: var(--deep-blue);
}

.toc-title:hover {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toc-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  white-space: nowrap;
}

/* ==========================================================================
   17. 图片容器
   ========================================================================== */
.img-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--code-bg);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 160px;
}

.img-frame::after {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 4px 10px;
  background: var(--ink);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.img-frame--wide {
  aspect-ratio: 21 / 9;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame--card {
  aspect-ratio: 4 / 3;
}

/* ==========================================================================
   18. 辅助工具
   ========================================================================== */
.coords {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.divider--dashed {
  border-top-style: dashed;
}

.link {
  color: var(--deep-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--speed) var(--ease), text-decoration-color var(--speed) var(--ease);
}

.link:hover {
  color: var(--orange);
  text-decoration-color: var(--orange);
}

.highlight {
  background: var(--neon);
  padding: 0 6px;
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}

/* ==========================================================================
   19. 响应式调整
   ========================================================================== */
@media (max-width: 1024px) {
  .masthead-coords,
  .masthead-tick {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

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

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

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

@media (max-width: 860px) {
  .site-header {
    position: relative;
  }

  .header-masthead {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
  }

  .brand {
    align-items: flex-start;
    text-align: left;
  }

  .brand-index,
  .brand-desc {
    display: none;
  }

  .brand-name {
    font-size: 1.65rem;
    letter-spacing: 0.02em;
  }

  .brand-cn {
    font-size: 0.62em;
    padding: 2px 8px;
    vertical-align: 2px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--ink);
    color: var(--neon);
    border: 2px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    box-shadow: 3px 3px 0 var(--orange);
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
  }

  .nav-toggle-box {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 14px;
  }

  .nav-toggle-bar {
    display: block;
    height: 2px;
    background: currentColor;
    width: 100%;
    transition: transform var(--speed) var(--ease), opacity var(--speed) var(--ease);
  }

  .nav-toggle.is-active {
    background: var(--neon);
    color: var(--ink);
  }

  .nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    box-shadow: 0 12px 24px var(--shadow);
  }

  .site-nav[data-open] {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
    padding: 8px;
  }

  .nav-item a {
    padding: 14px 16px;
    font-size: 16px;
    border-left: 4px solid transparent;
    background: var(--paper);
  }

  .nav-item a::after {
    display: none;
  }

  .nav-item a[aria-current="page"] {
    background: var(--neon);
    border-left-color: var(--orange);
    box-shadow: none;
  }
}

@media (max-width: 640px) {
  .container,
  .page-wrap {
    width: min(100% - 32px, var(--container-w));
  }

  .header-meta {
    padding: 5px 12px;
    font-size: 10px;
  }

  .meta-version {
    font-size: 10px;
    padding: 1px 6px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 0 24px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .card-grid,
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .nav-toggle-text {
    display: none;
  }

  .nav-toggle {
    padding: 10px 12px;
  }
}

/* ==========================================================================
   20. 减少动态偏好
   ========================================================================== */
@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;
    transition-delay: 0ms !important;
  }

  .progress-bar {
    transition: none;
  }

  .card:hover,
  .btn:hover,
  .nav-item a:hover,
  .footer-list a:hover,
  .to-top:hover {
    transform: none !important;
  }
}

/* ---------- 21. 滚动条细节 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--code-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--deep-blue);
  border: 2px solid var(--code-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}
