@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700&display=swap');

:root {
  --line: rgba(255, 255, 255, 0.14);
  --line-2: rgba(255, 255, 255, 0.34);
  --glass: rgba(255, 255, 255, 0.045);
  --mute: rgba(255, 255, 255, 0.64);
  --r: 28px;
  --gap: 8px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background-color: #000;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.17) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 24px 24px, 96px 96px;
  background-position: 0 0, 12px 12px;
  background-attachment: fixed;
  color: #fff;
  font-family: "Exo 2", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  letter-spacing: 0.01em;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: #fff;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

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

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.4vw, 44px);
}

/* ---------- 页头：两行，品牌行 + 胶囊菜单行 ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: 10px;
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 2px 4px;
  text-decoration: none;
  color: #fff;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2);
}

.brand-square {
  display: block;
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 6px;
  background-image: radial-gradient(#fff 1.5px, transparent 1.6px);
  background-size: 8px 8px;
}

.brand-name {
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

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

.search input {
  width: clamp(140px, 22vw, 230px);
  height: 44px;
  min-width: 0;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
}

.search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search button {
  height: 44px;
  padding: 0 20px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(255, 255, 255, 0.24);
}

.navrow {
  padding-bottom: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 10px;
}

.navrow nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.navrow nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.navrow nav a:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
  transform: translateY(-2px);
}

/* ---------- 主体：12 栏非对称网格 ---------- */
.stage {
  padding: clamp(22px, 4.5vw, 56px) 0 0;
}

.doc {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 26px);
  align-items: start;
}

.lede {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 26px);
  align-items: center;
  min-height: 70vh;
  padding-bottom: clamp(24px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.lede-art {
  grid-column: 1 / 5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.lede-art-img {
  width: 100%;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  filter: grayscale(1) contrast(1.15);
  display: block;
}

.lede-dots {
  display: block;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background-image: radial-gradient(#fff 2px, transparent 2.2px);
  background-size: 16px 16px;
  opacity: 0.55;
}

.lede-copy {
  grid-column: 5 / 13;
}

.lede-copy h1 {
  margin: 0 0 20px;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: clamp(2.1rem, 6.2vw, 4.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.lede-desc {
  margin: 0 0 0 auto;
  max-width: 46ch;
  color: var(--mute);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.7;
}

/* ---------- 正文卡片流 ---------- */
.body {
  grid-column: 1 / 9;
  display: grid;
  gap: clamp(16px, 2vw, 26px);
}

.body > * {
  position: relative;
  margin: 0;
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.body > *:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
}

.body h2 {
  margin: 0 0 10px;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: clamp(21px, 2.4vw, 29px);
  font-weight: 600;
  line-height: 1.22;
  text-align: right;
}

.body h2 + p {
  text-align: right;
}

.body h3 {
  margin: 26px 0 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.body h4 {
  margin: 20px 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: var(--mute);
}

.body p {
  margin: 0 0 14px;
}

.body p:last-child {
  margin-bottom: 0;
}

.body a {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.body a:hover {
  text-decoration-color: #fff;
}

.body ul,
.body ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.body li {
  margin-bottom: 8px;
}

.body li:last-child {
  margin-bottom: 0;
}

.body blockquote {
  margin: 18px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--line-2);
  color: var(--mute);
}

.body img {
  display: block;
  margin: 16px 0;
  border-radius: calc(var(--r) - 10px);
  border: 1px solid var(--line);
}

.body time {
  font-variant-numeric: tabular-nums;
  color: var(--mute);
  letter-spacing: 0.04em;
}

.body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 16px;
}

.body th,
.body td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.body code,
.body pre {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px;
}

.body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.body pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--mute);
  font-size: 16px;
  letter-spacing: 0.16em;
}

/* ---------- 右侧索引栏 ---------- */
.rail {
  grid-column: 9 / 13;
  position: sticky;
  top: 150px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.rail h2 {
  margin: 0 0 6px;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: right;
}

.rail .subtitle {
  margin: 0 0 14px;
  text-align: right;
  font-size: 16px;
  letter-spacing: 0.2em;
}

.rail-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.rail-list a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--line);
  color: #fff;
  transform: translateX(-4px);
}

/* ---------- 页脚：两栏 + 版权条 ---------- */
.foot {
  margin-top: clamp(40px, 6vw, 84px);
  padding: clamp(24px, 4vw, 44px) 0 18px;
  border-top: 1px solid var(--line);
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.foot-addr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: "Orbitron", "Exo 2", sans-serif;
  font-style: normal;
  font-size: 17px;
  letter-spacing: 0.22em;
}

.foot-mark {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #fff;
}

.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.foot-nav a:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 16px;
}

.foot-bar p {
  margin: 0;
}

.foot-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.foot-bar a:hover {
  border-bottom-color: #fff;
}

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

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lede-art,
  .lede-copy,
  .body > *,
  .rail {
    animation: rise 0.62s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .lede-art {
    animation-delay: 0.02s;
  }

  .lede-copy {
    animation-delay: 0.1s;
  }

  .body > *:nth-child(1) {
    animation-delay: 0.16s;
  }

  .body > *:nth-child(2) {
    animation-delay: 0.22s;
  }

  .body > *:nth-child(3) {
    animation-delay: 0.28s;
  }

  .body > *:nth-child(4) {
    animation-delay: 0.34s;
  }

  .body > *:nth-child(5) {
    animation-delay: 0.4s;
  }

  .body > *:nth-child(6) {
    animation-delay: 0.46s;
  }

  .body > *:nth-child(7) {
    animation-delay: 0.52s;
  }

  .rail {
    animation-delay: 0.3s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 880px) {
  .masthead {
    position: static;
  }

  .brandrow {
    flex-wrap: wrap;
  }

  .search {
    width: 100%;
  }

  .search input {
    flex: 1 1 auto;
    width: auto;
  }

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

  .lede {
    grid-template-columns: 1fr;
    min-height: auto;
    row-gap: 20px;
    padding-bottom: 28px;
  }

  .lede-art {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .lede-dots {
    max-width: 170px;
  }

  .lede-copy {
    grid-column: 1 / -1;
  }

  .body {
    grid-column: 1 / -1;
  }

  .rail {
    grid-column: 1 / -1;
    position: static;
  }

  .foot-top {
    grid-template-columns: 1fr;
  }

  .foot-nav ul {
    justify-content: flex-start;
  }

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

@media (max-width: 420px) {
  .navrow nav a {
    padding: 0 14px;
    font-size: 16px;
  }

  .brand-name {
    letter-spacing: 0.18em;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
