/* =========================================================
   德信赛场 · 共享样式 /assets/site.css
   夜场墨绿底 · 脉冲荧光青交互 · 琥珀橙警示
   ========================================================= */

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

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

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

ul, ol { padding: 0; }

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: clamp(24px, 4vw, 40px) 0;
}

/* ---------- 01 tokens ---------- */
:root {
  --ink:        #0B1F1A;
  --ink-2:      #12332B;
  --pulse:      #3DF2C8;
  --pulse-soft: #9BFFE8;
  --amber:      #F5A524;
  --amber-soft: #FFD08A;
  --paper:      #D8E3DE;
  --ash:        #7C918A;
  --line:       #2A3F39;
  --sheet:      #E8EFEA;

  --font-sans: "Inter", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-narrow: "Archivo Narrow", "Roboto Condensed", "Oswald", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", SFMono-Regular, ui-monospace, "Courier New", monospace;

  --shell: 1280px;
  --gap: clamp(14px, 2vw, 24px);
  --pad: clamp(16px, 4vw, 40px);
  --radius-cut: 18px;
}

/* ---------- 02 base ---------- */
body {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(61, 242, 200, 0.030) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 242, 200, 0.030) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-narrow);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.05em;
  color: #FFFFFF;
}

h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); letter-spacing: 0.06em; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.08rem, 2vw, 1.35rem); }

p { margin-bottom: 1.1em; max-width: 62ch; }

a {
  color: var(--pulse);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

a:hover { color: var(--pulse-soft); }

code, kbd, samp, pre, .mono { font-family: var(--font-mono); }

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

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

/* ---------- 03 layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.wrap--narrow { max-width: 760px; }

.section { padding-block: clamp(36px, 7vw, 88px); }

.grid { display: grid; gap: var(--gap); }

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

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

.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.strip {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(20px, 3vw, 32px);
  margin-block: clamp(32px, 6vw, 64px);
}

/* ---------- 04 chapters ---------- */
.chapter { margin-block: clamp(40px, 7vw, 88px); }

.chapter-head {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1.6vw, 20px);
  padding-bottom: 0.7em;
  margin-bottom: 1.4em;
  border-bottom: 1px solid var(--line);
}

.chapter-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: rgba(61, 242, 200, 0.20);
  -webkit-text-stroke: 1px var(--pulse);
  font-variant-numeric: tabular-nums;
}

.chapter-title {
  font-family: var(--font-narrow);
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--paper);
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--pulse);
  margin-bottom: 1em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--pulse);
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  line-height: 1.72;
  color: var(--paper);
  max-width: 42ch;
}

.note {
  border-left: 2px solid var(--amber);
  padding: 0.25em 0 0.25em 1em;
  color: var(--ash);
  font-size: 0.92rem;
  max-width: 40ch;
  margin-bottom: 1.1em;
}

/* ---------- 05 panels & frame ---------- */
.panel {
  position: relative;
  background: var(--ink-2);
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 32px);
  clip-path: polygon(
    0 0,
    calc(100% - var(--radius-cut)) 0,
    100% var(--radius-cut),
    100% 100%,
    var(--radius-cut) 100%,
    0 calc(100% - var(--radius-cut))
  );
}

.panel > :last-child { margin-bottom: 0; }

.panel--focus {
  border-left: 2px solid var(--pulse);
  background-image: linear-gradient(180deg, rgba(61, 242, 200, 0.07), rgba(61, 242, 200, 0) 55%);
}

.frame {
  position: relative;
  border: 1px solid var(--line);
  padding: clamp(20px, 4vw, 52px);
  background-image:
    radial-gradient(120% 90% at 85% 0%, rgba(61, 242, 200, 0.09), rgba(11, 31, 26, 0) 62%);
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--pulse);
  opacity: 0.72;
  pointer-events: none;
}

.frame::before {
  top: -1px; left: -1px;
  border-right: 0; border-bottom: 0;
}

.frame::after {
  bottom: -1px; right: -1px;
  border-left: 0; border-top: 0;
}

/* ---------- 06 buttons & tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: 0.8em 1.4em;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  color: var(--ink);
  background: var(--pulse);
  border-color: var(--pulse);
}

.btn-primary {
  background: var(--pulse);
  border-color: var(--pulse);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--pulse-soft);
  border-color: var(--pulse-soft);
}

.btn-ghost {
  border-color: transparent;
  color: var(--ash);
}

.btn-ghost:hover {
  color: var(--pulse);
  background: rgba(61, 242, 200, 0.08);
  border-color: var(--line);
}

.btn-line {
  border-color: rgba(61, 242, 200, 0.45);
  color: var(--pulse);
}

.btn-line:hover {
  background: var(--pulse);
  color: var(--ink);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.28em 0.7em;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pulse);
  white-space: nowrap;
}

.tag--amber {
  border-color: var(--amber);
  background: rgba(245, 165, 36, 0.12);
  color: var(--amber-soft);
}

/* ---------- 07 breadcrumbs ---------- */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 1.6em;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  list-style: none;
}

.breadcrumbs li { display: flex; align-items: center; gap: 0.5em; }

.breadcrumbs li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumbs a { color: var(--ash); }
.breadcrumbs a:hover { color: var(--pulse); }
.breadcrumbs [aria-current="page"] { color: var(--paper); }

/* ---------- 08 data & media ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-bottom: 1.4em;
}

.data-table caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
  padding-bottom: 0.7em;
}

.data-table th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  text-align: left;
  padding: 0.75em 0.85em;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 0.8em 0.85em;
  border-bottom: 1px solid rgba(42, 63, 57, 0.7);
  font-variant-numeric: tabular-nums;
}

.data-table td:first-child,
.data-table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr:hover { background: rgba(61, 242, 200, 0.05); }

.kpi {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--pulse);
  font-variant-numeric: tabular-nums;
}

.kpi-label {
  display: block;
  margin-top: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
}

.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--ink-2);
  background-image:
    linear-gradient(135deg, rgba(61, 242, 200, 0.10), rgba(11, 31, 26, 0) 62%),
    repeating-linear-gradient(90deg, rgba(216, 227, 222, 0.055) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(216, 227, 222, 0.045) 0 1px, transparent 1px 26px);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}

.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--1x1  { aspect-ratio: 1 / 1; }

.media-tag {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 0.45em 0.85em;
  background: var(--ink);
  color: var(--pulse);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- 09 reveal / disclosure ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.disclosure {
  border: 1px solid var(--line);
  background: var(--ink-2);
}

.disclosure + .disclosure { margin-top: -1px; }

.disclosure-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 1em 1.2em;
  text-align: left;
  color: var(--paper);
  font-size: 1rem;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.disclosure-trigger::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--pulse);
}

.disclosure-trigger[aria-expanded="true"]::after { content: "\2013"; }

.disclosure-trigger:hover,
.disclosure-trigger[aria-expanded="true"] {
  background: rgba(61, 242, 200, 0.06);
  color: var(--pulse-soft);
}

.disclosure-panel {
  padding: 1em 1.2em 1.3em;
  border-top: 1px solid var(--line);
}

.disclosure-panel[hidden] { display: none; }

/* ---------- 10 header ---------- */
.skip-link {
  position: absolute;
  left: var(--pad);
  top: -120px;
  z-index: 200;
  padding: 0.65em 1.1em;
  background: var(--pulse);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: top 0.2s ease;
}

.skip-link:focus { top: 8px; color: var(--ink); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(11, 31, 26, 0.94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.cmd-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 14px var(--pad);
  transition: padding 0.25s ease;
}

.site-header[data-condensed] .cmd-bar { padding-block: 8px; }

.cmd-brand {
  display: flex;
  align-items: center;
  gap: 0.75em;
  min-width: 0;
}

.cmd-pulse {
  position: relative;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  background: var(--pulse);
  box-shadow: 0 0 12px rgba(61, 242, 200, 0.75);
}

.cmd-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(61, 242, 200, 0.45);
  animation: dx-pulse 3.4s ease-in-out infinite;
}

@keyframes dx-pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.25; }
  50%      { transform: scale(1.12); opacity: 0.72; }
}

.cmd-logo {
  display: grid;
  gap: 2px;
  line-height: 1;
  text-decoration: none;
}

.cmd-logo-cn {
  font-family: var(--font-narrow);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #FFFFFF;
}

.cmd-logo-en {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ash);
}

.cmd-nav { display: flex; justify-content: center; min-width: 0; }

.cmd-nav-list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.9vw, 14px);
  list-style: none;
}

.cmd-nav-list > li { display: flex; }

.cmd-nav-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  padding: 0.5em 0.65em;
  border: 1px solid transparent;
  color: var(--paper);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--ash);
  font-variant-numeric: tabular-nums;
}

.cmd-nav-list a:hover {
  color: var(--pulse-soft);
  border-color: var(--line);
  background: rgba(61, 242, 200, 0.06);
}

.cmd-nav-list a:hover .nav-idx { color: var(--pulse); }

.cmd-nav-list a[aria-current="page"] {
  color: var(--pulse);
  border-color: rgba(61, 242, 200, 0.45);
  background: rgba(61, 242, 200, 0.09);
}

.cmd-nav-list a[aria-current="page"] .nav-idx { color: var(--pulse); }

.cmd-actions { justify-self: end; }

.cmd-cta { padding: 0.6em 1.1em; font-size: 0.7rem; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.65em;
  justify-self: end;
  padding: 0.55em 0.85em;
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 9px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--pulse);
  transition: transform 0.2s ease;
}

.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after  { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-4px) rotate(-45deg);
}

.cmd-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(42, 63, 57, 0.7);
  overflow: hidden;
}

.cmd-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--pulse), var(--amber));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 11 footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--ink-2);
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--pulse), rgba(61, 242, 200, 0) 55%, var(--amber));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr;
  gap: clamp(24px, 4vw, 56px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) var(--pad) clamp(24px, 4vw, 40px);
}

.footer-col { min-width: 0; }

.footer-mark {
  display: inline-block;
  font-family: var(--font-narrow);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--pulse-soft);
  text-decoration: none;
  margin-bottom: 0.9em;
}

.footer-mark:hover { color: var(--pulse); }

.footer-tagline {
  max-width: 34ch;
  font-size: 0.92rem;
  color: var(--ash);
  margin-bottom: 1.2em;
}

.footer-pulse {
  display: block;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--pulse), rgba(61, 242, 200, 0));
}

.footer-h {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--pulse);
  margin-bottom: 1.1em;
}

.footer-list {
  list-style: none;
  display: grid;
  gap: 0.55em;
  font-size: 0.94rem;
}

.footer-list a {
  color: var(--paper);
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.footer-list a:hover {
  color: var(--pulse);
  border-bottom-color: rgba(61, 242, 200, 0.5);
}

.footer-contact-list { margin-bottom: 1.4em; }

.footer-contact-list li {
  display: flex;
  align-items: baseline;
  gap: 0.85em;
}

.footer-k {
  flex: 0 0 auto;
  min-width: 3.2em;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}

.footer-v {
  color: var(--paper);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 16px var(--pad) 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ash);
}

.footer-legal, .footer-note { margin: 0; max-width: none; }

/* ---------- 12 responsive ---------- */
@media (max-width: 1100px) {
  .cmd-nav-list a { font-size: 0.84rem; padding: 0.5em 0.5em; }
  .cmd-logo-en { display: none; }
}

@media (max-width: 980px) {
  .cmd-bar {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

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

  .cmd-nav {
    grid-column: 1 / -1;
    display: none;
    justify-content: flex-start;
    border-top: 1px solid var(--line);
    padding-top: 8px;
  }

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

  .cmd-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .cmd-nav-list a {
    width: 100%;
    padding: 0.85em 0.3em;
    border-bottom: 1px solid rgba(42, 63, 57, 0.6);
    font-size: 0.95rem;
  }

  .cmd-actions { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

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

  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  body { background-size: 48px 48px; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-base { flex-direction: column; align-items: flex-start; }

  .chapter-head { flex-wrap: wrap; }

  .lede, .note { max-width: none; }
}

@media (min-width: 641px) and (max-width: 980px) {
  .col-5, .col-6, .col-7 { grid-column: span 6; }
}

/* ---------- 13 print ---------- */
@media print {
  body { background: var(--sheet); color: var(--ink); }
  .site-header, .site-footer, .cmd-progress { display: none; }
}

/* ---------- 14 reduced motion ---------- */
@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;
  }

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