/* =========================================================
   博澳体育看台 — 共享样式 /assets/site.css
   高原夜空底 · 档案纸层 · 湖青交互 · 油菜花金索引
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0B1B2B;
  --ink-layer: #122A42;
  --ink-deep: #08131F;
  --lake: #1E7F8C;
  --lake-soft: #6FBFC7;
  --gold: #D9A441;
  --paper: #F2E9D8;
  --paper-deep: #E4D8C2;
  --warm: #C9C2B4;
  --print: #221C16;
  --ember: #C4552D;
  --cool: #E8F1F2;

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

  --shell: 1320px;
  --gutter: clamp(16px, 3.2vw, 48px);
  --radius: 2px;
  --hair: rgba(201, 194, 180, 0.22);
  --hair-strong: rgba(201, 194, 180, 0.44);
  --shadow-paper: 0 22px 46px -28px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: clamp(15px, 0.42vw + 13px, 17px);
  line-height: 1.78;
  color: var(--cool);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 560px at 84% -8%, rgba(30, 127, 140, 0.22), transparent 62%),
    radial-gradient(880px 520px at 2% 6%, rgba(217, 164, 65, 0.11), transparent 60%),
    linear-gradient(180deg, #0B1B2B 0%, #0A1929 56%, #08131F 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(201, 194, 180, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(201, 194, 180, 0.055) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 74%);
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 74%);
}

#main-content {
  position: relative;
  z-index: 1;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.015em;
  color: var(--paper);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.4vw, 4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.5rem); }
h4 { font-size: clamp(1rem, 1.3vw, 1.125rem); }

p { overflow-wrap: break-word; text-wrap: pretty; }

strong { color: var(--paper); font-weight: 700; }

::selection { background: var(--gold); color: var(--print); }

:focus-visible {
  outline: 2px solid var(--lake-soft);
  outline-offset: 3px;
}

/* ---------- 4. Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.rule {
  display: block;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--hair-strong), rgba(201, 194, 180, 0.04));
  margin-block: clamp(18px, 3vw, 34px);
}

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 300;
  transform: translateY(-180%);
  background: var(--gold);
  color: var(--print);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  transition: transform 0.22s var(--ease);
}

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

/* ---------- 6. Header / command bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(11, 27, 43, 0.985), rgba(14, 35, 55, 0.94));
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 14px 30px -26px rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.header-inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0.7rem var(--gutter);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2.4vw, 44px);
}

/* 档案封签 */
.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  padding-left: 0.9rem;
  min-width: 0;
}

.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 2.15rem;
  background: linear-gradient(180deg, var(--gold) 0%, var(--lake) 100%);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--paper);
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  line-height: 1.3;
  color: var(--lake-soft);
  white-space: nowrap;
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius);
  background: rgba(18, 42, 66, 0.55);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--paper);
}

.nav-toggle:hover { border-color: var(--lake-soft); color: var(--lake-soft); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.24s var(--ease), top 0.24s var(--ease);
}

.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.site-header[data-open="true"] .nav-toggle-bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.nav-toggle-label { line-height: 1; }

/* 导航 */
.primary-nav { justify-self: center; min-width: 0; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(10px, 1.5vw, 26px);
}

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.36rem;
  padding: 0.5rem 0.1rem;
  font-size: 0.93rem;
  line-height: 1.4;
  color: var(--warm);
  transition: color 0.2s var(--ease);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.78;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--lake);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.24s var(--ease), background 0.24s var(--ease);
}

.nav-link:hover { color: var(--cool); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--paper);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--lake), var(--lake-soft));
}

/* 右侧行动 */
.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 1.2vw, 1rem);
  justify-self: end;
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.62rem;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: var(--warm);
  white-space: nowrap;
}

.update-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lake-soft);
  animation: beacon 2.8s ease-in-out infinite;
}

@keyframes beacon {
  0%, 100% { box-shadow: 0 0 0 3px rgba(111, 191, 199, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(111, 191, 199, 0.05); }
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gold);
  color: var(--print);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.btn-primary:hover { background: var(--lake); color: var(--cool); }

.btn-ghost {
  background: transparent;
  color: var(--cool);
  border-color: var(--hair-strong);
}

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

/* 阅读进度 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lake) 0%, var(--lake-soft) 58%, var(--gold) 100%);
  transition: width 0.12s linear;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 7vw, 96px);
  background: linear-gradient(180deg, rgba(18, 42, 66, 0.94) 0%, #0A1826 60%, #08131F 100%);
  border-top: 1px solid var(--hair-strong);
  color: var(--warm);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: repeating-linear-gradient(90deg,
    var(--lake) 0 14px,
    transparent 14px 26px,
    var(--gold) 26px 34px,
    transparent 34px 60px);
  opacity: 0.55;
}

.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(34px, 4.6vw, 64px) var(--gutter) clamp(18px, 2.4vw, 26px);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.58fr);
  gap: clamp(26px, 4vw, 64px);
  padding-bottom: clamp(24px, 3.4vw, 42px);
  border-bottom: 1px solid var(--hair);
}

.footer-brand-line {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--paper);
}

.footer-summary {
  margin-top: 0.7rem;
  max-width: 40ch;
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(201, 194, 180, 0.88);
}

.footer-update {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--lake-soft);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 34px);
}

.footer-col { min-width: 0; }

.footer-col-title {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--paper);
}

.footer-col-index {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.footer-links { display: flex; flex-direction: column; gap: 0.42rem; }

.footer-links a {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(201, 194, 180, 0.86);
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer-links a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--paper);
  padding-left: 0.95rem;
}

.footer-links a:hover::before { width: 0.7rem; }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin-block: clamp(22px, 3.4vw, 38px);
  padding-bottom: clamp(22px, 3.4vw, 38px);
  border-bottom: 1px solid var(--hair);
}

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--lake-soft);
}

.footer-contact-value {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--paper);
  overflow-wrap: break-word;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  line-height: 1.7;
  color: rgba(201, 194, 180, 0.7);
}

.footer-copy { color: rgba(201, 194, 180, 0.78); }

.footer-icp {
  padding-left: 1.6rem;
  border-left: 1px solid var(--hair);
}

.to-top {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.78rem;
  border: 1px solid var(--hair-strong);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--paper);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}

.to-top:hover {
  border-color: var(--lake-soft);
  color: var(--ink);
  background: var(--lake-soft);
}

/* ---------- 8. Content primitives ---------- */
.section { padding-block: clamp(30px, 4.6vw, 68px); }
.section + .section { border-top: 1px solid var(--hair); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.85;
  color: rgba(232, 241, 242, 0.84);
}

.paper {
  position: relative;
  padding: clamp(20px, 3vw, 40px);
  background: linear-gradient(180deg, #F6EEE0 0%, var(--paper) 62%, var(--paper-deep) 100%);
  color: var(--print);
  border: 1px solid rgba(34, 28, 22, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-paper);
}

.paper::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(34, 28, 22, 0.1);
  pointer-events: none;
}

.paper h1,
.paper h2,
.paper h3,
.paper h4 { color: var(--print); }

.paper a { color: #14606B; text-decoration: underline; text-underline-offset: 3px; }

.plaque {
  position: relative;
  padding: 1rem 1.15rem;
  background: rgba(18, 42, 66, 0.62);
  border-left: 3px solid var(--lake);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: rgba(232, 241, 242, 0.88);
}

.plaque-title {
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lake-soft);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gold);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm);
}

.date-stamp {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(217, 164, 65, 0.42);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.69rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.58rem;
  border: 1px solid var(--hair-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  line-height: 1.6;
  color: var(--warm);
  background: rgba(18, 42, 66, 0.4);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tag:hover { border-color: var(--lake-soft); color: var(--cool); }

.tag.is-active,
.tag[aria-pressed="true"] {
  background: var(--lake);
  border-color: var(--lake);
  color: var(--cool);
}

.breadcrumb {
  padding-block: clamp(14px, 2vw, 22px);
  font-size: 0.8rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  color: rgba(201, 194, 180, 0.72);
}

.breadcrumb-item { display: inline-flex; align-items: center; }

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 0.45rem;
  color: rgba(201, 194, 180, 0.4);
}

.breadcrumb-item a { color: var(--lake-soft); transition: color 0.2s var(--ease); }
.breadcrumb-item a:hover { color: var(--gold); }
.breadcrumb-item[aria-current="page"] { color: var(--paper); }

/* 网格 */
.grid { display: grid; gap: clamp(16px, 2.4vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* 图片容器基座 */
.img-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(150deg, #14314C 0%, #0E2437 55%, #0B1B2B 100%);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.img-frame > img,
.img-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(0.96) brightness(0.94);
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(111, 191, 199, 0.14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(111, 191, 199, 0.14) 1px, transparent 1px);
  background-size: 52px 52px;
  mix-blend-mode: screen;
  opacity: 0.55;
}

.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--card { aspect-ratio: 4 / 3; }
.img-frame--tall { aspect-ratio: 3 / 4; }

.img-caption {
  margin-top: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.71rem;
  letter-spacing: 0.05em;
  line-height: 1.7;
  color: rgba(201, 194, 180, 0.76);
}

/* 章节目录 */
.chapter-nav {
  position: sticky;
  top: 96px;
  font-family: var(--font-mono);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-left: 1px solid var(--hair);
}

.chapter-link {
  display: block;
  margin-left: -1px;
  padding: 0.44rem 0.8rem;
  border-left: 2px solid transparent;
  font-size: 0.79rem;
  letter-spacing: 0.03em;
  line-height: 1.6;
  color: rgba(201, 194, 180, 0.78);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.chapter-link:hover {
  color: var(--cool);
  border-left-color: var(--lake-soft);
}

.chapter-link[aria-current="true"] {
  color: var(--paper);
  border-left-color: var(--gold);
  background: rgba(30, 127, 140, 0.14);
}

/* ---------- 9. Responsive ---------- */
@media (max-width: 1040px) {
  body { background-attachment: scroll; }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 0.62rem;
    gap: 0;
  }

  .brand { grid-column: 1; grid-row: 1; }

  .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .primary-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    margin-top: 0.6rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--hair);
  }

  .site-header[data-open="true"] .primary-nav { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item + .nav-item { border-top: 1px solid rgba(201, 194, 180, 0.12); }

  .nav-link {
    width: 100%;
    padding: 0.72rem 0.2rem;
    font-size: 1rem;
  }

  .nav-link::after { display: none; }

  .nav-link[aria-current="page"] {
    color: var(--gold);
    background: rgba(30, 127, 140, 0.1);
  }

  .header-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
    justify-content: space-between;
    margin-top: 0.6rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--hair);
  }

  .scroll-progress { position: relative; bottom: auto; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chapter-nav { position: static; top: auto; }
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: minmax(0, 1fr); }

  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-icp { padding-left: 0; border-left: 0; }
  .to-top { margin-left: 0; }
}

@media (max-width: 600px) {
  .update-badge { display: none; }
  .header-actions { justify-content: flex-end; }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: minmax(0, 1fr); }
  .brand-name { font-size: 0.98rem; }
  .brand-tagline { font-size: 0.58rem; letter-spacing: 0.1em; }
}

/* ---------- 10. Motion preferences ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .update-dot { animation: none; }
  .scroll-progress-bar { transition: none; }
}
