/* ==========================================================================
   江南平台 V2.0 · 共享样式 /assets/site.css
   墨黛仪表带 + 水青数据层 + 红黄信号
   ========================================================================== */

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

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

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

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

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

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

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

/* ---------- Variables ---------- */
:root {
  --ink: #152329;
  --ink-deep: #0D171B;
  --teal: #245B5A;
  --aqua: #3F8C86;
  --aqua-soft: #A9D3CE;
  --paper: #F5F8F6;
  --paper-2: #E4EAE5;
  --red: #D9453D;
  --amber: #F2B234;
  --green: #2E8B6F;

  --text: #22333A;
  --text-soft: #4a5b61;

  --line: rgba(21, 35, 41, .14);
  --line-soft: rgba(21, 35, 41, .08);
  --line-invert: rgba(245, 248, 246, .16);
  --glass-dark: rgba(13, 23, 27, .78);

  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --shell: 1240px;
  --gutter: clamp(1.1rem, 4vw, 2.75rem);
  --radius: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-card: 0 14px 34px rgba(13, 23, 27, .08);
}

/* ---------- Base typography ---------- */
body {
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(90deg, rgba(21, 35, 41, .035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(21, 35, 41, .022) 0 1px, transparent 1px 96px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.01em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.02;
}

h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 1.7vw, 1.5rem); }
h4 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }

p { max-width: 44em; }

strong, b { font-weight: 600; color: var(--ink); }

::selection { background: var(--amber); color: var(--ink); }

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

#main-content { display: block; scroll-margin-top: 8rem; }

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

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -120%;
  z-index: 120;
  padding: .6rem 1rem;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: 2px;
  transition: top .18s var(--ease);
}

.skip-link:focus { top: .6rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .68rem 1.15rem;
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}

.btn--signal {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn--signal:hover { background: #c33a33; border-color: #c33a33; }

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

.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: var(--teal);
}
.btn--ghost:hover { background: rgba(63, 140, 134, .12); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--glass-dark);
  color: var(--paper);
  border-bottom: 1px solid rgba(245, 248, 246, .12);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background-color .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}

.site-header[data-scrolled="true"] {
  background: var(--ink);
  border-bottom-color: rgba(169, 211, 206, .3);
  box-shadow: 0 14px 34px rgba(13, 23, 27, .3);
}

/* 阅读进度轨 */
.progress-rail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(245, 248, 246, .12);
  pointer-events: none;
}

.progress-rail__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--aqua) 0%, var(--aqua-soft) 55%, var(--amber) 100%);
  transition: transform .12s linear;
}

/* 仪表细带 */
.header-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .38rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  color: rgba(245, 248, 246, .68);
}

.header-rail__status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  max-width: none;
}

.header-rail__note { max-width: none; }

/* 主带 */
.header-main {
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 1.6vw, 1.4rem);
  padding-block: .65rem;
  border-top: 1px solid rgba(245, 248, 246, .1);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  flex: 0 0 auto;
  color: inherit;
}

.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--teal);
  border: 1px solid rgba(169, 211, 206, .45);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red) 0 34%, var(--amber) 34% 67%, var(--aqua-soft) 67% 100%);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  line-height: 1;
}

.brand__word {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .18em;
  color: rgba(169, 211, 206, .75);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  padding: .1rem .42rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--aqua-soft);
  background: rgba(63, 140, 134, .18);
  border: 1px solid rgba(169, 211, 206, .4);
  border-radius: 2px;
}

.version-badge--invert {
  color: var(--aqua-soft);
  background: rgba(63, 140, 134, .22);
  border-color: rgba(169, 211, 206, .45);
}

/* 导航 */
.nav {
  display: flex;
  align-items: center;
  gap: clamp(.4rem, 1.2vw, 1rem);
  margin-left: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.05rem, .7vw, .4rem);
}

.nav__item { display: flex; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .55rem;
  font-size: .89rem;
  font-weight: 500;
  color: rgba(245, 248, 246, .78);
  white-space: nowrap;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}

.nav__link:hover { color: #fff; background: rgba(169, 211, 206, .1); }

.nav__index {
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .06em;
  color: var(--aqua-soft);
  opacity: .6;
}

.nav__link[aria-current="page"] { color: #fff; }

.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: .55rem;
  right: .55rem;
  bottom: .12rem;
  height: 2px;
  background: var(--amber);
}

.nav__link[aria-current="page"] .nav__index { color: var(--amber); opacity: 1; }

.nav__foot { display: none; }

.nav__foot-link {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .12em;
  color: var(--aqua-soft);
  padding-bottom: .15rem;
  border-bottom: 1px solid transparent;
  width: fit-content;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav__foot-link:hover { color: #fff; border-bottom-color: var(--amber); }

.nav__foot-cta { width: 100%; }

.header-cta { flex: 0 0 auto; }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  padding: .45rem .7rem;
  border: 1px solid rgba(169, 211, 206, .42);
  border-radius: 2px;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}

.nav-toggle:hover { border-color: var(--aqua-soft); background: rgba(169, 211, 206, .12); }

.nav-toggle__bars {
  display: grid;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform .2s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--ink);
  color: rgba(245, 248, 246, .82);
}

.footer-signal {
  display: flex;
  height: 6px;
  width: 100%;
}

.footer-signal__seg { display: block; flex: 1; }
.footer-signal__seg--teal { flex: 2.4; background: var(--teal); }
.footer-signal__seg--aqua { flex: 1.4; background: var(--aqua); }
.footer-signal__seg--amber { flex: .6; background: var(--amber); }
.footer-signal__seg--red { flex: .6; background: var(--red); }

.footer-inner {
  display: grid;
  gap: clamp(1.6rem, 3.6vw, 2.6rem);
  padding-block: clamp(2.4rem, 5vw, 3.6rem) 1.6rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem 1.5rem;
  padding-bottom: clamp(1.1rem, 2.6vw, 1.8rem);
  border-bottom: 1px solid var(--line-invert);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  max-width: none;
}

.footer-brand__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--teal);
  border: 1px solid rgba(169, 211, 206, .4);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.footer-brand__word {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #fff;
}

.footer-brand__line {
  max-width: none;
  font-size: .9rem;
  color: rgba(245, 248, 246, .72);
}

.footer-brand__meta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  max-width: none;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  color: var(--aqua-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(1.2rem, 3vw, 2rem);
}

.footer-col {
  display: grid;
  align-content: start;
  gap: .55rem;
}

.footer-col__title {
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(169, 211, 206, .28);
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--aqua-soft);
  line-height: 1.5;
}

.footer-list {
  display: grid;
  gap: .3rem;
}

.footer-link {
  display: inline-block;
  width: fit-content;
  font-size: .92rem;
  color: rgba(245, 248, 246, .8);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.footer-link:hover { color: #fff; border-bottom-color: var(--amber); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 2rem;
  padding-block: clamp(1.3rem, 3vw, 1.9rem);
  border-top: 1px solid var(--line-invert);
  border-bottom: 1px solid var(--line-invert);
}

.footer-contact__item {
  display: grid;
  align-content: start;
  gap: .32rem;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  color: rgba(245, 248, 246, .55);
}

.footer-contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.footer-contact__value {
  font-family: var(--font-mono);
  font-size: .95rem;
  letter-spacing: .01em;
  color: #fff;
  overflow-wrap: anywhere;
}

.footer-contact__value--text {
  font-family: var(--font-body);
  font-size: .9rem;
  line-height: 1.6;
  color: rgba(245, 248, 246, .82);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  padding: .14rem .45rem;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .12em;
  color: var(--aqua-soft);
  border: 1px solid rgba(169, 211, 206, .42);
  border-radius: 2px;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}

.copy-btn:hover { color: #fff; border-color: var(--aqua-soft); background: rgba(169, 211, 206, .12); }

.copy-btn[data-copied="true"] { color: #c8ecdf; border-color: var(--green); background: rgba(46, 139, 111, .25); }
.copy-btn[data-copied="false"] { color: #ffd9d6; border-color: var(--red); background: rgba(217, 69, 61, .22); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 1.6rem;
  font-size: .78rem;
  color: rgba(245, 248, 246, .6);
}

.footer-legal__list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
}

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

.footer-note {
  max-width: 34em;
  font-size: .78rem;
  color: rgba(245, 248, 246, .55);
}

/* ==========================================================================
   Shared components
   ========================================================================== */

/* 章节 */
.section {
  padding-block: clamp(2.2rem, 5vw, 4rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  color: var(--teal);
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--red);
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-top: .5rem;
}

.lede {
  max-width: 38em;
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  line-height: 1.7;
  color: var(--text-soft);
}

/* 面包屑 */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem .4rem;
  color: rgba(21, 35, 41, .58);
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--aqua);
}

.breadcrumb__link {
  color: var(--teal);
  border-bottom: 1px solid rgba(63, 140, 134, .35);
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

.breadcrumb__link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* 长文 */
.prose {
  max-width: 42em;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}

.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; font-size: clamp(1.5rem, 2.2vw, 2rem); }
.prose h3 { margin-top: 1.6em; }
.prose p { max-width: none; }
.prose ul, .prose ol { display: grid; gap: .45em; }
.prose ul li { position: relative; padding-left: 1.4em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7em;
  width: .48em;
  height: .48em;
  background: var(--aqua);
}
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose a {
  color: var(--teal);
  border-bottom: 1px solid rgba(63, 140, 134, .45);
}
.prose a:hover { border-bottom-color: var(--teal); }

/* 网格 */
.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* 面板 */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.05rem, 2.3vw, 1.6rem);
  box-shadow: var(--shadow-card);
}

.panel--glass {
  background: rgba(245, 248, 246, .16);
  border-color: rgba(245, 248, 246, .3);
  color: var(--paper);
  box-shadow: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.panel--console {
  background: var(--ink-deep);
  border-color: rgba(169, 211, 206, .24);
  color: var(--paper);
  box-shadow: inset 0 1px 0 rgba(245, 248, 246, .06), 0 18px 40px rgba(13, 23, 27, .22);
}

.panel--console h2,
.panel--console h3 { color: #fff; }

/* 指标 */
.metric {
  display: grid;
  gap: .25rem;
}

.metric__value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--ink);
}

.metric__label {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  color: var(--aqua);
}

.panel--console .metric__value { color: #fff; }
.panel--console .metric__label { color: var(--aqua-soft); }

/* 状态灯 */
.status-lamp {
  display: inline-block;
  flex: 0 0 auto;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(46, 139, 111, .22);
}

.status-lamp--live { background: var(--green); box-shadow: 0 0 0 3px rgba(46, 139, 111, .22); }
.status-lamp--warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(242, 178, 52, .24); }
.status-lamp--alert { background: var(--red); box-shadow: 0 0 0 3px rgba(217, 69, 61, .22); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .22rem .6rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--teal);
  background: rgba(169, 211, 206, .3);
  border: 1px solid rgba(63, 140, 134, .35);
  border-radius: 2px;
}

/* 标签 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .16rem .55rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .08em;
  color: var(--teal);
  background: rgba(169, 211, 206, .28);
  border: 1px solid rgba(63, 140, 134, .38);
  border-radius: 2px;
}

.tag--red { color: #a92f28; background: rgba(217, 69, 61, .13); border-color: rgba(217, 69, 61, .45); }
.tag--amber { color: #8a5f0a; background: rgba(242, 178, 52, .18); border-color: rgba(242, 178, 52, .55); }
.tag--green { color: #1f6a53; background: rgba(46, 139, 111, .14); border-color: rgba(46, 139, 111, .45); }

/* 标签页 */
.tabs-group { display: block; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  border-bottom: 1px solid var(--line);
}

.tab {
  margin-bottom: -1px;
  padding: .55rem .85rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--text-soft);
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

.tab:hover { color: var(--ink); background: rgba(169, 211, 206, .22); }

.tab[aria-selected="true"],
.tab.is-selected {
  color: var(--ink);
  background: rgba(169, 211, 206, .32);
  border-bottom-color: var(--red);
}

.tab-panel {
  padding-top: 1.25rem;
}

.tab-panel[hidden] { display: none; }
.tab-panel.is-active { display: block; }

/* 图片容器 */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: var(--media-ratio, 16 / 9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(120% 90% at 14% 8%, rgba(169, 211, 206, .34), transparent 62%),
    radial-gradient(100% 80% at 86% 92%, rgba(242, 178, 52, .16), transparent 66%),
    linear-gradient(180deg, #143138 0%, #0d171b 100%);
}

.media-frame > img,
.media-frame > picture > img,
.media-frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(245, 248, 246, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 248, 246, .07) 1px, transparent 1px);
  background-size: 100% 33.334%, 33.334% 100%;
}

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1.4rem .9rem .7rem;
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  color: rgba(245, 248, 246, .86);
  background: linear-gradient(180deg, rgba(13, 23, 27, 0) 0%, rgba(13, 23, 27, .82) 100%);
}

.media-frame--wide { --media-ratio: 21 / 9; }
.media-frame--portrait { --media-ratio: 3 / 4; }
.media-frame--square { --media-ratio: 1 / 1; }

/* 分隔 */
.divider {
  height: 1px;
  border: 0;
  margin-block: clamp(1.4rem, 3.6vw, 2.4rem);
  background: var(--line);
}

.divider--signal {
  height: 3px;
  background: linear-gradient(90deg,
    var(--red) 0 10%,
    var(--amber) 10% 20%,
    var(--aqua) 20% 58%,
    rgba(21, 35, 41, .12) 58% 100%);
}

/* ---------- Reveal ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  will-change: opacity, transform;
}

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav__index { display: none; }
  .nav__link { padding-inline: .45rem; font-size: .84rem; }
}

@media (max-width: 900px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ink-deep); }

  .header-rail {
    font-size: .6rem;
    letter-spacing: .1em;
    padding-block: .34rem;
  }

  .header-main { padding-block: .6rem; gap: .5rem; }

  .header-cta { display: none; }

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

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: .4rem var(--gutter) 1.25rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    background: var(--ink-deep);
    border-bottom: 1px solid rgba(169, 211, 206, .28);
    box-shadow: 0 26px 44px rgba(13, 23, 27, .42);
  }

  .nav[data-open="true"] { display: flex; }

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

  .nav__item { border-bottom: 1px solid rgba(245, 248, 246, .1); }

  .nav__link {
    padding: .82rem .2rem;
    font-size: 1rem;
  }

  .nav__link[aria-current="page"]::after {
    left: .2rem;
    right: auto;
    width: 1.5rem;
    bottom: .55rem;
  }

  .nav__foot {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
    padding-top: 1.1rem;
  }

  .footer-top { gap: .5rem 1.1rem; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .brand__sub { display: none; }
  .version-badge { font-size: .62rem; }
  .header-rail__note { display: none; }
  .header-rail { justify-content: flex-start; }
  .footer-contact { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

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

  .progress-rail__bar { transition: none; }
}
