/* =========================================================
   百家利会员站 · 共享样式表  /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, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dt, dd, hr { 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; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid rgba(243, 237, 227, 0.14); }

/* ---------- 2. Tokens ---------- */
:root {
  --ink-900: #101719;
  --ink-800: #1E2A2E;
  --ink-700: #26363B;
  --glass: #2E4247;
  --sand: #D8A24A;
  --sand-soft: rgba(216, 162, 74, 0.12);
  --coral: #E86A4A;
  --lake: #3E8E9E;
  --indigo: #4B3F72;
  --wine: #7A2E3A;
  --paper: #F3EDE3;
  --stone: #A9B0AD;
  --green: #6F9A72;

  --line-soft: rgba(243, 237, 227, 0.14);
  --line-faint: rgba(243, 237, 227, 0.07);
  --line-strong: rgba(216, 162, 74, 0.42);

  --font-display: "HarmonyOS Sans SC Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Consolas, "Courier New", monospace;

  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-48: 3rem;
  --fs-72: 4.5rem;
  --fs-120: 7.5rem;

  --radius-s: 2px;
  --radius-m: 4px;
  --wrap: 1200px;
  --pad-x: clamp(16px, 4vw, 40px);
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. Base typography ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-800);
  background-image:
    radial-gradient(circle at 12% 6%, rgba(216, 162, 74, 0.10), transparent 46%),
    radial-gradient(circle at 88% 0%, rgba(62, 142, 158, 0.12), transparent 44%),
    repeating-linear-gradient(90deg, rgba(243, 237, 227, 0.035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(243, 237, 227, 0.035) 0 1px, transparent 1px 96px);
  background-attachment: fixed, fixed, scroll, scroll;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); }
h4 { font-size: var(--fs-18); }

strong { font-weight: 600; color: var(--paper); }
::selection { background: var(--sand); color: var(--ink-900); }

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

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

/* ---------- 4. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--8-4 { grid-template-columns: 8fr 4fr; }

.prose {
  max-width: 68ch;
  font-size: var(--fs-16);
  line-height: 1.75;
  color: rgba(243, 237, 227, 0.9);
}
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { margin-top: 1.8em; color: var(--paper); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.4em; }
.prose a {
  color: var(--lake);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--sand); }

/* ---------- 5. Buttons / tags / notes ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-m);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
              color 0.2s var(--ease), transform 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--coral); color: #1B0E0A; border-color: var(--coral); }
.btn--primary:hover { background: #F0805F; border-color: #F0805F; }
.btn--sand { background: var(--sand); color: var(--ink-900); border-color: var(--sand); }
.btn--sand:hover { background: #E6B463; border-color: #E6B463; }
.btn--ghost { background: transparent; color: var(--paper); border-color: rgba(216, 162, 74, 0.45); }
.btn--ghost:hover { background: var(--sand-soft); border-color: var(--sand); }
.btn--block { width: 100%; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  line-height: 1.8;
  white-space: nowrap;
}
.tag--lake { color: var(--lake); }
.tag--sand { color: var(--sand); }
.tag--coral { color: var(--coral); }
.tag--green { color: var(--green); }

.note {
  position: relative;
  padding: 14px 18px 14px 20px;
  background: rgba(216, 162, 74, 0.1);
  border-left: 3px solid var(--sand);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  font-size: var(--fs-14);
  line-height: 1.7;
  color: rgba(243, 237, 227, 0.92);
}
.note--warn { background: rgba(122, 46, 58, 0.32); border-left-color: var(--coral); }
.note--info { background: rgba(62, 142, 158, 0.16); border-left-color: var(--lake); }

.panel {
  position: relative;
  background: var(--paper);
  color: #1A2426;
  border-radius: var(--radius-m);
  padding: clamp(20px, 3vw, 34px);
}
.panel a { color: #2C6C7A; text-decoration: underline; text-underline-offset: 3px; }
.panel--glass {
  background: rgba(46, 66, 71, 0.62);
  color: var(--paper);
  border: 1px solid var(--line-soft);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.panel--glass a { color: var(--lake); }

.card {
  position: relative;
  background: rgba(46, 66, 71, 0.5);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  padding: clamp(18px, 2.4vw, 28px);
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease),
              transform 0.22s var(--ease);
}
.card:hover { border-color: rgba(216, 162, 74, 0.5); background: rgba(46, 66, 71, 0.72); }

/* ---------- 6. Steps / breadcrumb ---------- */
.step {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 4px 16px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid var(--line-faint);
}
.step__num {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--sand);
  padding-top: 2px;
}
.step__body { font-size: var(--fs-16); line-height: 1.7; color: rgba(243, 237, 227, 0.9); }
.step__body strong { color: var(--paper); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--stone);
}
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb__item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: rgba(216, 162, 74, 0.65);
}
.breadcrumb__link { color: var(--stone); transition: color 0.18s var(--ease); }
.breadcrumb__link:hover { color: var(--sand); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* ---------- 7. Media placeholders ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  background-color: var(--ink-700);
  background-image:
    repeating-linear-gradient(135deg, rgba(243, 237, 227, 0.05) 0 2px, transparent 2px 12px),
    radial-gradient(circle at 72% 24%, rgba(216, 162, 74, 0.32), transparent 52%),
    linear-gradient(150deg, rgba(62, 142, 158, 0.38), rgba(30, 42, 46, 0.92) 62%, rgba(16, 23, 25, 0.96));
}
.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--wide { aspect-ratio: 21 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--portrait { aspect-ratio: 4 / 5; }
.media__caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  font-size: var(--fs-12);
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: rgba(243, 237, 227, 0.86);
  background: linear-gradient(0deg, rgba(16, 23, 25, 0.92), rgba(16, 23, 25, 0));
}

/* ---------- 8. Header ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 220;
  display: inline-block;
  padding: 10px 18px;
  background: var(--sand);
  color: var(--ink-900);
  font-weight: 700;
  font-size: var(--fs-14);
  letter-spacing: 0.06em;
  border-radius: var(--radius-m);
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(16, 23, 25, 0.99) 0%, rgba(16, 23, 25, 0.94) 68%, rgba(16, 23, 25, 0.86) 100%);
  border-bottom: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--paper);
}

.command-bar { position: relative; }

.command-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 12px var(--pad-x);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
}
.brand__mark {
  position: relative;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--sand);
  transform: rotate(45deg);
  transition: transform 0.34s var(--ease), border-color 0.24s var(--ease);
}
.brand__mark::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--coral);
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px dashed rgba(216, 162, 74, 0.34);
}
.brand:hover .brand__mark { transform: rotate(135deg); border-color: var(--coral); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  color: var(--paper);
}
.brand__line {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--stone);
}

.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 1.5vw, 22px);
}
.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(243, 237, 227, 0.8);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s var(--ease);
}
.site-nav__link:hover,
.site-nav__link:focus-visible { color: var(--paper); }
.site-nav__link:hover::after,
.site-nav__link:focus-visible::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] { color: var(--sand); font-weight: 700; }
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); background: var(--coral); }

.command-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 232px;
  min-width: 150px;
  padding: 6px 10px;
  border: 1px solid rgba(169, 176, 173, 0.32);
  border-radius: var(--radius-m);
  background: rgba(46, 66, 71, 0.55);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.command-search:focus-within { border-color: var(--lake); background: rgba(46, 66, 71, 0.88); }
.command-search__label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  color: var(--sand);
}
.command-search__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
  background: transparent;
  border: 0;
  outline: none;
  font-size: var(--fs-14);
  color: var(--paper);
}
.command-search__input::placeholder { color: rgba(169, 176, 173, 0.78); }

.command-bar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.index-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(216, 162, 74, 0.4);
  border-radius: var(--radius-m);
  background: rgba(216, 162, 74, 0.08);
  color: var(--paper);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.index-toggle:hover,
.nav-toggle:hover { background: rgba(216, 162, 74, 0.2); border-color: var(--sand); }
.index-toggle[aria-expanded="true"] {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--ink-900);
}

.nav-toggle { display: none; }
.nav-toggle__bars {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease);
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }
.nav-toggle__text { font-size: var(--fs-14); }

.command-bar__status {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 0 var(--pad-x) 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: var(--stone);
}
.command-bar__status:empty { display: none; }

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--sand), var(--coral));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- 9. Index drawer ---------- */
.index-scrim {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  z-index: 75;
  background: rgba(16, 23, 25, 0.68);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}
.index-scrim[data-open] {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s var(--ease), visibility 0s;
}

.index-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(340px, 90vw);
  height: 100vh;
  height: 100dvh;
  padding: 18px 0 26px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 8%, rgba(216, 162, 74, 0.16), transparent 48%),
    linear-gradient(165deg, #26383E 0%, #1A2629 46%, #101719 100%);
  border-right: 1px solid var(--line-strong);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.52);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.index-drawer[data-open] {
  transform: none;
  visibility: visible;
  transition: transform 0.3s var(--ease), visibility 0s;
}

.index-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.index-drawer__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-18);
  letter-spacing: 0.12em;
  color: var(--paper);
}
.index-drawer__close {
  padding: 4px 10px;
  border: 1px solid rgba(216, 162, 74, 0.42);
  border-radius: var(--radius-m);
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  color: var(--sand);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.index-drawer__close:hover { background: var(--sand); color: var(--ink-900); }

.index-list { padding: 8px 0; }
.index-list__item { border-bottom: 1px solid var(--line-faint); }
.index-list__link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(243, 237, 227, 0.86);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), padding-left 0.2s var(--ease);
}
.index-list__link:hover,
.index-list__link:focus-visible {
  background: rgba(216, 162, 74, 0.12);
  color: var(--paper);
  padding-left: 26px;
}
.index-list__link[aria-current="page"] {
  background: rgba(216, 162, 74, 0.1);
  color: var(--sand);
}
.index-list__num {
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.1em;
  color: var(--sand);
}
.index-list__label { font-size: var(--fs-14); line-height: 1.5; }

.index-drawer__foot {
  margin-top: auto;
  padding: 16px 20px 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--stone);
  border-top: 1px dashed rgba(216, 162, 74, 0.24);
}

/* ---------- 10. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(circle at 88% 8%, rgba(75, 63, 114, 0.5), transparent 56%),
    radial-gradient(circle at 4% 92%, rgba(62, 142, 158, 0.2), transparent 52%);
  border-top: 1px solid var(--line-strong);
  color: var(--paper);
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(243, 237, 227, 0.045) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, rgba(243, 237, 227, 0.045) 0 1px, transparent 1px 88px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 74%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 74%);
}
.site-footer::after {
  content: "38°N";
  position: absolute;
  right: clamp(8px, 3vw, 40px);
  bottom: -0.16em;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 12rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(216, 162, 74, 0.055);
  pointer-events: none;
}
.site-footer__inner {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--pad-x) 26px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(0, 1.5fr);
  gap: clamp(28px, 5vw, 64px);
}

.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.brand--footer .brand__mark { width: 38px; height: 38px; }
.brand--footer .brand__name { font-size: clamp(1.15rem, 2vw, 1.4rem); }
.brand--footer .brand__line { letter-spacing: 0.24em; }

.footer-brand__tagline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--paper);
  max-width: 12ch;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--sand);
  align-self: flex-start;
}
.footer-brand__meta {
  font-size: var(--fs-14);
  line-height: 1.75;
  color: var(--stone);
  max-width: 30ch;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
}
.footer-col__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--sand);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-faint);
}
.footer-col__item + .footer-col__item { margin-top: 8px; }
.footer-col__link {
  display: inline-block;
  font-size: var(--fs-14);
  line-height: 1.6;
  color: rgba(243, 237, 227, 0.8);
  transition: color 0.18s var(--ease), transform 0.18s var(--ease);
}
.footer-col__link:hover {
  color: var(--sand);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  gap: 16px;
  margin-top: clamp(30px, 4.5vw, 52px);
  padding-top: clamp(22px, 3vw, 34px);
  border-top: 1px dashed rgba(216, 162, 74, 0.28);
}
.footer-contact__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 28px;
}
.footer-contact__key {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  color: var(--stone);
}
.footer-contact__val {
  margin-top: 3px;
  font-size: var(--fs-14);
  line-height: 1.6;
  color: var(--paper);
  overflow-wrap: anywhere;
}
.footer-contact__note {
  font-size: var(--fs-12);
  line-height: 1.7;
  color: var(--stone);
  max-width: 72ch;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(24px, 3.5vw, 40px);
  padding-top: 18px;
  border-top: 1px solid var(--line-faint);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: 0.08em;
  color: var(--stone);
}
.site-footer__copy { color: var(--stone); }
.site-footer__icp { color: var(--stone); }

/* ---------- 11. Back to top ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: rgba(16, 23, 25, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--paper);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
              visibility 0s linear 0.24s, border-color 0.2s var(--ease);
}
.to-top:hover { border-color: var(--sand); }
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
              visibility 0s, border-color 0.2s var(--ease);
}
.to-top__icon { font-family: var(--font-mono); font-size: var(--fs-14); color: var(--sand); }

/* ---------- 12. Filtering protocol ---------- */
.is-filtered-out { display: none !important; }

/* ---------- 13. Responsive ---------- */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 58;
    display: none;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 6px var(--pad-x) 22px;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  }
  .site-nav[data-open] { display: block; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__link {
    display: block;
    padding: 14px 0;
    font-size: var(--fs-18);
    border-bottom: 1px solid var(--line-faint);
    white-space: normal;
  }
  .site-nav__link::after { display: none; }
  .site-nav__link[aria-current="page"] {
    padding-left: 14px;
    border-left: 3px solid var(--coral);
    color: var(--sand);
  }
}

@media (max-width: 900px) {
  .grid--2, .grid--3, .grid--7-5, .grid--8-4 { grid-template-columns: minmax(0, 1fr); }
  .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .command-search { order: 3; flex: 1 1 100%; min-width: 0; }
  .brand__line { display: none; }
  .brand__name { font-size: 1rem; }
  .command-bar__tools { margin-left: auto; }
  .index-toggle, .nav-toggle { padding: 0 10px; font-size: var(--fs-12); }
  .step { grid-template-columns: 2.75rem minmax(0, 1fr); gap: 2px 12px; }
}

@media (max-width: 520px) {
  :root { --header-h: 68px; }
  .brand__mark { width: 26px; height: 26px; }
  .brand__mark::before { width: 9px; height: 9px; }
  .footer-nav { grid-template-columns: minmax(0, 1fr); }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
  .to-top__text { display: none; }
  .to-top { padding: 12px; }
}

/* ---------- 14. 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;
  }
  .brand:hover .brand__mark { transform: rotate(45deg); }
  .footer-col__link:hover { transform: none; }
  .index-list__link:hover, .index-list__link:focus-visible { padding-left: 20px; }
}
