/* ============================================================
   乐享主页 / 乐享CN — 共享站点样式 (site.css)
   高原服务站 · 档案夹框架导航 · 矿物色体系
   ============================================================ */

:root {
  --ink: #0B3A4A;
  --sky: #1F6F8B;
  --turq: #2E8B7A;
  --tibet: #B23A2E;
  --gold: #E8B33A;
  --slate: #6B6F6B;
  --clay: #B46A4F;
  --paper: #F4EFE4;
  --mist: #E7EEF0;
  --coal: #1B2426;

  --line: rgba(11, 58, 74, 0.18);
  --line-strong: rgba(11, 58, 74, 0.42);
  --rail-w: 272px;
  --header-h: 56px;
  --radius: 2px;
  --shadow-card: 0 1px 0 rgba(11, 58, 74, 0.06), 0 14px 28px -22px rgba(11, 58, 74, 0.75);
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

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

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

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }

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

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

button, input, select, textarea { font: inherit; color: inherit; }

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

[id] { scroll-margin-top: 96px; }

/* ---------- base ---------- */
body {
  min-height: 100vh;
  padding-left: 0;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, rgba(11, 58, 74, 0.028) 0 1px, transparent 1px 36px);
  color: var(--coal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

main { display: block; }
main:focus { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.18;
  color: var(--ink);
}

h1 { font-size: clamp(34px, 5.6vw, 72px); }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(18px, 2vw, 24px); }

p { margin: 0; }

::selection { background: rgba(232, 179, 58, 0.55); color: var(--coal); }

:focus-visible {
  outline: 3px solid var(--tibet);
  outline-offset: 3px;
}

/* ---------- layout helpers ---------- */
.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  padding-bottom: 10px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.section-head h2 { margin: 0; }

.section-code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tibet);
  font-variant-numeric: tabular-nums;
}

/* ---------- text utilities ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 0.85em;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--tibet);
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--tibet);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.prose {
  max-width: 72ch;
  color: var(--coal);
}

.prose p { margin-bottom: 1.05em; }
.prose p:last-child { margin-bottom: 0; }
.prose h2 { margin: 1.6em 0 0.6em; font-size: clamp(21px, 2.4vw, 28px); }
.prose h3 { margin: 1.4em 0 0.5em; }
.prose ul { margin: 0 0 1.1em; padding-left: 1.1em; list-style: square; }
.prose li { margin-bottom: 0.4em; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.breadcrumbs a { color: var(--sky); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs li::after { content: "›"; margin-left: 0.55em; color: var(--line-strong); }
.breadcrumbs li:last-child::after { content: ""; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.74em 1.15em;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { background: rgba(11, 58, 74, 0.06); border-color: var(--sky); color: var(--sky); }
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-solid:hover { background: var(--sky); border-color: var(--sky); color: #fff; }

.btn-ghost {
  background: rgba(244, 239, 228, 0.06);
  border-color: rgba(244, 239, 228, 0.42);
  color: var(--paper);
}

.btn-ghost:hover { background: rgba(232, 179, 58, 0.18); border-color: var(--gold); color: #fff; }

.btn-sm { padding: 0.58em 0.9em; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.26em 0.6em;
  border: 1px solid currentColor;
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  color: var(--sky);
  background: rgba(31, 111, 139, 0.06);
}

.tag--ok { color: var(--turq); background: rgba(46, 139, 122, 0.1); }
.tag--warn { color: var(--tibet); background: rgba(178, 58, 46, 0.08); }
.tag--note { color: #7a5a08; background: rgba(232, 179, 58, 0.22); border-color: rgba(232, 179, 58, 0.75); }

/* ---------- cards ---------- */
.card {
  position: relative;
  padding: 22px;
  background: #FBF7EE;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.24s var(--ease), border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 5px;
  background-image: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 5px);
  opacity: 0.8;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 1px 0 rgba(11, 58, 74, 0.08), 0 20px 34px -24px rgba(11, 58, 74, 0.85);
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.card-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}

.card-note {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--slate);
}

/* ---------- media frames ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--mist);
  box-shadow: var(--shadow-card);
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 6px solid rgba(244, 239, 228, 0.5);
  pointer-events: none;
}

.media-frame[data-ratio="wide"] { aspect-ratio: 16 / 9; }
.media-frame[data-ratio="photo"] { aspect-ratio: 4 / 3; }
.media-frame[data-ratio="tall"] { aspect-ratio: 4 / 5; }
.media-frame[data-ratio="square"] { aspect-ratio: 1 / 1; }
.media-frame[data-ratio="panorama"] { aspect-ratio: 21 / 9; }

.media-placeholder {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--slate);
  background-color: var(--mist);
  background-image:
    repeating-linear-gradient(135deg, rgba(31, 111, 139, 0.11) 0 10px, rgba(31, 111, 139, 0.03) 10px 20px),
    linear-gradient(160deg, #E7EEF0 0%, #F4EFE4 78%);
}

/* ---------- range bar ---------- */
.range-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 1px;
}

.range-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--fill, 42%);
  background-image: linear-gradient(90deg, var(--turq), var(--sky));
  transform-origin: left center;
  transition: transform 0.9s var(--ease);
}

html.js [data-grow] .range-bar-fill { transform: scaleX(0); }
html.js [data-grow].is-grown .range-bar-fill { transform: scaleX(1); }

/* ---------- section index ---------- */
.section-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.section-index a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--sky);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.section-index a:hover { border-color: var(--sky); color: var(--ink); }

.section-index a[aria-current="true"],
.section-index a.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* ---------- reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   HEADER — 框架式索引栏
   ============================================================ */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 0.6em 1em;
  background: var(--gold);
  color: var(--coal);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 1px;
  box-shadow: 2px 2px 0 rgba(178, 58, 46, 0.85);
  transform: translateY(-160%);
  transition: transform 0.22s var(--ease);
}

.skip-link:focus { transform: none; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  color: var(--paper);
  background-color: var(--ink);
  background-image: linear-gradient(180deg, rgba(31, 111, 139, 0.55) 0%, rgba(11, 58, 74, 0) 46%);
  border-right: 1px solid rgba(244, 239, 228, 0.16);
  box-shadow: 14px 0 44px -34px rgba(0, 0, 0, 0.95);
}

.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 80;
  background: rgba(11, 58, 74, 0.35);
  pointer-events: none;
}

.scroll-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  background-image: linear-gradient(90deg, var(--tibet) 0%, var(--gold) 45%, var(--turq) 78%, var(--sky) 100%);
}

.header-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  padding: 26px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.header-frame::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 8px;
  opacity: 0.45;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, rgba(244, 239, 228, 0.55) 0 1px, transparent 1px 18px);
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  background: var(--gold);
  color: var(--ink);
  border: 1px solid rgba(27, 36, 38, 0.3);
  border-radius: 1px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  box-shadow: 3px 3px 0 rgba(178, 58, 46, 0.9);
}

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

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.14em;
  color: var(--paper);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 228, 0.62);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid rgba(244, 239, 228, 0.42);
  border-radius: 1px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.nav-toggle-box { display: grid; gap: 3px; width: 16px; }
.nav-toggle-box span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

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

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

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

.nav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(244, 239, 228, 0.18);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(244, 239, 228, 0.55);
}

.nav-title-code { color: var(--gold); }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.nav-item { margin: 0; padding: 0; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border-left: 2px solid transparent;
  color: rgba(244, 239, 228, 0.86);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(232, 179, 58, 0.85);
  transition: color 0.2s var(--ease);
}

.nav-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.nav-link:hover {
  background: rgba(31, 111, 139, 0.55);
  border-left-color: var(--turq);
  color: #fff;
}

.nav-link[aria-current="page"] {
  background: rgba(232, 179, 58, 0.14);
  border-left-color: var(--gold);
  color: #fff;
}

.nav-link[aria-current="page"] .nav-num { color: var(--gold); }

.nav-link[aria-current="page"] .nav-text::after {
  content: "◆";
  margin-left: 8px;
  font-size: 8px;
  color: var(--gold);
  vertical-align: middle;
}

.nav-quick {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 239, 228, 0.18);
}

.nav-quick-title {
  margin: 0 0 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(244, 239, 228, 0.5);
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(244, 239, 228, 0.18);
  color: rgba(244, 239, 228, 0.8);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.quick-link::before {
  content: "⌗";
  font-size: 11px;
  color: var(--clay);
}

.quick-link:hover { color: var(--gold); border-bottom-color: rgba(232, 179, 58, 0.6); }

.nav-cta { margin-top: 10px; }

.rail-note {
  margin: 0;
  padding-left: 8px;
  border-left: 2px solid var(--tibet);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 228, 0.45);
}

.to-top {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--gold);
  color: var(--ink);
  border: 1px solid rgba(27, 36, 38, 0.35);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(178, 58, 46, 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s var(--ease), background 0.2s var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #F2C55C; }

/* ============================================================
   FOOTER — 档案袋式分区
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: 72px;
  color: rgba(244, 239, 228, 0.82);
  background-color: var(--ink);
  background-image: linear-gradient(180deg, rgba(31, 111, 139, 0.28) 0%, rgba(11, 58, 74, 0) 55%);
}

.site-footer::before {
  content: "";
  display: block;
  height: 8px;
  background-image: repeating-linear-gradient(90deg, var(--tibet) 0 28px, var(--gold) 28px 56px, var(--turq) 56px 84px, var(--sky) 84px 112px, var(--clay) 112px 140px);
  opacity: 0.85;
}

.footer-frame {
  display: grid;
  grid-template-columns: 1.15fr 2fr 1.25fr;
  gap: 40px;
  padding-top: 52px;
  padding-bottom: 36px;
}

.footer-stamp {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--paper);
}

.footer-line {
  margin: 0 0 14px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(244, 239, 228, 0.72);
}

.footer-note {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--turq);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.75;
  letter-spacing: 0.03em;
  color: rgba(244, 239, 228, 0.5);
}

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

.footer-group-title {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(244, 239, 228, 0.18);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.footer-links {
  display: grid;
  gap: 8px;
  margin: 0;
}

.footer-links a {
  display: inline-block;
  color: rgba(244, 239, 228, 0.82);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer-links a:hover { color: #fff; border-bottom-color: var(--gold); }

.footer-contact-list {
  display: grid;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: rgba(244, 239, 228, 0.8);
  word-break: break-word;
}

.footer-contact-list li {
  display: grid;
  gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(244, 239, 228, 0.14);
}

.footer-key {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--clay);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 18px;
  padding-bottom: 26px;
  border-top: 1px solid rgba(244, 239, 228, 0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(244, 239, 228, 0.55);
}

.footer-legal, .footer-copy { margin: 0; }

.footer-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
}

.footer-mini-links a {
  color: rgba(244, 239, 228, 0.7);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.footer-mini-links a:hover { color: var(--gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 1080px) {
  body { padding-left: var(--rail-w); }
}

@media (max-width: 1079px) {
  :root { --header-h: 56px; }

  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid rgba(244, 239, 228, 0.2);
    background-image: linear-gradient(90deg, rgba(31, 111, 139, 0.6) 0%, rgba(11, 58, 74, 0) 72%);
  }

  .header-frame {
    height: auto;
    min-height: var(--header-h);
    gap: 0;
    padding: 10px 16px;
    overflow: visible;
  }

  .header-frame::after { display: none; }

  .brand-row { align-items: center; width: 100%; }
  .brand-mark { width: 32px; height: 32px; font-size: 17px; box-shadow: 2px 2px 0 rgba(178, 58, 46, 0.9); }
  .brand-name { font-size: 15px; letter-spacing: 0.12em; }
  .brand-sub { font-size: 9px; }

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

  .rail-note { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    padding: 16px 18px 24px;
    overflow-y: auto;
    background: var(--ink);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 26px 44px -26px rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s var(--ease);
  }

  .site-header[data-open] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-link { padding: 11px 12px; }
  .nav-text { font-size: 15px; }
  .nav-quick { margin-top: 10px; }

  .to-top { left: auto; right: 16px; bottom: 16px; }

  .footer-frame {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 38px;
  }

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

@media (max-width: 960px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-6 { grid-column: span 6; }
  .col-7, .col-8, .col-9 { grid-column: span 6; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .grid-12 { grid-template-columns: 1fr; gap: 16px; }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 { grid-column: span 1; }
  .footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .card { padding: 18px; }
}

/* ---------- 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;
  }

  html.js [data-reveal] { opacity: 1; transform: none; }
  html.js [data-grow] .range-bar-fill { transform: none; }
}
