/* =========================================================================
   安博体育站 · 共享样式表 (/assets/site.css)
   负责：reset / 变量 / 中文排版 / 页头 / 页脚 / 按钮 / 通用网格与基础组件
   ========================================================================= */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, figcaption, blockquote, dl, dd { 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; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --abyss: #050B14;
  --night: #0A1626;
  --hull: #111F33;
  --line: #1E3A4F;
  --line-soft: rgba(30, 58, 79, .55);
  --cyan: #22D3EE;
  --cyan-dim: rgba(34, 211, 238, .14);
  --amber: #F5B742;
  --coral: #FF6B5E;
  --paper: #F4F7FB;
  --mist: #9FB0C7;
  --mint: #34D399;
  --teal: #0E7490;

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --wrap: min(1240px, 100% - clamp(1.25rem, 5vw, 5rem));
  --wrap-narrow: min(760px, 100% - clamp(1.25rem, 5vw, 5rem));
  --radius: 3px;
  --shadow-soft: 0 18px 40px -32px rgba(0, 0, 0, .95);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--abyss);
  background-image:
    linear-gradient(rgba(30, 58, 79, .30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 79, .30) 1px, transparent 1px),
    radial-gradient(1000px 560px at 82% -8%, rgba(34, 211, 238, .13), transparent 62%),
    radial-gradient(820px 460px at -5% 12%, rgba(245, 183, 66, .07), transparent 58%);
  background-size: 80px 80px, 80px 80px, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.012em;
  color: var(--paper);
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.9vw, 1.42rem); }
h4 { font-size: 1.02rem; }
strong { color: var(--paper); font-weight: 700; }
::selection { background: var(--cyan); color: #04141c; }
main [id] { scroll-margin-top: 140px; }

/* ---------- 4. 布局工具 ---------- */
.wrap { width: var(--wrap); margin-inline: auto; }
.wrap--narrow { width: var(--wrap-narrow); margin-inline: auto; }
.section { padding-block: clamp(2.6rem, 6vw, 4.6rem); }
.stack { display: grid; gap: clamp(.9rem, 2vw, 1.4rem); }
.grid { display: grid; gap: clamp(1rem, 2.2vw, 1.75rem); }
.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- 5. 文本组件 ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--cyan);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--cyan); }
.section-head { display: grid; gap: .7rem; max-width: 64ch; margin-bottom: clamp(1.4rem, 3vw, 2.2rem); }
.section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.section-lede { color: var(--mist); font-size: 1rem; line-height: 1.85; max-width: 64ch; }
.lede { font-size: clamp(1.02rem, 1.5vw, 1.18rem); color: var(--mist); line-height: 1.9; max-width: 62ch; }
.data-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.link-more {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em;
  color: var(--cyan); border-bottom: 1px solid rgba(34, 211, 238, .35);
  padding-bottom: .15rem; transition: color .2s var(--ease);
}
.link-more::after { content: "→"; transition: transform .2s var(--ease); }
.link-more:hover { color: var(--paper); }
.link-more:hover::after { transform: translateX(3px); }
.prose { max-width: 68ch; color: var(--mist); line-height: 1.9; }
.prose > * + * { margin-top: 1.05rem; }
.prose h2, .prose h3 { color: var(--paper); margin-top: 2rem; }
.prose ul, .prose ol { padding-left: 1.25rem; list-style: disc; }
.prose ol { list-style: decimal; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(34, 211, 238, .35); }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.15rem; border: 1px solid var(--line); border-radius: 2px;
  background: var(--hull); color: var(--paper);
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .08em;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { border-color: rgba(34, 211, 238, .6); color: var(--paper); }
.btn--primary {
  background: var(--cyan); border-color: var(--cyan); color: #04141c; font-weight: 700;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .22), 0 10px 26px -14px rgba(34, 211, 238, .95);
}
.btn--primary:hover { background: #5ce4f5; border-color: #5ce4f5; color: #04141c; }
.btn--ghost { background: transparent; color: var(--mist); }
.btn--ghost:hover { color: var(--cyan); border-color: var(--cyan); }
.btn--sm { padding: .48rem .82rem; font-size: .76rem; letter-spacing: .06em; }
.btn--block { width: 100%; }

/* ---------- 7. 页头 ---------- */
.skip-link {
  position: fixed; top: .6rem; left: .6rem; z-index: 300;
  transform: translateY(-180%);
  padding: .6rem 1rem; border-radius: 2px;
  background: var(--cyan); color: #04141c;
  font-weight: 700; font-size: .85rem;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(180deg, rgba(10, 22, 38, .97), rgba(10, 22, 38, .88));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.read-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: rgba(34, 211, 238, .12); pointer-events: none;
}
.read-progress__bar {
  display: block; width: 0; height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--cyan) 58%, var(--amber));
  transition: width .12s linear;
}
.header-shell { width: var(--wrap); margin-inline: auto; display: grid; }

.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-block: clamp(.8rem, 1.5vw, 1.15rem);
}
.masthead__meta {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .12em; color: var(--mist);
  max-width: none;
}
.status-dot {
  display: inline-block; flex: none;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 3px rgba(52, 211, 153, .16);
}
.status-dot--amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(245, 183, 66, .16); }

.brand-lockup {
  grid-column: 2; justify-self: center;
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .18rem .3rem; border-radius: 2px;
}
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 2px;
  border: 1px solid var(--cyan); color: var(--cyan);
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .06em;
  background: linear-gradient(150deg, rgba(34, 211, 238, .20), rgba(34, 211, 238, 0));
  box-shadow: inset 0 0 12px rgba(34, 211, 238, .18);
}
.brand-text { display: grid; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.06rem; letter-spacing: .16em; color: var(--paper);
  transition: color .2s var(--ease);
}
.brand-sub {
  margin-top: .22rem;
  font-family: var(--font-mono); font-size: .56rem;
  letter-spacing: .24em; color: var(--mist); white-space: nowrap;
}
.brand-lockup:hover .brand-name { color: var(--cyan); }

.masthead__actions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: .6rem; }

.nav-toggle {
  display: none;
  align-items: center; gap: .5rem;
  padding: .46rem .68rem; border: 1px solid var(--line); border-radius: 2px;
  background: var(--hull); color: var(--mist);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav-toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.nav-toggle[aria-expanded="true"] { color: var(--cyan); border-color: var(--cyan); }
.nav-toggle__bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle__bars span { display: block; height: 1.5px; background: currentColor; transition: transform .2s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(4.5px) 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(-4.5px) rotate(-45deg); }
.nav-toggle__label { font-size: .72rem; letter-spacing: .12em; }

.primary-nav { border-top: 1px solid var(--line-soft); }
.primary-nav__list {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(.9rem, 3vw, 2.6rem); padding-block: .5rem;
}
.nav-link {
  position: relative; display: inline-block;
  padding-block: .38rem; color: var(--mist);
  font-size: .92rem; letter-spacing: .06em;
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px;
  height: 2px; background: var(--cyan);
  transition: left .25s var(--ease), right .25s var(--ease);
}
.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { left: 0; right: 0; }
.nav-link[aria-current="page"] { color: var(--cyan); }
.nav-link[aria-current="page"]::after { left: 0; right: 0; }

.console {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .5rem .62rem;
  border-top: 1px solid var(--line-soft);
}
.console__group { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.console__group--clock { gap: .55rem; }
.console__label {
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(159, 176, 199, .75); white-space: nowrap;
}
.version-switch { display: flex; flex-wrap: wrap; gap: .4rem; }
.version-chip {
  padding: .34rem .78rem; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--mist);
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.version-chip:hover { color: var(--paper); border-color: rgba(34, 211, 238, .55); }
.version-chip[aria-pressed="true"] {
  background: var(--cyan); border-color: var(--cyan); color: #04141c;
  box-shadow: 0 0 18px -6px rgba(34, 211, 238, .95);
}
html[data-active-version="enhanced"] .version-chip[aria-pressed="true"] {
  background: var(--amber); border-color: var(--amber); color: #1a1204;
  box-shadow: 0 0 18px -6px rgba(245, 183, 66, .95);
}
html[data-active-version="goals"] .version-chip[aria-pressed="true"] {
  background: var(--coral); border-color: var(--coral); color: #1c0804;
  box-shadow: 0 0 18px -6px rgba(255, 107, 94, .95);
}
.clock { display: inline-flex; align-items: baseline; gap: .4rem; font-family: var(--font-mono); }
.clock__value { font-size: 1.02rem; letter-spacing: .04em; color: var(--amber); }
.clock__zone { font-size: .62rem; letter-spacing: .14em; color: var(--mist); }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 5.5rem);
  background: linear-gradient(180deg, rgba(10, 22, 38, .55), rgba(10, 22, 38, 1) 58%);
  border-top: 1px solid var(--line);
  color: var(--mist);
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .75), rgba(245, 183, 66, .55), transparent);
}
.footer-shell { width: var(--wrap); margin-inline: auto; padding-block: clamp(2.2rem, 5vw, 3.4rem) 1.2rem; }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: start;
}
.footer-brand { display: grid; gap: .9rem; max-width: 36ch; justify-items: start; }
.footer-brand .brand-lockup { grid-column: auto; justify-self: start; padding-inline: 0; }
.footer-desc { font-size: .92rem; line-height: 1.85; color: var(--mist); }
.footer-stamp {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .7rem;
  letter-spacing: .1em; color: rgba(159, 176, 199, .85);
}
.footer-col__title {
  margin-bottom: .9rem;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--amber);
}
.footer-col__list { display: grid; gap: .55rem; }
.footer-link {
  position: relative; display: inline-block;
  font-size: .94rem; color: var(--mist);
  transition: color .18s var(--ease);
}
.footer-link::before {
  content: ""; position: absolute; left: -.85rem; top: .72em;
  width: 5px; height: 1px; background: var(--cyan);
  opacity: 0; transition: opacity .18s var(--ease);
}
.footer-link:hover { color: var(--paper); }
.footer-link:hover::before { opacity: 1; }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; margin-top: clamp(1.8rem, 4vw, 2.6rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--line); overflow: hidden;
}
.contact-item { display: grid; gap: .3rem; padding: .95rem 1.05rem; background: rgba(17, 31, 51, .68); }
.contact-item__label {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--mist);
}
.contact-item__value { font-size: .9rem; line-height: 1.6; color: var(--paper); word-break: break-word; }
.footer-note { margin-top: .9rem; font-size: .82rem; line-height: 1.75; color: rgba(159, 176, 199, .85); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .8rem; margin-top: clamp(1.6rem, 3vw, 2.2rem); padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .06em;
  color: rgba(159, 176, 199, .8);
}
.footer-copy, .footer-icp { max-width: none; }
.footer-icp { color: rgba(245, 183, 66, .9); }
.to-top {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .38rem .8rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--mist); font-family: var(--font-mono);
  font-size: .7rem; letter-spacing: .12em;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.to-top::after { content: "↑"; }
.to-top:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-2px); }

/* ---------- 9. 通用卡片 / 面板 ---------- */
.card {
  position: relative; display: grid; gap: .65rem;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  background: linear-gradient(160deg, rgba(17, 31, 51, .92), rgba(10, 22, 38, .92));
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card:hover { border-color: rgba(34, 211, 238, .55); transform: translateY(-2px); }
.card--accent { border-color: rgba(34, 211, 238, .45); }
.card__title { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; color: var(--paper); }
.card__meta {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--mist);
}
.card__text { font-size: .93rem; line-height: 1.8; color: var(--mist); }

.panel {
  padding: clamp(1.1rem, 2.4vw, 1.8rem);
  background: rgba(10, 22, 38, .72);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.panel--inset { background: rgba(17, 31, 51, .55); }

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .26rem .6rem; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(17, 31, 51, .6); color: var(--mist);
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase;
}
.tag--cyan { color: var(--cyan); border-color: rgba(34, 211, 238, .45); }
.tag--amber { color: var(--amber); border-color: rgba(245, 183, 66, .45); }
.tag--coral { color: var(--coral); border-color: rgba(255, 107, 94, .45); }
.tag--mint { color: var(--mint); border-color: rgba(52, 211, 153, .45); }
.tag-button {
  cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.tag-button:hover { color: var(--paper); border-color: rgba(34, 211, 238, .6); }
.tag-button[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #04141c; font-weight: 700; }
.tag-button[aria-pressed="true"].tag--amber { background: var(--amber); border-color: var(--amber); color: #1a1204; }
.tag-button[aria-pressed="true"].tag--coral { background: var(--coral); border-color: var(--coral); color: #1c0804; }

/* ---------- 11. 数据矩阵表 ---------- */
.matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(10, 22, 38, .6);
}
.matrix-table { min-width: 620px; font-size: .92rem; }
.matrix-table th, .matrix-table td {
  padding: .8rem 1rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
.matrix-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: rgba(17, 31, 51, .97);
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--mist);
}
.matrix-table tbody th {
  position: sticky; left: 0; z-index: 1;
  background: rgba(17, 31, 51, .96);
  color: var(--paper); font-weight: 600;
}
.matrix-table tbody tr:hover td { background: rgba(34, 211, 238, .05); }
.matrix-table .is-diff { color: var(--coral); }
.matrix-table .is-strong { color: var(--amber); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 12. 面包屑 ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  padding-block: 1.1rem;
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .1em; color: var(--mist);
}
.crumbs a { color: var(--mist); transition: color .18s var(--ease); }
.crumbs a:hover { color: var(--cyan); }
.crumbs__sep { color: rgba(159, 176, 199, .45); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 13. 手风琴 ---------- */
.accordion { display: grid; gap: .6rem; }
.accordion__item {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(10, 22, 38, .72); overflow: hidden;
}
.accordion__trigger {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem; text-align: left;
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--paper);
}
.accordion__trigger::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.1rem; line-height: 1; color: var(--cyan);
}
.accordion__trigger[aria-expanded="true"]::after { content: "–"; color: var(--amber); }
.accordion__panel { padding: 0 1.15rem 1.15rem; font-size: .95rem; line-height: 1.85; color: var(--mist); }
.accordion__panel[hidden] { display: none; }

/* ---------- 14. 图片容器（页面阶段放占位图） ---------- */
.media-frame {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(17, 31, 51, .95), rgba(5, 11, 20, .95)),
    repeating-linear-gradient(90deg, rgba(34, 211, 238, .08) 0 1px, transparent 1px 28px);
}
.media-frame > img, .media-frame > svg, .media-frame > picture {
  width: 100%; height: 100%; object-fit: cover;
}
.media-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0) 48%, rgba(5, 11, 20, .78));
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame__caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: .8rem 1rem;
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--mist);
}

/* ---------- 15. 滚动显现 ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes navIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 16. 平板与移动端 ---------- */
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 959px) {
  .masthead { grid-template-columns: 1fr auto 1fr; padding-block: .7rem; }
  .masthead__meta { display: none; }
  .brand-lockup { grid-column: 2; justify-self: center; }
  .masthead__actions { grid-column: 3; justify-self: end; }
  .nav-toggle { display: inline-flex; }

  .primary-nav { display: none; border-top: 1px solid var(--line); }
  .site-header[data-open] .primary-nav {
    display: block;
    background: linear-gradient(180deg, rgba(5, 11, 20, .75), rgba(5, 11, 20, 0));
    animation: navIn .22s var(--ease) both;
  }
  .primary-nav__list { flex-direction: column; gap: 0; padding-block: .35rem; }
  .primary-nav__list li + li { border-top: 1px solid var(--line-soft); }
  .nav-link { display: block; padding: .85rem .25rem; font-size: 1rem; }
  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] {
    color: var(--cyan);
    box-shadow: inset 3px 0 0 var(--cyan);
    padding-left: .9rem;
  }

  .console { flex-wrap: wrap; gap: .55rem; padding-block: .55rem .65rem; }
  .console__group { width: 100%; }
  .console__group--clock { width: auto; }
  .version-switch { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: .2rem; }
  .version-chip { white-space: nowrap; }

  .grid--7-5, .grid--8-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%; }
  .grid--4, .grid--3, .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: .96rem; letter-spacing: .12em; }
  .brand-sub { font-size: .5rem; letter-spacing: .18em; }
  .brand-mark { width: 32px; height: 32px; font-size: .72rem; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { justify-content: flex-start; }
  .crumbs { font-size: .68rem; }
}

/* ---------- 17. 降低动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .read-progress__bar { transition: none; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
