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

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

:root {
  --ice: #c8e0f4;
  --rose: #f5e0e8;
  --ink: #171f26;
  --bg: #e3ecf5;
  --bg-dk: #d3e2f0;
  --hi: rgba(255, 255, 255, 0.9);
  --lo: rgba(23, 31, 38, 0.16);
  --dot: rgba(23, 31, 38, 0.14);
  --out: -7px -7px 16px var(--hi), 8px 8px 20px var(--lo);
  --out-s: -3px -3px 9px var(--hi), 4px 4px 11px var(--lo);
  --in: inset 4px 4px 10px var(--lo), inset -4px -4px 10px var(--hi);
  --r: 14px;
  --wrap: 1180px;
  --cond: 'Barlow Condensed', 'Barlow', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1px, transparent 1px),
    radial-gradient(1100px 620px at 82% -12%, rgba(245, 224, 232, 0.75), transparent 62%),
    radial-gradient(900px 520px at 4% 6%, rgba(200, 224, 244, 0.8), transparent 65%);
  background-size: 24px 24px, 100% 100%, 100% 100%;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--cond);
  font-weight: 700;
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0.03em;
}

p {
  margin: 0 0 1em;
}

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

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

/* ---------- 头部：两行，品牌独占一行 + 分组菜单行 ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, #eef4fa 0%, #dde9f4 100%);
  box-shadow: 0 8px 22px rgba(23, 31, 38, 0.12);
}

.head-top {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 9px 18px 3px;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--cond);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(145deg, #eaf2f9, #d9e6f2);
  box-shadow: var(--out-s);
}

.brand:active {
  box-shadow: var(--in);
}

.brand-txt {
  padding-right: 4px;
}

.mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: var(--out-s);
  background: var(--rose);
}

.head-nav {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 2px 18px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.head-nav p.navgrp {
  position: relative;
  display: flex;
  gap: 8px;
  margin: 0;
  padding-bottom: 6px;
}

.head-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 15px;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--cond);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  background: linear-gradient(145deg, #eaf2f9, #d8e5f1);
  box-shadow: var(--out-s);
  transition: box-shadow 150ms ease, transform 150ms ease, background 150ms ease;
  white-space: nowrap;
}

.head-nav a:hover {
  box-shadow: var(--in);
}

.head-nav a:active {
  transform: scale(0.96);
}

.head-nav a.nav-l2 {
  background: linear-gradient(145deg, #f8e9ee, #ecdde6);
}

@media (min-width: 901px) {
  .head-nav a.nav-l2 {
    position: absolute;
    left: 0;
    display: none;
    box-shadow: var(--out);
    z-index: 60;
  }

  .head-nav p.navgrp:hover a.nav-l2,
  .head-nav p.navgrp:focus-within a.nav-l2 {
    display: inline-flex;
  }

  .head-nav a.nav-l2:nth-child(2) {
    top: calc(100% - 1px);
  }

  .head-nav a.nav-l2:nth-child(3) {
    top: calc(100% + 48px);
  }

  .head-nav p.navgrp:first-child a.nav-l1 {
    background: linear-gradient(145deg, #f5e0e8, #e6d6e0);
  }

  .head-nav p.navgrp a.nav-l1.has-sub::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.55;
  }
}

/* ---------- 主体骨架 ---------- */

main {
  display: block;
}

.page {
  display: block;
}

article {
  scroll-margin-top: 150px;
}

.hero {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  gap: 20px;
  padding: 56px 18px 48px;
}

.hero h1 {
  font-size: clamp(2.5rem, 8.6vw, 6rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  text-wrap: balance;
  text-shadow: -1px -1px 1px #ffffff, 2px 2px 3px rgba(23, 31, 38, 0.22);
}

.hero-desc {
  max-width: 44ch;
  margin: 0;
  font-size: 1.06rem;
  color: #33424e;
}

.hero-fig {
  margin: 6px 0 0;
  width: 100%;
  max-width: 620px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(214, 228, 240, 0.6));
  box-shadow: var(--out);
}

.hero-img {
  display: block;
  width: 100%;
  border-radius: 12px;
}

.cols {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 8px 18px 78px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

/* ---------- 左侧栏 ---------- */

.rail {
  position: sticky;
  top: 132px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 16px;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(226, 237, 246, 0.42));
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: var(--out-s);
}

.rail h2 {
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  margin: 6px 0 0;
  color: #2b3a45;
}

.rail h2:first-of-type {
  margin-top: 0;
}

.ttl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ice);
}

.ttl .dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(145deg, var(--ice), var(--rose));
  box-shadow: var(--out-s);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.rail-nav a,
.totop {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.97rem;
  line-height: 1.4;
  background: linear-gradient(145deg, #edf4fa, #dde9f4);
  box-shadow: var(--out-s);
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.rail-nav a:hover,
.totop:hover {
  box-shadow: var(--in);
}

.rail-nav a:active,
.totop:active {
  transform: scale(0.97);
}

.totop {
  justify-content: center;
  font-family: var(--cond);
  font-weight: 600;
  letter-spacing: 0.12em;
  background: linear-gradient(145deg, #f7e9ee, #e9dae3);
  box-shadow: var(--out-s);
}

/* ---------- 正文 ---------- */

.content {
  min-width: 0;
  max-width: 74ch;
}

.content > article {
  position: relative;
  margin: 0 0 26px;
  padding: 30px 26px 22px;
  border-radius: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(226, 236, 245, 0.5));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--out);
  border-top: 3px solid rgba(200, 224, 244, 0.95);
}

.content > article:nth-child(even) {
  border-top-color: rgba(245, 224, 232, 0.98);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(243, 230, 236, 0.5));
}

.content h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: clamp(1.5rem, 3.6vw, 2.15rem);
  line-height: 1.16;
  margin: 0 0 16px;
  text-shadow: -1px -1px 1px #ffffff;
}

.content h2::before {
  content: '';
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: linear-gradient(145deg, var(--ice), var(--rose));
  box-shadow: var(--out-s);
}

.content h2 > span {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 4px solid rgba(200, 224, 244, 0.85);
}

.content h3 {
  font-size: 1.32rem;
  margin: 1.4em 0 0.55em;
  color: #22303a;
}

.content h3 > span {
  display: inline-block;
  border-bottom: 3px solid rgba(245, 224, 232, 0.95);
  padding-bottom: 2px;
}

.content p {
  margin: 0 0 1em;
}

.content ul,
.content ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.content li {
  margin: 0.4em 0;
}

.content li::marker {
  color: #6f8ba1;
}

.content a {
  color: #16324a;
  text-decoration: none;
  border-bottom: 2px solid rgba(200, 224, 244, 1);
  transition: border-color 150ms ease, background 150ms ease;
}

.content a:hover {
  background: rgba(245, 224, 232, 0.75);
  border-bottom-color: var(--rose);
}

.content blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 5px solid var(--ice);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--in);
}

.content strong {
  font-weight: 600;
}

.content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.94em;
  padding: 1px 5px;
  border-radius: 6px;
  box-shadow: var(--in);
}

.content img {
  display: block;
  margin: 1.2em 0;
  border-radius: 12px;
  box-shadow: var(--out-s);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
}

.content th,
.content td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(23, 31, 38, 0.12);
}

/* ---------- 页脚：四栏横排 ---------- */

.foot {
  margin-top: 8px;
  padding: 40px 18px 34px;
  background: linear-gradient(180deg, #dbe8f3, #cbdeee);
  box-shadow: inset 0 10px 22px rgba(255, 255, 255, 0.75);
}

.foot-row {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1.4fr 0.7fr 0.9fr;
  gap: 22px;
  align-items: center;
}

.foot-brand {
  min-width: 0;
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}

.foot-big {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: -1px -1px 1px #ffffff, 2px 2px 3px rgba(23, 31, 38, 0.18);
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}

.foot-nav a:hover {
  border-bottom-color: var(--ink);
}

.foot-note,
.foot-copy {
  font-size: 0.92rem;
  color: #33424e;
  text-align: center;
}

/* ---------- 动效 ---------- */

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

.hero h1 {
  animation: rise 0.6s ease both;
}

.hero-desc {
  animation: rise 0.6s ease 0.09s both;
}

.hero-fig {
  animation: rise 0.7s ease 0.16s both;
}

.js .rv {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js .rv.in {
  opacity: 1;
  transform: none;
}

.js .content > article.in li {
  animation: rise 0.45s ease both;
}

.js .content > article.in li:nth-child(1) { animation-delay: 0.02s; }
.js .content > article.in li:nth-child(2) { animation-delay: 0.07s; }
.js .content > article.in li:nth-child(3) { animation-delay: 0.12s; }
.js .content > article.in li:nth-child(4) { animation-delay: 0.17s; }
.js .content > article.in li:nth-child(5) { animation-delay: 0.22s; }
.js .content > article.in li:nth-child(6) { animation-delay: 0.27s; }

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

  .hero h1,
  .hero-desc,
  .hero-fig,
  .js .content > article.in li {
    animation: none;
  }

  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .head-nav a,
  .rail-nav a,
  .totop {
    transition: none;
  }
}

/* ---------- 断点 ---------- */

@media (max-width: 901px) {
  .cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .rail {
    position: static;
    box-shadow: var(--out-s);
    border-top: 3px solid rgba(245, 224, 232, 0.95);
  }

  .rail-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .rail-nav a {
    flex: 1 1 auto;
    justify-content: center;
    font-size: 0.94rem;
  }

  .content {
    max-width: none;
  }

  .content > article {
    padding: 26px 20px 18px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16.5px;
  }

  .head-nav a {
    font-size: 1rem;
    padding: 7px 13px;
  }

  .hero {
    min-height: 88svh;
    padding-top: 30px;
    align-items: flex-start;
    text-align: left;
  }

  .hero-desc {
    max-width: none;
  }

  .hero-fig {
    max-width: none;
  }

  .foot {
    padding: 30px 16px 26px;
  }

  .foot-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    text-align: left;
  }

  .foot-note,
  .foot-copy {
    text-align: left;
  }

  .foot-nav a {
    font-size: 0.94rem;
  }
}

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

  .head-nav {
    gap: 6px;
  }

  .head-nav p.navgrp {
    gap: 6px;
  }

  .content h2 {
    gap: 9px;
  }
}

@media (min-width: 1280px) {
  .cols {
    grid-template-columns: 250px minmax(0, 1fr);
  }
}

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