/* ==========================================================
   365赔率站 · 共享样式 /assets/site.css
   深墨蓝基底 + 三态色路径系统
   ========================================================== */

:root {
  --abyss-950: #060E1A;
  --abyss-800: #0E1D2F;
  --abyss-650: #1B3149;
  --fog-050: #F1F5F9;
  --fog-300: #C3D0DC;
  --amber: #FFA22B;
  --aqua: #1FE0CE;
  --magenta: #F0478E;
  --text: #E8EFF7;
  --muted: #93A6BA;
  --ink: #0E1D2F;
  --ink-soft: #41576E;
  --line: 2px solid var(--abyss-650);
  --shadow-hard: 8px 8px 0 rgba(31, 224, 206, 0.14);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans CJK SC", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace,
    SFMono-Regular, Menlo, Consolas, monospace;
  --fs-display: clamp(2.5rem, 5.6vw, 6rem);
  --header-h: 116px;
  --shell-max: 1280px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--abyss-950);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

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

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

::selection {
  background: var(--aqua);
  color: var(--abyss-950);
}

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

.section--light :focus-visible {
  outline-color: #0F6E66;
}

/* ---------- 容器与网格 ---------- */

.shell {
  width: min(var(--shell-max), 100% - 40px);
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

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

.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

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

#main-content {
  display: block;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- 跳转链接 ---------- */

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--amber);
  color: var(--abyss-950);
  font-size: 14px;
  font-weight: 700;
  border-radius: 4px;
  transition: top 0.2s ease;
}

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

/* ==========================================================
   头部：双层控制台
   ========================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: calc(var(--header-h) * -1);
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.site-header[data-scrolled] {
  background: rgba(6, 14, 26, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--abyss-650);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.95);
}

/* 仪表条 */

.header-rail {
  height: 40px;
  border-bottom: 1px solid rgba(27, 49, 73, 0.7);
}

.header-rail__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  height: 100%;
}

.rail-version {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.rail-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--amber);
}

.rail-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.state-pill {
  --pill: var(--abyss-650);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
  border: 1px solid var(--abyss-650);
  border-radius: 4px;
  background: rgba(14, 29, 47, 0.72);
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease;
}

.state-pill--desktop { --pill: var(--amber); }
.state-pill--mobile { --pill: var(--aqua); }
.state-pill--china { --pill: var(--magenta); }

.state-pill:hover {
  color: var(--text);
  border-color: var(--pill);
}

.state-pill[aria-pressed="true"] {
  color: var(--pill);
  border-color: var(--pill);
  background: rgba(6, 14, 26, 0.92);
}

.rail-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rail-search {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
}

.rail-search__summary {
  list-style: none;
  padding: 4px 2px;
  color: var(--muted);
  letter-spacing: 0.1em;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.rail-search__summary::-webkit-details-marker {
  display: none;
}

.rail-search__summary:hover,
.rail-search[open] .rail-search__summary {
  color: var(--aqua);
  border-bottom-color: var(--aqua);
}

.rail-search__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  width: 214px;
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--abyss-800);
  border: 2px solid var(--abyss-650);
  border-radius: 6px;
  box-shadow: 10px 10px 0 rgba(31, 224, 206, 0.12);
}

.rail-search__note {
  margin-bottom: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.rail-search__link {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text);
  background: rgba(6, 14, 26, 0.6);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.rail-search__link:hover {
  background: var(--abyss-650);
  color: var(--aqua);
}

/* 主导航条 */

.header-bar {
  height: 76px;
}

.header-bar__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 34px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--amber);
  color: var(--abyss-950);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: background-color 0.2s ease;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand__subline {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  transition: color 0.2s ease;
}

.brand:hover .brand__mark {
  background: var(--aqua);
}

.brand:hover .brand__subline {
  color: var(--aqua);
}

.brand--footer .brand__name {
  font-size: 17px;
}

.brand--footer .brand__mark {
  background: var(--aqua);
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.site-nav__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  opacity: 0.86;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.site-nav__list a:hover {
  opacity: 1;
  color: var(--aqua);
  border-bottom-color: var(--aqua);
}

.site-nav__list a[aria-current="page"] {
  opacity: 1;
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.site-nav__list a[aria-current="page"] .nav-idx {
  color: var(--amber);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  flex-shrink: 0;
}

/* 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--amber);
  color: var(--abyss-950);
  border-color: var(--amber);
  box-shadow: 5px 5px 0 rgba(31, 224, 206, 0.16);
}

.btn--primary:hover {
  background: var(--aqua);
  border-color: var(--aqua);
  box-shadow: 7px 7px 0 rgba(240, 71, 142, 0.2);
  transform: translate(-2px, -2px);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--abyss-650);
}

.btn--ghost:hover {
  border-color: var(--aqua);
  color: var(--aqua);
}

.btn--small {
  padding: 7px 14px;
  font-size: 13px;
}

/* 汉堡按钮 */

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 2px solid var(--abyss-650);
  border-radius: 4px;
  background: rgba(14, 29, 47, 0.7);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.2s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.site-header[data-open] .nav-toggle__bars {
  background: transparent;
}

.site-header[data-open] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.site-header[data-open] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-toggle__label {
  line-height: 1;
}

/* 阅读进度 */

.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.scroll-meter__fill {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--amber) 0 33.34%,
    var(--aqua) 33.34% 66.67%,
    var(--magenta) 66.67% 100%
  );
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}

/* ==========================================================
   页脚
   ========================================================== */

.site-footer {
  position: relative;
  background: var(--abyss-950);
  border-top: 1px solid var(--abyss-650);
  color: var(--text);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(
      to right,
      rgba(147, 166, 186, 0.07) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(147, 166, 186, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.footer-band {
  position: relative;
  z-index: 1;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--amber) 0 33.34%,
    var(--aqua) 33.34% 66.67%,
    var(--magenta) 66.67% 100%
  );
}

.footer-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(210px, 0.95fr) minmax(0, 1.75fr) minmax(240px, 1fr);
  gap: clamp(28px, 3.5vw, 56px);
  padding-block: clamp(40px, 5vw, 72px) clamp(28px, 3vw, 40px);
}

.footer-lead {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-tagline {
  max-width: 26ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.footer-stamp {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--abyss-650);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--amber);
}

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

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

.footer-col__dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--amber);
}

.footer-col[data-accent="aqua"] .footer-col__dot {
  background: var(--aqua);
}

.footer-col[data-accent="magenta"] .footer-col__dot {
  background: var(--magenta);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col__list a {
  display: inline-block;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col__list a:hover {
  color: var(--text);
  transform: translateX(3px);
}

.footer-col[data-accent="amber"] .footer-col__list a:hover {
  color: var(--amber);
}

.footer-col[data-accent="aqua"] .footer-col__list a:hover {
  color: var(--aqua);
}

.footer-col[data-accent="magenta"] .footer-col__list a:hover {
  color: var(--magenta);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(18px, 2vw, 24px);
  background: var(--abyss-800);
  border: 2px solid var(--abyss-650);
  border-radius: 6px;
  box-shadow: 6px 6px 0 rgba(31, 224, 206, 0.12);
}

.footer-contact__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}

.footer-contact__list {
  display: grid;
  gap: 10px;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-contact__value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.footer-contact__note {
  padding-top: 12px;
  border-top: 1px solid var(--abyss-650);
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-legal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--abyss-650);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.footer-legal__list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-left: auto;
}

.footer-legal__list a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-legal__list a:hover {
  color: var(--aqua);
}

/* ==========================================================
   通用内容组件
   ========================================================== */

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 104px);
}

.section--light {
  background: var(--fog-050);
  color: var(--ink);
}

.section--light .lede {
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aqua);
}

.section--light .eyebrow {
  color: #0F6E66;
}

.display {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.lede {
  max-width: 62ch;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.8;
  color: var(--muted);
}

.card {
  --card-accent: var(--aqua);
  position: relative;
  padding: clamp(18px, 2vw, 26px);
  background: var(--abyss-800);
  border: 2px solid var(--abyss-650);
  border-radius: 6px;
  transition: border-color 0.25s ease, transform 0.25s ease,
    box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--card-accent);
}

.card[data-accent="amber"] { --card-accent: var(--amber); }
.card[data-accent="aqua"] { --card-accent: var(--aqua); }
.card[data-accent="magenta"] { --card-accent: var(--magenta); }

.card--focus {
  box-shadow: var(--shadow-hard);
}

.card__index {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--card-accent);
}

.section--light .card {
  background: #FFFFFF;
  border-color: #C6D2DE;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.chip--amber { color: var(--amber); }
.chip--aqua { color: var(--aqua); }
.chip--magenta { color: var(--magenta); }

.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumbs__list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs__list li + li::before {
  content: "/";
  color: var(--abyss-650);
}

.breadcrumbs__list a:hover {
  color: var(--aqua);
}

.breadcrumbs__list [aria-current="page"] {
  color: var(--text);
}

.section--light .breadcrumbs,
.section--light .breadcrumbs__list [aria-current="page"] {
  color: var(--ink-soft);
}

.prose {
  max-width: 68ch;
}

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

.prose h2 {
  margin-top: 1.8em;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin-top: 1.5em;
  font-size: clamp(18px, 1.8vw, 20px);
  line-height: 1.35;
}

.prose p {
  line-height: 1.8;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.5em;
  padding-left: 1.2em;
}

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

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--aqua);
}

.prose ol {
  list-style: decimal;
  padding-left: 1.4em;
}

.prose a {
  color: var(--aqua);
  border-bottom: 1px solid rgba(31, 224, 206, 0.4);
}

.prose strong {
  font-weight: 700;
  color: var(--text);
}

.prose blockquote {
  padding-left: 16px;
  border-left: 2px solid var(--amber);
  color: var(--muted);
}

.section--light .prose {
  color: #1B3149;
}

.section--light .prose strong {
  color: var(--ink);
}

.section--light .prose a {
  color: #0F6E66;
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 2px solid var(--abyss-650);
  border-radius: 6px;
  background: var(--abyss-800);
}

.media-frame img,
.media-frame svg,
.media-frame picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text);
  background: linear-gradient(180deg, rgba(6, 14, 26, 0) 0%, rgba(6, 14, 26, 0.9) 100%);
}

.rail-scroll {
  display: flex;
  gap: 16px;
  padding-bottom: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--abyss-650) transparent;
}

.rail-scroll > *,
.rail-scroll__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.rail-scroll::-webkit-scrollbar {
  height: 6px;
}

.rail-scroll::-webkit-scrollbar-track {
  background: rgba(27, 49, 73, 0.5);
  border-radius: 3px;
}

.rail-scroll::-webkit-scrollbar-thumb {
  background: var(--abyss-650);
  border-radius: 3px;
}

.texture-grid {
  position: relative;
  isolation: isolate;
}

.texture-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(
      to right,
      rgba(147, 166, 186, 0.08) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(147, 166, 186, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- 滚动显现 ---------- */

[data-reveal] {
  transition: opacity 0.42s var(--ease), transform 0.42s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(24px);
}

/* ---------- 三态联动（页面表格列） ---------- */

[data-device-col] {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

body[data-device="desktop"] [data-device-col="desktop"] {
  background: rgba(255, 162, 43, 0.1);
  box-shadow: inset 0 0 0 2px var(--amber);
}

body[data-device="mobile"] [data-device-col="mobile"] {
  background: rgba(31, 224, 206, 0.1);
  box-shadow: inset 0 0 0 2px var(--aqua);
}

body[data-device="china"] [data-device-col="china"] {
  background: rgba(240, 71, 142, 0.1);
  box-shadow: inset 0 0 0 2px var(--magenta);
}

/* ==========================================================
   响应式
   ========================================================== */

@media (max-width: 1023px) {
  :root {
    --header-h: 100px;
  }

  .header-rail {
    height: 36px;
  }

  .header-bar {
    height: 64px;
  }

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

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    max-height: calc(100vh - var(--header-h));
    padding: 12px 20px 20px;
    overflow-y: auto;
    background: var(--abyss-950);
    border-top: 1px solid var(--abyss-650);
    border-bottom: 2px solid var(--abyss-650);
  }

  .site-header[data-open] .site-nav {
    display: block;
  }

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

  .site-nav__list a {
    padding: 14px 4px;
    font-size: 16px;
    opacity: 1;
    border-bottom: 1px solid rgba(27, 49, 73, 0.6);
  }

  .site-nav__list li:last-child a {
    border-bottom: 0;
  }

  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 6;
  }

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

  .footer-lead,
  .footer-contact {
    grid-column: 1 / -1;
  }

  .footer-stamp {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .rail-links {
    display: none;
  }

  .rail-version {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(var(--shell-max), 100% - 32px);
  }

  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 12;
  }

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

  .header-actions .btn--primary {
    display: none;
  }
}

@media (max-width: 480px) {
  .state-pill {
    padding: 3px 7px;
    font-size: 10px;
  }

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

  .footer-legal__list {
    margin-left: 0;
  }

  .brand__subline {
    letter-spacing: 0.08em;
  }
}

/* ---------- 动效降级 ---------- */

@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;
  }

  [data-reveal],
  [data-reveal].is-hidden {
    opacity: 1;
    transform: none;
  }

  .btn--primary:hover {
    transform: none;
  }

  .footer-col__list a:hover {
    transform: none;
  }
}
