@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root {
  --ink: #0B1026;
  --amber: #F2A65A;
  --mist: #7C8DB5;
  --fg: #E9EDFA;
  --dim: #A6B1D6;
  --line: rgba(124, 141, 181, 0.24);
  --card: rgba(255, 255, 255, 0.045);
}

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

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

body {
  margin: 0;
  min-height: 100%;
  color: var(--fg);
  background:
    radial-gradient(1100px 560px at 82% -8%, rgba(242, 166, 90, 0.16), transparent 62%),
    radial-gradient(900px 520px at 6% 22%, rgba(124, 141, 181, 0.17), transparent 66%),
    var(--ink);
  background-attachment: fixed;
  font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

a {
  color: var(--amber);
}

h1,
h2,
h3,
h4 {
  font-family: "Nunito", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.01em;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}

.glow {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 140vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 420px at 78% 18%, rgba(242, 166, 90, 0.2), transparent 70%),
    radial-gradient(520px 520px at 16% 62%, rgba(124, 141, 181, 0.18), transparent 72%);
  transform: translate3d(0, calc(var(--sy, 0) * 0.16px), 0);
  will-change: transform;
  opacity: 0.9;
}

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px clamp(12px, 3vw, 26px);
  background: rgba(11, 16, 38, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand-corner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.brand-corner:hover,
.brand-corner:focus-visible {
  background: rgba(242, 166, 90, 0.2);
  transform: translateY(-1px);
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
}

.pillnav {
  flex: 1 1 240px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.pillnav::-webkit-scrollbar {
  display: none;
}

.pillrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dim);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pill:hover,
.pill:focus-visible {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  transform: translateY(-1px);
}

.search {
  order: 3;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.search-field {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--fg);
  font: inherit;
  font-size: 0.94rem;
}

.search-field::placeholder {
  color: rgba(166, 177, 214, 0.7);
}

.search-field:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

.search-go {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.search-go:hover {
  filter: brightness(1.06);
}

/* 主区 */
main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px) clamp(14px, 3.4vw, 34px) clamp(26px, 4vw, 46px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 34px;
}

/* 首屏 */
.hero {
  position: relative;
  grid-column: 1 / -1;
  min-height: 44vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 3vw, 26px);
  padding: 22px 0 34px;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-h1 {
  font-size: clamp(1.85rem, 5.4vw, 3.2rem);
  margin: 0 0 12px;
}

.hero-desc {
  max-width: 42ch;
  margin: 0;
  color: var(--dim);
  font-size: 1rem;
}

.hero-art {
  position: relative;
  z-index: 2;
  margin: 0;
  width: clamp(96px, 22vw, 168px);
  transform: translate3d(0, calc(var(--sy, 0) * -0.05px), 0);
  will-change: transform;
}

.hero-svg,
.hero-img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 32px rgba(242, 166, 90, 0.24));
}

.hero-ghost {
  position: absolute;
  left: -6px;
  bottom: -0.08em;
  z-index: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 15vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.03em;
  color: rgba(124, 141, 181, 0.15);
  white-space: nowrap;
  pointer-events: none;
}

/* 正文卡片 */
main > section:not(.hero):not(.rail) {
  grid-column: 1;
  position: relative;
  z-index: 1;
  margin: 0 0 clamp(16px, 2.4vw, 24px);
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid rgba(124, 141, 181, 0.2);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.028));
  box-shadow:
    0 20px 42px -24px rgba(0, 0, 0, 0.92),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  scroll-margin-top: 124px;
}

main > section:nth-of-type(even):not(.hero):not(.rail) {
  background: linear-gradient(160deg, rgba(124, 141, 181, 0.1), rgba(255, 255, 255, 0.025));
}

main > section:not(.hero):not(.rail) > h2 {
  font-size: clamp(1.24rem, 2.6vw, 1.62rem);
  margin: 0 0 6px;
}

main > section:not(.hero):not(.rail) > h2 + hr {
  width: 58px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), rgba(242, 166, 90, 0));
  margin: 0 0 16px;
}

main > section:not(.hero):not(.rail) > h3 {
  font-size: 1.1rem;
  margin: 22px 0 8px;
  color: #fff;
}

main > section p {
  margin: 0 0 14px;
  color: #DCE2F5;
}

main > section p:last-child {
  margin-bottom: 0;
}

main > section ul,
main > section ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
}

main > section li {
  margin-bottom: 8px;
  color: #DCE2F5;
}

main > section li::marker {
  color: var(--amber);
}

main > section strong {
  color: #fff;
}

main > section figure {
  margin: 18px 0;
}

main > section figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

main > section blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--amber);
  background: rgba(242, 166, 90, 0.08);
  border-radius: 0 4px 4px 0;
  color: #E7EBF8;
}

main > section table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
  font-size: 0.95rem;
}

main > section th,
main > section td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

.flash {
  box-shadow:
    0 0 0 2px var(--amber),
    0 22px 44px -24px rgba(242, 166, 90, 0.6);
}

/* 侧栏 */
.rail {
  grid-column: 1;
  margin: 4px 0 26px;
}

.rail-card {
  grid-column: 2;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.9);
  padding: 16px 16px 18px;
}

.rail-title {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--mist);
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
}

.rail-card hr {
  margin: 10px 0 8px;
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 4px;
  color: var(--dim);
  font-size: 0.94rem;
  text-decoration: none;
  border-bottom: 1px dashed rgba(124, 141, 181, 0.18);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: var(--amber);
  background: rgba(242, 166, 90, 0.1);
}

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(242, 166, 90, 0.16);
  color: var(--amber);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}

.rail-top:hover {
  background: rgba(242, 166, 90, 0.28);
}

/* 页脚 */
.site-foot {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  padding: clamp(28px, 5vw, 52px) clamp(18px, 4vw, 40px) 28px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(242, 166, 90, 0.07), rgba(11, 16, 38, 0));
}

.foot-cta {
  margin: 0;
}

.foot-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.9rem, 7vw, 3.4rem);
  line-height: 1.1;
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.foot-cta a svg {
  width: 0.6em;
  height: 0.6em;
  transition: transform 0.25s ease;
}

.foot-cta a:hover {
  color: var(--amber);
}

.foot-cta a:hover svg {
  transform: translateX(6px);
}

.foot-brand {
  margin: 0;
  color: var(--dim);
  font-size: 0.95rem;
}

.foot-brand strong {
  display: block;
  color: #fff;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.foot-brand span {
  display: block;
  max-width: 34ch;
}

.foot-links {
  margin: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 6px 6px 0;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.9rem;
  text-decoration: none;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.foot-copy {
  color: var(--mist);
  font-size: 0.86rem;
  padding-top: 6px;
  border-top: 1px dashed rgba(124, 141, 181, 0.2);
}

/* 断点 */
@media (min-width: 760px) {
  .search {
    order: 2;
    width: auto;
    flex: 0 0 auto;
  }

  .search-field {
    width: clamp(130px, 22vw, 210px);
    flex: 0 0 auto;
  }

  .site-foot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 30px;
    padding-bottom: 22px;
  }

  .foot-cta {
    grid-column: 1 / -1;
  }

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

@media (min-width: 940px) {
  main {
    grid-template-columns: minmax(0, 1fr) 252px;
    align-items: start;
  }

  .rail {
    grid-column: 2;
    grid-row: 2 / span 40;
    margin: 0;
  }

  .rail-card {
    position: sticky;
    top: 96px;
  }
}

@media (max-width: 759px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 88px;
    min-height: 0;
    padding-top: 18px;
  }
}

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

  .glow,
  .hero-art {
    transform: none;
  }

  .js main > section:not(.hero) {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.js main > section:not(.hero) {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js main > section:not(.hero).in {
  opacity: 1;
  transform: none;
}

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