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

:root {
  --bg: #000000;
  --panel: #121212;
  --night: #0b1729;
  --line: #1f1f23;
  --ink: #edeff2;
  --mute: #99a1ac;
  --dim: #6d747e;
  --gold: #e0b872;
  --blue: #4f7cff;
  --serif: 'Noto Serif TC', 'Songti SC', Georgia, serif;
  --sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  padding-left: 264px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: #a9c2ff; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  width: 264px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 18px 26px;
  background: #000;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.brand-t {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  text-shadow: 0 0 10px rgba(79, 124, 255, .35);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail-i { position: relative; }

.rail-a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 10px;
  color: var(--mute);
  text-decoration: none;
  font-size: 16px;
  letter-spacing: .02em;
  transition: background .25s ease, color .25s ease;
}
.rail-a:hover { background: var(--panel); color: var(--ink); }
.rail-a.is-active {
  background: linear-gradient(100deg, var(--night), var(--panel) 70%);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--blue);
}

.rail-i--has-sub > .rail-a::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
}

.rail-sub {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  left: calc(100% + 8px);
  top: 0;
  min-width: 176px;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .8);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 70;
}
.rail-i--has-sub:hover .rail-sub,
.rail-i--has-sub:focus-within .rail-sub {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.rail-sub a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--mute);
  text-decoration: none;
  font-size: 16px;
}
.rail-sub a:hover { background: #1c1c20; color: #fff; }

/* ---------- 首图 ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 90px 26px 120px;
  overflow: hidden;
  isolation: isolate;
  clip-path: polygon(0 0, 100% 0, 100% 87%, 0 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #05070c;
}
.hero-bg--plain {
  background:
    radial-gradient(120% 90% at 72% 8%, #13233c 0%, #05070c 58%, #000 100%);
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.5) saturate(.85);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, .82) 100%);
}

.hero-in { position: relative; text-align: center; max-width: 820px; }
.hero-h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.3;
  letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(79, 124, 255, .28);
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background: linear-gradient(92deg, rgba(224, 184, 114, .85), rgba(79, 124, 255, .8) 52%, #0a1220);
  clip-path: polygon(0 66%, 100% 6%, 100% 100%, 0 100%);
  opacity: .42;
}

/* ---------- 主体栅格 ---------- */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 0 52px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 40px 100px;
}

.doc { grid-column: 1; min-width: 0; }

.doc h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.36;
  letter-spacing: .01em;
  margin: 0 0 16px;
}
.doc h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.45;
  margin: 26px 0 10px;
}
.doc small,
.side-eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .24em;
  color: var(--gold);
  margin-bottom: 10px;
}

.doc p { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 1.35em; margin: 0 0 18px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: #fff; }
.doc a { text-underline-offset: 3px; }

.doc > section {
  padding: 44px 0 10px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
  animation: rise .7s ease both;
}
.doc > section:first-child { border-top: 0; padding-top: 6px; }
.doc > section:nth-child(1) { animation-delay: .04s; }
.doc > section:nth-child(2) { animation-delay: .1s; }
.doc > section:nth-child(3) { animation-delay: .16s; }
.doc > section:nth-child(4) { animation-delay: .22s; }
.doc > section:nth-child(5) { animation-delay: .28s; }
.doc > section:nth-child(6) { animation-delay: .34s; }
.doc > section:nth-child(7) { animation-delay: .4s; }
.doc > section:nth-child(n + 8) { animation-delay: .46s; }

.doc :is(figure, blockquote, pre, table) {
  background: var(--panel);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 22px 0;
  border: 0;
}
.doc figure img { border-radius: 10px; margin: 0 0 10px; }
.doc blockquote { color: #cfd6df; }
.doc blockquote p:last-child { margin-bottom: 0; }

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

/* ---------- 右侧栏 ---------- */
.side {
  grid-column: 2;
  align-self: start;
  position: sticky;
  top: 28px;
  background: var(--panel);
  border-radius: 10px;
  padding: 22px 18px;
}
.side-eyebrow { letter-spacing: .16em; margin-bottom: 6px; }
.side-h {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  color: var(--mute);
  text-decoration: none;
  font-size: 16px;
  border-bottom: 1px solid #1b1b1f;
}
.side-list a:hover,
.side-list a.is-active { color: #fff; }
.side-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 10px;
  background: #1b1b20;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.side-top:hover { background: var(--night); }

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 40px 32px;
  border-top: 1px solid var(--line);
}

.f-cta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 26px;
  background: linear-gradient(118deg, #0a1526, var(--panel) 62%);
  border-radius: 10px;
  padding: 36px 32px;
}
.f-cta-t {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(20px, 2.8vw, 30px);
  line-height: 1.35;
}
.f-cta-a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 10px;
  background: #ffffff;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}
.f-cta-a:hover { box-shadow: 0 0 18px rgba(255, 255, 255, .35); }

.f-col { min-width: 0; }
.f-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.6;
}
.f-mark { width: 24px; height: 24px; border-radius: 6px; }

.f-list { list-style: none; margin: 0; padding: 0; }
.f-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  color: var(--mute);
  text-decoration: none;
  font-size: 16px;
}
.f-list a:hover { color: #fff; }

.f-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 6px;
  color: var(--gold);
  font-size: 16px;
  text-decoration: none;
}
.f-top:hover { color: #fff; }

.f-copy {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--dim);
  font-size: 15px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .page { grid-template-columns: minmax(0, 1fr) 230px; gap: 0 32px; padding: 48px 26px 84px; }
  .foot { padding: 40px 26px 28px; gap: 26px 18px; }
}

@media (max-width: 900px) {
  body { padding-left: 0; padding-top: 62px; }

  .rail {
    inset: 0 0 auto 0;
    width: 100%;
    height: 62px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
  }
  .brand { gap: 8px; }
  .brand-t { font-size: 15px; white-space: nowrap; }

  .rail-list { flex-direction: row; gap: 2px; }
  .rail-a { white-space: nowrap; padding: 0 12px; border-radius: 8px; }
  .rail-i--has-sub .rail-sub { display: none; }
  .rail-i--has-sub > .rail-a::after { display: none; }

  .hero { min-height: 62vh; padding: 64px 20px 96px; clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); }
  .hero-band { height: 58px; }

  .page { grid-template-columns: minmax(0, 1fr); padding: 40px 20px 72px; }
  .side { grid-column: 1; position: static; margin-top: 34px; }
  .doc > section { scroll-margin-top: 78px; padding-top: 36px; }

  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 36px 20px 26px; }
  .f-cta { padding: 28px 22px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .f-cta { flex-direction: column; align-items: flex-start; }
  .f-cta-a { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .doc > section { animation: none; }
  * { transition: none !important; }
}

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