/* ============================================================
   6t体育链接 · 共享外观 /assets/site.css
   夜色墨绿底 + 荧光青主路径 + 琥珀橙轮次 + 电光紫反馈
   ============================================================ */

:root {
  --ink: #061F1A;
  --panel: #0C2E26;
  --raise: #123F35;
  --cyan: #35F2D0;
  --teal: #17B89D;
  --amber: #FFB020;
  --violet: #8B5CF6;
  --wine: #6B1F35;
  --indigo: #26326B;
  --paper: #EAF6F1;
  --muted: #8BA6A0;
  --line: rgba(53, 242, 208, 0.16);
  --line-soft: rgba(234, 246, 241, 0.10);
  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shell: 1180px;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --header-h: 76px;
}

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

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(58% 46% at 88% -8%, rgba(53, 242, 208, 0.12), transparent 62%),
    radial-gradient(46% 38% at -6% 6%, rgba(139, 92, 246, 0.12), transparent 66%),
    radial-gradient(40% 30% at 50% 108%, rgba(255, 176, 32, 0.07), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

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

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

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

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

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

address { margin: 0; font-style: normal; }

[hidden] { display: none !important; }

[id] { scroll-margin-top: calc(var(--header-h) + 34px); }

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

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

/* ---------- 排版工具 ---------- */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.lead {
  max-width: 62ch;
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.75;
  color: rgba(234, 246, 241, 0.86);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(var(--shell), 100% - 48px);
  margin-inline: auto;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  transform: translateY(-180%);
  transition: transform 0.22s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(6, 31, 26, 0.92);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--teal) 28%, var(--amber) 64%, var(--violet));
  opacity: 0.9;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1280px, 100% - 48px);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-block: 12px;
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg, var(--cyan), var(--teal));
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.04em;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--paper);
  white-space: nowrap;
}

.round-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 4px 12px;
  border: 1px solid rgba(53, 242, 208, 0.34);
  border-radius: 999px;
  background: rgba(53, 242, 208, 0.07);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.round-pill__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--cyan);
  animation: dot-pulse 2.6s ease-out infinite;
}

.round-pill__text { white-space: nowrap; }

@keyframes dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 242, 208, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(53, 242, 208, 0); }
}

.site-nav { display: flex; }

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

.site-nav__item { flex: 0 0 auto; }

.site-nav__link {
  display: inline-block;
  padding: 8px 13px;
  border-radius: 999px;
  color: rgba(234, 246, 241, 0.78);
  font-size: 14px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-nav__link:hover { color: var(--paper); background: rgba(53, 242, 208, 0.09); }

.site-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(53, 242, 208, 0.11);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.site-nav__link--cta {
  margin-left: 8px;
  padding: 9px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(53, 242, 208, 0.5), 0 10px 24px -14px rgba(53, 242, 208, 0.9);
}

.site-nav__link--cta:hover { background: var(--amber); color: var(--ink); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(53, 242, 208, 0.06);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-toggle:hover { border-color: rgba(53, 242, 208, 0.45); }

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform 0.24s var(--ease), opacity 0.18s var(--ease);
}

.site-header[data-open] .nav-toggle { background: rgba(53, 242, 208, 0.16); border-color: var(--cyan); }

.site-header[data-open] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(53, 242, 208, 0.08);
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.12s linear;
}

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(70% 120% at 12% 0%, rgba(53, 242, 208, 0.08), transparent 58%),
    linear-gradient(180deg, rgba(12, 46, 38, 0.55), rgba(6, 31, 26, 0.98) 60%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--indigo) 32%, var(--teal) 68%, var(--amber));
  opacity: 0.75;
}

.footer-inner {
  width: min(var(--shell), 100% - 48px);
  margin-inline: auto;
  padding-block: clamp(44px, 6vw, 68px) 26px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
  gap: clamp(24px, 3.4vw, 46px);
}

.footer-brand {
  display: grid;
  gap: 14px;
  align-content: start;
}

.footer-brand__note {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 24ch;
}

.footer-icp {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-col__title::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--cyan);
  transform: rotate(45deg);
}

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

.footer-list a {
  display: inline-block;
  font-size: 14px;
  color: rgba(234, 246, 241, 0.76);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-list a:hover { color: var(--cyan); transform: translateX(3px); }

.footer-contact {
  display: grid;
  gap: 13px;
}

.footer-contact__row { display: grid; gap: 2px; }

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-contact__value {
  font-size: 14.5px;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 26px;
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--muted);
}

.footer-note { font-size: 12px; color: var(--muted); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-legal a { color: var(--muted); transition: color 0.2s var(--ease); }
.footer-legal a:hover { color: var(--cyan); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: center;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
    border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--cyan);
  color: var(--ink);
  box-shadow: 0 14px 30px -18px rgba(53, 242, 208, 0.9);
}

.btn--primary:hover { background: var(--amber); }

.btn--ghost {
  border-color: rgba(234, 246, 241, 0.3);
  color: var(--paper);
  background: rgba(234, 246, 241, 0.03);
}

.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--quiet {
  padding-inline: 6px;
  color: var(--cyan);
  border-radius: 4px;
}

.btn--quiet:hover { color: var(--amber); }

/* ---------- 面包屑 ---------- */
.breadcrumb { margin-block: 22px 6px; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  font-size: 12px;
  color: var(--muted);
}

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

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(139, 166, 160, 0.5);
}

.breadcrumb__link { color: var(--muted); transition: color 0.2s var(--ease); }
.breadcrumb__link:hover { color: var(--cyan); }

.breadcrumb__current { color: var(--paper); }

/* ---------- 章节与色带 ---------- */
.section {
  position: relative;
  padding-block: clamp(46px, 6.4vw, 86px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(22px, 3.4vw, 38px);
}

.section-title { font-size: clamp(27px, 3.5vw, 42px); }

.section-note {
  max-width: 46ch;
  font-size: 14px;
  color: var(--muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}

.chapter {
  position: relative;
  padding-block: clamp(34px, 5vw, 66px);
  border-top: 1px solid var(--line-soft);
}

.chapter:first-of-type { border-top: 0; }

.chapter__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--amber);
}

.chapter__title {
  margin-bottom: 14px;
  font-size: clamp(25px, 3.1vw, 37px);
}

.chapter__note {
  max-width: 58ch;
  font-size: 15px;
  color: var(--muted);
}

.band {
  position: relative;
  padding-block: clamp(38px, 5.4vw, 62px);
  overflow: hidden;
  color: var(--paper);
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.band > .container { position: relative; z-index: 1; }

.band--wine { background: linear-gradient(115deg, var(--wine), #2B0D16 72%); }
.band--indigo { background: linear-gradient(115deg, var(--indigo), #141A3A 72%); }

.band--amber {
  background: linear-gradient(115deg, var(--amber), #E07B12 72%);
  color: var(--ink);
}

.band--amber .chapter__note,
.band--amber .section-note { color: rgba(6, 31, 26, 0.78); }

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 26px);
}

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

.grid--split {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr);
  align-items: start;
}

/* ---------- 面板与数据 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent 62%);
  opacity: 0.6;
}

.panel--raise { background: var(--raise); }

.panel__label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat__num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.stat__num--amber { color: var(--amber); }
.stat__num--violet { color: var(--violet); }

.stat__label {
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.tag--cyan { color: var(--cyan); background: rgba(53, 242, 208, 0.08); }
.tag--amber { color: var(--amber); background: rgba(255, 176, 32, 0.1); }
.tag--violet { color: var(--violet); background: rgba(139, 92, 246, 0.12); }

/* ---------- 正文 ---------- */
.prose {
  max-width: 68ch;
  font-size: 15.5px;
  line-height: 1.85;
  color: rgba(234, 246, 241, 0.88);
}

.prose p + p { margin-top: 1em; }

.prose h2,
.prose h3 {
  margin-top: 1.9em;
  margin-bottom: 0.55em;
}

.prose h2 { font-size: clamp(23px, 2.6vw, 30px); }
.prose h3 { font-size: clamp(19px, 2vw, 23px); }

.prose ul {
  display: grid;
  gap: 8px;
  margin-block: 1em;
  padding-left: 18px;
  list-style: none;
}

.prose ul li { position: relative; }

.prose ul li::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 0.72em;
  width: 7px;
  height: 2px;
  background: var(--cyan);
}

.prose strong { color: var(--paper); font-weight: 600; }

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

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

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

.media-frame__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(53, 242, 208, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 242, 208, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  mix-blend-mode: screen;
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: linear-gradient(180deg, transparent, rgba(6, 31, 26, 0.88));
}

.media-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background:
    radial-gradient(70% 90% at 20% 0%, rgba(53, 242, 208, 0.14), transparent 60%),
    radial-gradient(60% 80% at 90% 100%, rgba(139, 92, 246, 0.16), transparent 60%),
    var(--raise);
}

.media-placeholder::before {
  content: "";
  width: 34px;
  height: 34px;
  border: 1px solid rgba(53, 242, 208, 0.5);
  border-radius: 8px;
  transform: rotate(45deg);
}

/* ---------- 长文目录 ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  padding-block: 6px;
}

.toc__list {
  display: grid;
  gap: 2px;
  border-left: 1px solid rgba(53, 242, 208, 0.2);
}

.toc__link {
  display: block;
  margin-left: -1px;
  padding: 8px 14px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.toc__link:hover { color: var(--paper); }

.toc__link.is-active {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(53, 242, 208, 0.12), transparent);
}

/* ---------- 返回顶部（由 JS 注入） ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid rgba(53, 242, 208, 0.4);
  border-radius: 999px;
  background: rgba(12, 46, 38, 0.94);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.to-top:hover { border-color: var(--amber); color: var(--amber); }

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

/* ---------- 滚动显现 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.has-motion [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  }

  html.has-motion [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .header-inner {
    gap: 12px;
    width: calc(100% - 32px);
    min-height: var(--header-h);
    padding-block: 10px;
  }

  .header-brand { gap: 10px; }

  .brand-mark { width: 30px; height: 30px; font-size: 12.5px; }
  .brand-name { font-size: 16px; letter-spacing: 0.03em; }

  .round-pill { padding: 3px 9px; font-size: 10.5px; gap: 6px; }

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

  .site-nav { display: none; }

  .site-header[data-open] .site-nav {
    display: block;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 130;
    background: rgba(6, 31, 26, 0.98);
    border-top: 1px solid var(--line);
    box-shadow: 0 -22px 44px rgba(0, 0, 0, 0.5);
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    animation: nav-rise 0.28s var(--ease);
  }

  .site-nav__list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .site-nav__list::-webkit-scrollbar { display: none; }

  .site-nav__item { scroll-snap-align: start; }

  .site-nav__link {
    display: block;
    padding: 10px 16px;
    border: 1px solid var(--line);
    font-size: 13px;
    white-space: nowrap;
  }

  .site-nav__link--cta { margin-left: 0; border-color: transparent; }

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

  .to-top { bottom: calc(84px + env(safe-area-inset-bottom)); }

  .toc { position: static; }
}

@keyframes nav-rise {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 36px); }
  .footer-inner { width: calc(100% - 36px); }
  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { justify-content: flex-start; }
  .section-head { align-items: flex-start; }
}

@media (max-width: 420px) {
  .round-pill__text { font-size: 10px; }
  .brand-name { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .round-pill__dot { animation: none; }
  .btn:hover,
  .footer-list a:hover { transform: none; }
}
