:root {
  --ink: #171f26;
  --ink-lo: #121a20;
  --ink-hi: #202b34;
  --sky: #c8e0f4;
  --rose: #f5e0e8;
  --text: #d4e2ee;
  --soft: #b6c8d6;
  --muted: #90a4b3;
  --line: rgba(200, 224, 244, 0.09);
  --panel: linear-gradient(145deg, #1f2932, #141c22);
  --panel-hi: linear-gradient(145deg, #24303b, #161e25);
  --raise: -6px -6px 14px rgba(200, 224, 244, 0.07), 7px 7px 18px rgba(0, 0, 0, 0.58);
  --raise-sm: -3px -3px 9px rgba(200, 224, 244, 0.07), 4px 4px 11px rgba(0, 0, 0, 0.52);
  --sink: inset -4px -4px 10px rgba(200, 224, 244, 0.06), inset 6px 6px 14px rgba(0, 0, 0, 0.62);
  --radius: 18px;
}

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

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

body {
  margin: 0;
  padding-bottom: 112px;
  font-family: 'Be Vietnam Pro', 'Noto Sans', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(900px 620px at 88% -10%, rgba(200, 224, 244, 0.18), transparent 66%),
    radial-gradient(760px 560px at 2% 28%, rgba(245, 224, 232, 0.13), transparent 70%),
    var(--ink);
  background-attachment: fixed, fixed, fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(200, 224, 244, 0.28);
  color: #fff;
}

a {
  color: var(--sky);
  overflow-wrap: anywhere;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 3px;
  border-radius: 10px;
}

h1,
h2,
h3,
h4 {
  color: #eef5fb;
  overflow-wrap: anywhere;
}

/* ---------- 底部软条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(32, 43, 52, 0.94), rgba(18, 26, 32, 0.98));
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(200, 224, 244, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dock__in {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock__nav {
  flex: 1 1 auto;
  min-width: 0;
}

.dock__row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.dock__row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 6px 11px;
  border-radius: 12px;
  color: var(--soft);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.25;
  white-space: nowrap;
  transition: color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.dock__row a:hover {
  color: #fff;
  box-shadow: var(--sink);
}

.dock__row a:active {
  transform: scale(0.955);
}

.dock__row a.is-on {
  color: var(--sky);
  box-shadow: var(--sink);
}

.dock__brand {
  margin: 0 auto;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f1f7fc !important;
  padding-inline: 16px !important;
}

.grp {
  position: relative;
  display: inline-flex;
}

.grp__t {
  font-weight: 500;
}

.grp__t::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--rose);
  opacity: 0.8;
}

.grp__p {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translate(-50%, 8px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 158px;
  padding: 10px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--raise);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.grp__p a {
  justify-content: flex-start;
  padding: 10px 12px;
}

.grp:hover .grp__p,
.grp:focus-within .grp__p {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dock__row > .grp:last-child .grp__p {
  left: auto;
  right: 0;
  transform: translateY(8px);
}

.dock__row > .grp:last-child:hover .grp__p,
.dock__row > .grp:last-child:focus-within .grp__p {
  transform: translateY(0);
}

.dock__btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 8px 18px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 0.98rem;
  color: #eaf3fb;
  background: var(--panel-hi);
  box-shadow: var(--raise-sm);
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.15s ease;
}

.dock__btn:active {
  transform: scale(0.97);
  box-shadow: var(--sink);
}

/* ---------- 骨架 ---------- */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 22px 28px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

main > div {
  grid-column: 1;
}

main > aside {
  grid-column: 2;
  grid-row: 2 / span 40;
}

main > div:not(.hero) {
  position: relative;
  padding: 26px 24px 30px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--raise);
  scroll-margin-top: 22px;
  scroll-margin-bottom: 110px;
}

main > div:not(.hero)::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--sky), var(--rose));
  opacity: 0.65;
}

/* ---------- Hero ---------- */
.hero {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  min-height: 45vh;
  padding: 42px 28px 34px;
  border-radius: 22px;
  background: linear-gradient(145deg, #21303b, #131a21);
  box-shadow: var(--raise);
  overflow: hidden;
}

.hero__h {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(2rem, 6.4vw, 3.5rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: #f3f9ff;
  text-shadow: 0 0 26px rgba(200, 224, 244, 0.22);
}

.hero__badge {
  position: absolute;
  top: 18px;
  right: 20px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: #1a2229;
  background: linear-gradient(145deg, var(--rose), #dfc7d2);
  box-shadow: var(--raise-sm);
}

.hero__mark {
  position: absolute;
  left: 24px;
  bottom: 22px;
  width: 92px;
  height: 92px;
  margin: 0;
  border-radius: 26px;
  background: linear-gradient(145deg, #25333f, #151d24);
  box-shadow: var(--raise);
}

.hero__mark::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(245, 224, 232, 0.4), rgba(200, 224, 244, 0.28));
  box-shadow: var(--sink);
}

/* ---------- 正文排版 ---------- */
main > div h2 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.3;
  margin: 0.1em 0 0.6em;
}

main > div h3 {
  font-size: 1.16rem;
  line-height: 1.4;
  margin: 1.5em 0 0.5em;
}

main > div small {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose);
  opacity: 0.85;
  margin-bottom: 0.55rem;
}

main > div p {
  margin: 0 0 1em;
  color: #cddce8;
}

main > div ul,
main > div ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
  color: #cddce8;
}

main > div li {
  margin-bottom: 0.4em;
}

main > div blockquote {
  margin: 1.2em 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1b242c, #161e25);
  box-shadow: var(--sink);
  color: var(--soft);
}

main > div figure {
  margin: 1.2em 0;
}

main > div figure img,
main > div img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: var(--raise-sm);
}

main > div table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.96rem;
}

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

main > div th {
  color: var(--sky);
  font-weight: 600;
}

/* ---------- 侧边索引 ---------- */
.rail {
  position: sticky;
  top: 20px;
  align-self: start;
  padding: 20px 18px 18px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--raise);
}

.rail__tag {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--rose);
  opacity: 0.8;
  margin-bottom: 0.4rem;
}

.rail__h {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

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

.rail__list a {
  display: block;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.94rem;
  line-height: 1.3;
  color: var(--soft);
  text-decoration: none;
  transition: color 0.18s ease, box-shadow 0.18s ease;
}

.rail__list a:hover {
  color: var(--sky);
  box-shadow: var(--sink);
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 26px;
  max-width: 1120px;
  margin: 26px auto 0;
  padding: 26px 24px 22px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(180deg, #1b242c, #111rational 0%);
  background: linear-gradient(180deg, #1b242c, #111a20);
  box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(200, 224, 244, 0.06);
}

.foot__brand {
  grid-column: 1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #eef5fb;
}

.foot__desc {
  grid-column: 1;
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
}

.foot__links {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-content: start;
}

.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--soft);
  text-decoration: none;
  transition: color 0.18s ease, box-shadow 0.18s ease;
}

.foot__links a:hover {
  color: var(--sky);
  box-shadow: var(--sink);
}

.foot__copy {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- 动效 ---------- */
[data-rv],
main > div,
.rail,
.foot {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.62s ease, transform 0.62s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.is-in {
  opacity: 1;
  transform: none;
}

main > div.hero.is-in {
  transform: none;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  body {
    padding-bottom: 96px;
  }

  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 14px 14px 0;
  }

  main > div,
  .hero {
    grid-column: 1;
  }

  main > aside {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin-top: 2px;
  }

  .dock {
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  }

  .dock__in {
    display: block;
  }

  .dock__btn {
    display: flex;
    width: 100%;
  }

  .dock__nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 10px);
    max-height: 64vh;
    overflow-y: auto;
    padding: 10px;
    border-radius: 18px;
    background: var(--panel-hi);
    box-shadow: var(--raise);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .dock.is-open .dock__nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .dock__row {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .dock__row a {
    justify-content: flex-start;
    min-height: 44px;
    padding: 9px 14px;
  }

  .dock__brand {
    order: -1;
    margin: 0 0 4px;
    padding: 9px 14px !important;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .grp {
    display: block;
  }

  .grp__p {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    min-width: 0;
    padding: 0 0 4px;
    background: none;
    box-shadow: none;
  }

  .dock__row > .grp:last-child .grp__p,
  .dock__row > .grp:last-child:hover .grp__p {
    transform: none;
  }

  .grp__p a {
    padding-left: 28px;
    font-size: 0.92rem;
    color: var(--muted);
  }

  .hero {
    min-height: auto;
    padding: 30px 20px 26px;
    align-items: flex-start;
    text-align: left;
  }

  .hero__badge {
    position: static;
    align-self: flex-end;
    margin-bottom: 12px;
  }

  .hero__mark {
    display: none;
  }

  main > div:not(.hero) {
    padding: 22px 18px 26px;
  }

  main > div:not(.hero)::after {
    left: 18px;
    right: 18px;
  }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 20px;
    padding: 22px 18px 18px;
  }

  .foot__links {
    grid-column: 1;
    grid-row: auto;
  }

  .foot__copy {
    grid-column: 1;
  }
}

@media (max-width: 420px) {
  .hero__h {
    font-size: 1.85rem;
  }

  .hero {
    padding: 24px 16px 22px;
  }
}

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

  [data-rv],
  main > div,
  .rail,
  .foot {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .dock__row a,
  .dock__btn,
  .grp__p,
  .dock__nav,
  .rail__list a,
  .foot__links a {
    transition: none;
  }
}

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