/* ==========================================================================
   亚洲城指南 · 共享样式 /assets/site.css
   骨架：雾凇青灰纸面 + 墨绿控制台 + 琥珀播报点色，锐角、细线、精密网格
   ========================================================================== */

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

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

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

ul, ol { list-style: none; }

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

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

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

table { border-collapse: collapse; width: 100%; }

[hidden] { display: none !important; }

/* ---------- tokens ---------- */
:root {
  --c-frost: #DCE5E3;
  --c-paper: #F5F0E4;
  --c-ink: #211C19;
  --c-forest: #2D4A41;
  --c-steel: #4F6B73;
  --c-amber: #E8752B;
  --c-ember: #D34B2A;
  --c-moss: #3D7A5B;
  --c-line: #B9C9C6;
  --c-deep: #16302C;
  --c-amber-deep: #A4480F;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --w-max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 96px;
  --hair: 1px solid var(--c-line);
  --hair-dark: 1px solid rgba(185, 201, 198, 0.24);
}

/* ---------- base typography ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

h1 { font-size: clamp(48px, 8vw, 112px); line-height: 0.98; }
h2 { font-size: clamp(28px, 4.4vw, 56px); }
h3 { font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -0.01em; }
h4 { font-size: clamp(17px, 1.6vw, 20px); letter-spacing: 0; }

p { text-wrap: pretty; }

strong { font-weight: 800; }

small { font-size: 13px; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
  letter-spacing: 0.04em;
}

hr { border: 0; border-top: var(--hair); margin: 0; }

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

/* ---------- focus ---------- */
:focus-visible {
  outline: 3px solid var(--c-amber);
  outline-offset: 2px;
}

.site-footer :focus-visible {
  outline: 3px solid var(--c-amber);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--c-amber);
  color: #1B1411;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  border: 1px solid #1B1411;
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 10px;
}

/* ---------- layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(40px, 6vw, 84px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 24px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--c-ink);
  margin-bottom: clamp(20px, 3vw, 34px);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.section-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--c-steel);
  text-align: right;
}

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

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

.band-frost { background: var(--c-frost); }
.band-paper { background: var(--c-paper); }
.band-forest { background: var(--c-forest); color: var(--c-paper); }
.band-deep { background: var(--c-deep); color: var(--c-paper); }

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 18px);
}

.rule { border-top: var(--hair); }

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: clamp(14px, 2vw, 26px);
}

.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)); }

/* ---------- actions ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--c-ink);
  background: var(--c-paper);
  border: 1px solid var(--c-ink);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
}

.btn-primary {
  background: var(--c-amber);
  border-color: #1B1411;
  color: #1B1411;
}

.btn-primary:hover {
  background: #1B1411;
  color: var(--c-amber);
}

.btn-forest {
  background: var(--c-forest);
  border-color: var(--c-forest);
  color: var(--c-paper);
}

.btn-forest:hover {
  background: var(--c-deep);
  border-color: var(--c-deep);
}

.btn-line {
  background: transparent;
  border-color: var(--c-steel);
  color: var(--c-forest);
}

.btn-line:hover {
  background: var(--c-frost);
  border-color: var(--c-forest);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14.5px;
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.link-arrow::after {
  content: "→";
  font-family: var(--font-mono);
  color: var(--c-amber);
}

.link-arrow:hover { color: var(--c-amber-deep); }

/* ---------- tags & status ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  line-height: 1.7;
  border: 1px solid var(--c-line);
  background: var(--c-paper);
  color: var(--c-steel);
  white-space: nowrap;
}

.tag-amber {
  border-color: rgba(232, 117, 43, 0.55);
  background: rgba(232, 117, 43, 0.1);
  color: var(--c-amber-deep);
}

.tag-ember {
  border-color: rgba(211, 75, 42, 0.55);
  background: rgba(211, 75, 42, 0.1);
  color: #A03A1E;
}

.tag-moss {
  border-color: rgba(61, 122, 91, 0.5);
  background: rgba(61, 122, 91, 0.1);
  color: #2C5C44;
}

.tag-steel {
  border-color: rgba(79, 107, 115, 0.5);
  background: rgba(79, 107, 115, 0.09);
  color: #3B5359;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  background: var(--c-amber);
  border-radius: 0;
}

.status-dot[data-state="live"] { background: var(--c-moss); }
.status-dot[data-state="alert"] { background: var(--c-ember); }
.status-dot[data-state="idle"] { background: var(--c-steel); }

/* ---------- panels ---------- */
.panel {
  border: var(--hair);
  background: var(--c-paper);
  padding: clamp(16px, 2.4vw, 26px);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: var(--hair);
  margin-bottom: 14px;
}

.panel-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.panel-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--c-steel);
  white-space: nowrap;
}

/* ---------- index rows ---------- */
.index-list {
  display: flex;
  flex-direction: column;
  border-top: var(--hair);
}

.index-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: var(--hair);
  transition: background-color 0.16s ease, padding-left 0.16s ease;
}

.index-row:hover {
  background: var(--c-frost);
  padding-left: 10px;
}

.index-key {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--c-steel);
  white-space: nowrap;
}

.index-val {
  font-weight: 700;
  font-size: 15.5px;
  min-width: 0;
}

.index-num {
  font-family: var(--font-mono);
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: 0.06em;
  color: var(--c-amber-deep);
  font-variant-numeric: tabular-nums;
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
  background: var(--c-frost);
  border-bottom: var(--hair);
}

.crumbs {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: 10px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--c-steel);
}

.crumbs a {
  color: var(--c-steel);
  border-bottom: 1px solid transparent;
}

.crumbs a:hover {
  color: var(--c-amber-deep);
  border-bottom-color: var(--c-amber);
}

.crumb-sep {
  color: var(--c-line);
  font-size: 10px;
}

.crumbs [aria-current="page"] {
  color: var(--c-ink);
  font-weight: 700;
}

/* ---------- prose ---------- */
.prose {
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.85;
}

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  margin-top: 1.8em;
  padding-top: 0.6em;
  border-top: var(--hair);
}

.prose h3 {
  font-size: clamp(18px, 2vw, 23px);
  margin-top: 1.5em;
}

.prose ul {
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
}

.prose ul > li {
  position: relative;
  padding-left: 1.4em;
}

.prose ul > li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--c-amber);
}

.prose a {
  color: var(--c-amber-deep);
  border-bottom: 1px solid rgba(232, 117, 43, 0.5);
}

.prose a:hover { background: rgba(232, 117, 43, 0.12); }

.prose blockquote {
  border-left: 3px solid var(--c-amber);
  padding: 4px 0 4px 18px;
  color: var(--c-steel);
}

/* ---------- image containers (页面阶段放图) ---------- */
.figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.figure-frame {
  position: relative;
  overflow: hidden;
  background: var(--c-frost);
  border: var(--hair);
}

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

.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(33, 28, 25, 0.08);
  pointer-events: none;
}

.figure-frame[data-placeholder]::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(79, 107, 115, 0.16) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(79, 107, 115, 0.16) 0 1px, transparent 1px 32px);
}

.figure-wide .figure-frame { aspect-ratio: 16 / 9; }
.figure-tall .figure-frame { aspect-ratio: 4 / 5; }
.figure-square .figure-frame { aspect-ratio: 1 / 1; }
.figure-banner .figure-frame { aspect-ratio: 21 / 9; }

.figure-caption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--c-steel);
  line-height: 1.6;
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(12px, 2vw, 22px);
}

/* ==========================================================================
   头部：左右分置控制台
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-forest);
}

.header-inner {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: stretch;
  background: var(--c-paper);
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-h);
  padding: 12px clamp(14px, 2vw, 22px);
  background: var(--c-forest);
  color: var(--c-paper);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(245, 240, 228, 0.5);
  background: rgba(245, 240, 228, 0.07);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.02em;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.brand:hover .brand-mark {
  background: var(--c-amber);
  border-color: var(--c-amber);
  color: #1B1411;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-note {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(245, 240, 228, 0.62);
  line-height: 1.4;
}

.header-navzone {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--c-paper);
}

.header-utility {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px clamp(12px, 2vw, 20px);
  background: var(--c-frost);
  border-bottom: var(--hair);
  min-height: 36px;
}

.utility-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: var(--c-moss);
  box-shadow: 0 0 0 3px rgba(61, 122, 91, 0.16);
}

.utility-note {
  margin-right: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--c-steel);
}

.utility-cta {
  padding: 4px 11px;
  background: var(--c-amber);
  color: #1B1411;
  border: 1px solid #1B1411;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.utility-cta:hover {
  background: #1B1411;
  color: var(--c-amber);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(245, 240, 228, 0.55);
  color: var(--c-paper);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.nav-toggle:hover { border-color: var(--c-amber); }

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.16s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease;
}

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

.site-header[data-open="true"] .nav-toggle { border-color: var(--c-amber); }
.site-header[data-open="true"] .nav-toggle-bars { background: transparent; }
.site-header[data-open="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: stretch;
  margin-left: auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 16px clamp(9px, 1.2vw, 16px);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--c-ink);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--c-steel);
  transition: color 0.18s ease;
}

.nav-label { position: relative; z-index: 1; }

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--c-amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.18s ease;
}

.nav-link:hover { background: var(--c-frost); }
.nav-link:hover .nav-index { color: var(--c-amber-deep); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  background: var(--c-frost);
  color: var(--c-forest);
}

.nav-link[aria-current="page"] .nav-index { color: var(--c-amber-deep); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.scroll-meter {
  height: 3px;
  background: var(--c-line);
  overflow: hidden;
}

.scroll-meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--c-amber);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ==========================================================================
   页脚：深青黑广播台 + 右侧归档锚点
   ========================================================================== */
.site-footer {
  background: var(--c-deep);
  color: rgba(245, 240, 228, 0.86);
  border-top: 3px solid var(--c-amber);
  font-size: 15px;
  line-height: 1.75;
}

.footer-top {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(24px, 3vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--c-paper);
}

.footer-brand-note {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--c-amber);
}

.footer-summary {
  margin-top: 16px;
  max-width: 42ch;
  font-size: 14.5px;
  color: rgba(245, 240, 228, 0.7);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 34px);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(245, 240, 228, 0.5);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(185, 201, 198, 0.28);
  margin-bottom: 10px;
}

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

.footer-links a {
  display: block;
  padding: 7px 0;
  font-size: 14.5px;
  color: rgba(245, 240, 228, 0.86);
  border-bottom: 1px solid rgba(185, 201, 198, 0.12);
  transition: color 0.16s ease, padding-left 0.16s ease, border-color 0.16s ease;
}

.footer-links a:hover {
  color: var(--c-amber);
  padding-left: 6px;
  border-bottom-color: rgba(232, 117, 43, 0.5);
}

.footer-archive {
  align-self: start;
  display: flex;
  flex-direction: column;
}

.archive-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 14px;
  background: rgba(245, 240, 228, 0.05);
  border: 1px solid rgba(185, 201, 198, 0.32);
  border-left: 3px solid var(--c-amber);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.archive-card:hover {
  background: rgba(232, 117, 43, 0.14);
  border-color: var(--c-amber);
}

.archive-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(245, 240, 228, 0.55);
}

.archive-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.3;
  color: var(--c-paper);
}

.archive-arrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--c-amber);
}

.footer-meta {
  border-top: 1px solid rgba(185, 201, 198, 0.22);
}

.footer-meta-inner {
  max-width: var(--w-max);
  margin-inline: auto;
  padding: clamp(16px, 2.4vw, 26px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px 36px;
  align-items: start;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 13.5px;
}

.contact-line {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  color: rgba(245, 240, 228, 0.82);
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(245, 240, 228, 0.45);
}

.contact-value {
  word-break: break-word;
}

.contact-note {
  flex: 1 1 100%;
  max-width: 58ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(245, 240, 228, 0.55);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 18px;
  font-size: 13px;
}

.legal-link {
  color: rgba(245, 240, 228, 0.82);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.legal-link:hover {
  color: var(--c-amber);
  border-bottom-color: var(--c-amber);
}

.footer-icp,
.footer-copy {
  width: 100%;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(245, 240, 228, 0.5);
}

/* ==========================================================================
   逐条点亮（JS 就绪后才隐藏，保证无脚本可读）
   ========================================================================== */
.reveal-ok [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.reveal-ok [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-link { font-size: 13.5px; padding: 15px 9px; }
  .nav-index { display: none; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }

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

  .header-brand {
    min-height: var(--header-h);
    padding: 10px var(--gutter);
    border-bottom: 1px solid rgba(185, 201, 198, 0.3);
  }

  .brand-name { font-size: 19px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; font-size: 18px; }

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

  .header-navzone { background: var(--c-paper); }

  .header-utility {
    padding: 6px var(--gutter);
    gap: 10px;
  }

  .utility-dot { display: none; }
  .utility-note { font-size: 10.5px; letter-spacing: 0.04em; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: block;
    margin-left: 0;
    background: var(--c-deep);
    border-bottom: 1px solid var(--c-forest);
    max-height: calc(100vh - var(--header-h) - 36px);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .site-header[data-open="true"] .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .nav-item { border-bottom: 1px solid rgba(185, 201, 198, 0.16); }

  .nav-link {
    width: 100%;
    padding: 15px var(--gutter);
    font-size: 16px;
    color: var(--c-paper);
  }

  .nav-index {
    display: inline;
    font-size: 11px;
    color: rgba(245, 240, 228, 0.45);
  }

  .nav-link::after {
    left: 0;
    right: auto;
    bottom: 0;
    top: 0;
    width: 3px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: 50% 0;
  }

  .nav-link:hover {
    background: rgba(245, 240, 228, 0.07);
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    transform: scaleY(1);
  }

  .nav-link[aria-current="page"] {
    background: rgba(232, 117, 43, 0.16);
    color: var(--c-amber);
  }

  .nav-link[aria-current="page"] .nav-index { color: var(--c-amber); }

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

  .footer-archive {
    grid-column: 1 / -1;
  }

  .archive-card { max-width: 420px; }

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

  .footer-legal { justify-content: flex-start; }
  .footer-icp,
  .footer-copy { text-align: left; }
}

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

  .section-head { grid-template-columns: minmax(0, 1fr); }
  .section-note { text-align: left; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

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

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 30px;
  }

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

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

  .index-key { grid-column: 1 / -1; }

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

  .btn { width: 100%; justify-content: space-between; }
}

/* ==========================================================================
   动效降级
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-ok [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .index-row:hover { padding-left: 0; }
  .footer-links a:hover { padding-left: 0; }
  .nav-link::after { transition: none; }
}
