/* ============================================================
   加拿大28服 — /assets/site.css
   共享外壳：reset · tokens · 双层头部 · 页脚 · 通用组件
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

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

/* ---------- 2. tokens ---------- */
:root {
  --ink-950: #061019;
  --ink-900: #0A1A2B;
  --ink-800: #0E2237;
  --ink-700: #16324A;
  --aurora: #4FE3D0;
  --aurora-soft: #A8F2E7;
  --paper: #F4EEE3;
  --paper-line: #E3DACB;
  --maple: #D9443B;
  --gold: #E9B54A;
  --graphite: #101820;
  --slate: #7C8FA3;
  --frost: #FBFDFC;

  --font-display: "Sora", "Inter Tight", "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-body: "Source Han Sans SC", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-22: 1.375rem;
  --fs-28: 1.75rem;
  --fs-40: 2.5rem;
  --fs-64: 4rem;
  --fs-96: 6rem;

  --shell-max: 1240px;
  --gutter: clamp(18px, 4.2vw, 56px);
  --nav-h: 72px;
  --nav-h-stuck: 56px;
  --radius: 6px;
  --radius-sm: 4px;
  --border-w: 1.5px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --t-fast: 160ms;
  --t-base: 260ms;
  --t-slow: 320ms;
}

/* 皮肤：默认深色（深空蓝墨 / 极光） */
html {
  --surface: var(--ink-900);
  --surface-deep: var(--ink-950);
  --surface-raise: var(--ink-800);
  --on-surface: var(--frost);
  --on-muted: #9FB2C4;
  --hairline: rgba(79, 227, 208, .24);
  --hairline-soft: rgba(168, 242, 231, .14);
  --card-edge: rgba(168, 242, 231, .3);
  --shadow-hard: 6px 6px 0 rgba(3, 10, 18, .62);
  --link: var(--aurora);
  --link-hover: var(--aurora-soft);
  color-scheme: dark;
}

html[data-skin="light"] {
  --surface: var(--paper);
  --surface-deep: var(--paper-line);
  --surface-raise: #FFFCF6;
  --on-surface: var(--graphite);
  --on-muted: #5C6E80;
  --hairline: rgba(16, 24, 32, .14);
  --hairline-soft: rgba(16, 24, 32, .08);
  --card-edge: rgba(16, 24, 32, .26);
  --shadow-hard: 6px 6px 0 rgba(16, 24, 32, .13);
  --link: #0B6B60;
  --link-hover: #0A4F47;
  color-scheme: light;
}

/* ---------- 3. base & 中文排版 ---------- */
body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
}
h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.6rem); }
strong { font-weight: 700; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

:focus-visible {
  outline: 2px solid var(--aurora);
  outline-offset: 3px;
  border-radius: 2px;
}
html[data-skin="light"] :focus-visible { outline-color: #0B6B60; }

/* ---------- 4. 跳至主内容 ---------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  padding: 12px 22px;
  background: var(--aurora);
  color: var(--ink-950);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-14);
  letter-spacing: .06em;
  border-radius: 0 0 var(--radius) 0;
  transform: translateY(-130%);
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 头部 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--ink-900);
  color: var(--frost);
  border-bottom: var(--border-w) solid rgba(79, 227, 208, .3);
  isolation: isolate;
}
.site-header.is-stuck {
  box-shadow: 0 22px 48px -30px rgba(0, 0, 0, .95);
}

.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1.5px;
  height: 3px;
  background: rgba(168, 242, 231, .13);
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}
.progress-rail__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--aurora) 0%, var(--aurora-soft) 42%, var(--gold) 76%, var(--maple) 100%);
  will-change: transform;
}

/* --- 5.1 品牌说明层 --- */
.header-top {
  position: relative;
  overflow: hidden;
  max-height: 380px;
  background:
    radial-gradient(130% 200% at 8% -30%, rgba(79, 227, 208, .2), transparent 62%),
    radial-gradient(90% 160% at 92% 130%, rgba(233, 181, 74, .13), transparent 60%),
    var(--ink-900);
  transition: max-height var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
}
.site-header.is-stuck .header-top {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.header-top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 40px);
  padding-block: 20px 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: var(--border-w) solid var(--aurora);
  border-radius: var(--radius-sm);
  background: rgba(79, 227, 208, .1);
  color: var(--aurora);
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 3px 3px 0 rgba(79, 227, 208, .22);
}
.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-22);
  line-height: 1.2;
  letter-spacing: .05em;
  color: var(--frost);
  white-space: nowrap;
}
.brand__line {
  font-size: var(--fs-12);
  line-height: 1.5;
  letter-spacing: .08em;
  color: #9FB2C4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: var(--border-w) solid rgba(168, 242, 231, .32);
  border-radius: var(--radius-sm);
  background: rgba(6, 16, 25, .42);
  color: var(--frost);
  font-size: var(--fs-14);
  letter-spacing: .06em;
  transition: border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.tool:hover,
.tool:focus-visible {
  border-color: var(--aurora);
  background: rgba(79, 227, 208, .14);
  color: var(--aurora-soft);
}
.tool__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aurora);
  box-shadow: 0 0 0 3px rgba(79, 227, 208, .18);
}
.tool[aria-expanded="true"] {
  border-color: var(--aurora);
  background: rgba(79, 227, 208, .18);
  color: var(--aurora-soft);
}
.tool[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold);
}
.tool[aria-disabled="true"] {
  opacity: .45;
  cursor: default;
}

/* --- 5.2 档案索引面板 --- */
.index-panel {
  border-top: var(--border-w) dashed rgba(168, 242, 231, .22);
  background: var(--ink-950);
}
.index-panel[hidden] { display: none; }
.index-panel__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px clamp(18px, 3vw, 44px);
  padding-block: 18px 22px;
}
.index-panel__label {
  padding-top: 5px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .16em;
  color: var(--aurora);
  white-space: nowrap;
}
.index-panel__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.index-panel__list a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(168, 242, 231, .2);
  border-radius: 999px;
  font-size: var(--fs-14);
  color: #C9DBE8;
  transition: border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.index-panel__list a:hover,
.index-panel__list a:focus-visible {
  border-color: var(--aurora);
  background: rgba(79, 227, 208, .1);
  color: var(--aurora);
}

/* --- 5.3 栏目层 --- */
.header-nav {
  position: relative;
  background: rgba(6, 16, 25, .9);
  border-top: var(--border-w) solid rgba(79, 227, 208, .16);
}
.header-nav__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
  min-height: var(--nav-h);
  transition: min-height var(--t-base) var(--ease);
}
.site-header.is-stuck .header-nav__inner { min-height: var(--nav-h-stuck); }

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}
.site-nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(2px, 1.2vw, 10px);
}
.site-nav__list a {
  position: relative;
  display: inline-block;
  padding: 9px 13px;
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 600;
  letter-spacing: .05em;
  color: #C9DBE8;
  transition: color var(--t-fast) var(--ease);
}
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  background: var(--aurora);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-fast) var(--ease);
}
.site-nav__list a:hover { color: var(--aurora-soft); }
.site-nav__list a:hover::after { transform: scaleX(1); }
.site-nav__list a[aria-current="page"] { color: var(--aurora); }
.site-nav__list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--gold);
}

.nav-cta {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--aurora);
  color: var(--ink-950);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-14);
  letter-spacing: .06em;
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 rgba(233, 181, 74, .55);
  transition: background-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--gold);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(79, 227, 208, .55);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: var(--border-w) solid rgba(168, 242, 231, .32);
  border-radius: var(--radius-sm);
  color: var(--frost);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-14);
  letter-spacing: .08em;
}
.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 18px;
}
.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: var(--aurora);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle__text { line-height: 1; }

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 120px);
  background: var(--ink-950);
  color: #C9DBE8;
  border-top: var(--border-w) solid rgba(79, 227, 208, .3);
  overflow: hidden;
}
.footer-aurora {
  position: absolute;
  top: -140px;
  left: -20%;
  right: -20%;
  height: 300px;
  background: linear-gradient(100deg,
    transparent 6%,
    rgba(79, 227, 208, .22) 34%,
    rgba(168, 242, 231, .08) 52%,
    transparent 74%);
  filter: blur(28px);
  pointer-events: none;
  animation: aurora-drift 14s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { transform: translate3d(-3%, 0, 0) skewX(-6deg); }
  to   { transform: translate3d(4%, 0, 0) skewX(4deg); }
}

.footer-top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(200px, 1.05fr) minmax(0, 1.85fr) minmax(240px, 1.25fr);
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px) clamp(26px, 3vw, 40px);
}

.footer-brand { min-width: 0; }
.footer-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border: var(--border-w) solid var(--aurora);
  border-radius: var(--radius-sm);
  color: var(--aurora);
  font-family: var(--font-mono);
  font-size: var(--fs-16);
  font-weight: 700;
  box-shadow: 3px 3px 0 rgba(79, 227, 208, .25);
}
.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-22);
  letter-spacing: .05em;
  color: var(--frost);
}
.footer-brand__line {
  margin-top: 6px;
  font-size: var(--fs-14);
  letter-spacing: .04em;
  color: #8FA6BA;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.footer-col { min-width: 0; }
.footer-col__title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(79, 227, 208, .22);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--aurora);
}
.footer-col ul {
  display: grid;
  gap: 10px;
}
.footer-col a {
  display: inline-block;
  font-size: var(--fs-16);
  color: #C9DBE8;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--aurora);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}
.copy-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: var(--fs-14);
  color: #C9DBE8;
}
.copy-line__key {
  flex: none;
  width: 40px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .1em;
  color: #8FA6BA;
}
.copy-line__val {
  font-family: var(--font-mono);
  font-size: var(--fs-14);
  color: var(--aurora-soft);
  word-break: break-all;
}
.copy-btn {
  padding: 4px 10px;
  border: 1px solid rgba(168, 242, 231, .28);
  border-radius: 999px;
  font-size: var(--fs-12);
  letter-spacing: .08em;
  color: #C9DBE8;
  transition: border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.copy-btn:hover,
.copy-btn:focus-visible {
  border-color: var(--aurora);
  background: rgba(79, 227, 208, .12);
  color: var(--aurora);
}
.copy-btn.is-done {
  border-color: var(--gold);
  color: var(--gold);
}
.footer-address {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed rgba(168, 242, 231, .18);
  font-size: var(--fs-14);
  line-height: 1.7;
  color: #8FA6BA;
}

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 20px 26px;
  border-top: 1px solid rgba(79, 227, 208, .18);
}
.footer-legal,
.footer-year {
  font-size: var(--fs-12);
  letter-spacing: .06em;
  color: #7C8FA3;
}
.footer-year { font-family: var(--font-mono); }

/* ---------- 7. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border: var(--border-w) solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-16);
  letter-spacing: .05em;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.btn--primary {
  background: var(--aurora);
  color: var(--ink-950);
  box-shadow: 5px 5px 0 rgba(233, 181, 74, .6);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--aurora-soft);
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(233, 181, 74, .6);
}
.btn--ghost {
  border-color: var(--card-edge);
  color: inherit;
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--aurora);
  background: rgba(79, 227, 208, .1);
  color: var(--link);
}
.btn--accent {
  background: var(--maple);
  color: #FFFFFF;
  box-shadow: 5px 5px 0 rgba(10, 26, 43, .5);
}
.btn--accent:hover,
.btn--accent:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 rgba(10, 26, 43, .5);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-14);
  letter-spacing: .04em;
  color: var(--on-muted);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--aurora);
  opacity: .65;
}
.breadcrumb a:hover { color: var(--link); }
.breadcrumb [aria-current="page"] { color: var(--on-surface); }

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--aurora); }
.prose a {
  color: var(--link);
  border-bottom: 1px solid var(--hairline);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.prose a:hover {
  color: var(--link-hover);
  border-bottom-color: currentColor;
}

.grid {
  display: grid;
  gap: clamp(18px, 2.4vw, 32px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.chapter-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .2em;
  color: var(--aurora);
}
.chapter-mark::before {
  content: "";
  width: 34px;
  height: 1.5px;
  background: var(--aurora);
}

.light-band {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  border: 0;
  overflow: hidden;
  background: var(--hairline-soft);
}
.light-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--aurora), var(--aurora-soft), var(--gold), transparent);
  transform: translateX(-100%);
  animation: band-slide 9s linear infinite;
}
@keyframes band-slide {
  to { transform: translateX(100%); }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0;
  border-top: var(--border-w) solid var(--hairline);
  border-bottom: var(--border-w) solid var(--hairline);
}
.filter-chip {
  padding: 8px 16px;
  border: var(--border-w) solid var(--card-edge);
  border-radius: 999px;
  font-size: var(--fs-14);
  letter-spacing: .04em;
  color: inherit;
  transition: border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
}
.filter-chip:hover { border-color: var(--aurora); color: var(--link); }
.filter-chip[aria-pressed="true"] {
  border-color: var(--aurora);
  background: var(--aurora);
  color: var(--ink-950);
  font-weight: 600;
}

/* 图片容器基础规则（页面阶段放图） */
.figure {
  position: relative;
  display: block;
  overflow: hidden;
  border: var(--border-w) solid var(--card-edge);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(79, 227, 208, .14), rgba(6, 16, 25, .7) 62%);
  box-shadow: var(--shadow-hard);
}
.figure > img,
.figure > picture > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(.9) contrast(1.03);
}
.figure--wide > img,
.figure--wide > picture > img { aspect-ratio: 21 / 9; }
.figure--tall > img,
.figure--tall > picture > img { aspect-ratio: 4 / 5; }
.figure--square > img,
.figure--square > picture > img { aspect-ratio: 1 / 1; }

.figure__ph {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 18px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .18em;
  color: var(--on-muted);
  background:
    repeating-linear-gradient(135deg, rgba(79, 227, 208, .09) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, var(--ink-800), var(--ink-950));
}
.figure__caption {
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  background: var(--surface-deep);
  font-size: var(--fs-14);
  color: var(--on-muted);
}
.figure__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border: 1px solid rgba(79, 227, 208, .4);
  border-radius: 2px;
  background: rgba(6, 16, 25, .78);
  color: var(--aurora);
  font-family: var(--font-mono);
  font-size: var(--fs-12);
  letter-spacing: .12em;
}

/* 进入视口显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 36px);
  bottom: clamp(16px, 3vw, 36px);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: var(--border-w) solid var(--aurora);
  border-radius: var(--radius-sm);
  background: var(--ink-900);
  color: var(--aurora);
  font-size: var(--fs-18);
  line-height: 1;
  box-shadow: 4px 4px 0 rgba(79, 227, 208, .3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              visibility var(--t-base) linear,
              background-color var(--t-fast) var(--ease);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover,
.to-top:focus-visible {
  background: var(--aurora);
  color: var(--ink-950);
}

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

@media (max-width: 1000px) {
  html { scroll-padding-top: 96px; }

  .header-top__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-block: 16px;
  }
  .header-tools { justify-content: flex-start; }
  .brand__line { white-space: normal; }

  .index-panel__inner { grid-template-columns: 1fr; }

  .header-nav__inner { justify-content: space-between; gap: 12px; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { margin-left: 0; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: none;
    visibility: visible;
    overflow: hidden;
    background: var(--ink-950);
    border-top: var(--border-w) solid rgba(79, 227, 208, .24);
    border-bottom: var(--border-w) solid rgba(79, 227, 208, .34);
    box-shadow: 0 34px 60px -34px rgba(0, 0, 0, .95);
  }
  html.js-ready .site-nav {
    max-height: 0;
    visibility: hidden;
    transition: max-height var(--t-base) var(--ease), visibility var(--t-base) linear;
  }
  html.js-ready .site-nav[data-open] {
    max-height: 440px;
    visibility: visible;
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 6px var(--gutter);
  }
  .site-nav__list a {
    display: block;
    padding: 14px 0;
    font-size: var(--fs-18);
    border-bottom: 1px solid rgba(168, 242, 231, .12);
  }
  .site-nav__list li:last-child a { border-bottom: 0; }
  .site-nav__list a::after {
    left: 0;
    right: auto;
    width: 26px;
    bottom: 9px;
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 62px; }
  .brand__mark { width: 38px; height: 38px; }
  .brand__name { font-size: var(--fs-18); }
  .nav-cta { display: none; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .copy-line__key { width: auto; }
}

@media (max-width: 400px) {
  .tool { padding: 8px 12px; font-size: var(--fs-12); }
  .footer-cols { grid-template-columns: 1fr; }
}

/* ---------- 9. 无障碍与动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .light-band::after {
    animation: none !important;
    transform: translateX(0);
    opacity: .8;
  }
  .footer-aurora {
    animation: none !important;
    transform: none;
  }
}
