:root {
  --ink: #171f26;
  --ink-2: #1d2731;
  --ink-3: #22303c;
  --blue: #c8e0f4;
  --pink: #f5e0e8;
  --line: #efb4cd;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --pixel: "VT323", "Press Start 2P", ui-monospace, "Courier New", monospace;
  --r: 10px;
  --lift-dark: 6px 6px 16px rgba(4, 9, 13, 0.62), -5px -5px 14px rgba(150, 190, 226, 0.10);
  --lift-light: 7px 7px 20px rgba(8, 15, 21, 0.45), -6px -6px 16px rgba(255, 255, 255, 0.65);
  --press-dark: inset 4px 4px 9px rgba(4, 9, 13, 0.7), inset -4px -4px 9px rgba(150, 190, 226, 0.09);
}

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

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

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 16% -4%, rgba(200, 224, 244, 0.16), transparent 52%),
    radial-gradient(circle at 94% 10%, rgba(245, 224, 232, 0.11), transparent 46%),
    var(--ink);
  background-attachment: fixed;
  color: var(--blue);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

/* ---------- 左侧软浮雕导航条 ---------- */
.rail {
  grid-column: 1;
  grid-row: 1 / span 2;
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 15px 20px;
  background: linear-gradient(165deg, var(--ink-3), #19222b 70%);
  box-shadow: var(--lift-dark), inset -1px 0 0 rgba(245, 224, 232, 0.07);
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r);
  background: linear-gradient(145deg, #253543, #1a232c);
  box-shadow: var(--lift-dark);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.brand:active {
  transform: scale(0.98);
  box-shadow: var(--press-dark);
}

.brand-txt {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.08em;
  color: var(--pink);
  white-space: nowrap;
}

.mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(145deg, var(--pink), var(--blue));
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.55), inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

.mark.glyph {
  display: block;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 2px, transparent 2px),
    linear-gradient(145deg, var(--pink), #b9d6ec);
  background-size: 10px 10px, 100% 100%;
}

.rail nav {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #3a4d5c transparent;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 6px;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: 16px;
  line-height: 1.3;
  color: #d7e7f4;
  background: linear-gradient(145deg, #212d38, #1a232b);
  box-shadow: 4px 4px 11px rgba(3, 8, 12, 0.55), -3px -3px 9px rgba(150, 190, 226, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.menu a:hover,
.menu a:focus-visible {
  color: #ffffff;
  box-shadow: 5px 5px 13px rgba(3, 8, 12, 0.66), -4px -4px 12px rgba(180, 215, 245, 0.16);
}

.menu a:active {
  transform: scale(0.975);
  box-shadow: var(--press-dark);
}

.ico {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  border-radius: 4px;
  background: linear-gradient(145deg, #e2f1fd, #a6c6de);
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.55), inset -1px -1px 2px rgba(255, 255, 255, 0.65);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #1a232b;
  background: linear-gradient(145deg, #fcebf2, #efcbdb);
  box-shadow: var(--lift-light);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.55), -6px -6px 16px rgba(255, 255, 255, 0.4);
}

.cta:active {
  transform: scale(0.97);
  box-shadow: inset 4px 4px 9px rgba(146, 100, 122, 0.45), inset -4px -4px 9px rgba(255, 255, 255, 0.8);
}

/* ---------- 主区 ---------- */
main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-bottom: 12px;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(300px, 45vh, 430px);
  padding: 44px 0 42px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--pink), var(--blue) 78%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(rgba(23, 31, 38, 0.34) 1px, transparent 1px);
  background-size: 13px 13px;
  opacity: 0.55;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(245, 224, 232, 0.28), rgba(23, 31, 38, 0.34));
  pointer-events: none;
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(100% - 2 * clamp(20px, 4vw, 48px), 820px);
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.4vw, 2.9rem);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #101820;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
}

.hero h2 {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: #2a3a47;
}

.hero .subtitle {
  margin-top: 10px;
  max-width: 54ch;
  font-size: 16px;
  line-height: 1.7;
  color: #1d2a34;
}

/* ---------- 正文面板 ---------- */
div > article:not(.hero) {
  width: min(100% - 2 * clamp(16px, 3.2vw, 44px), 820px);
  margin: 22px auto 0;
  padding: 26px clamp(18px, 3vw, 34px) 30px;
  border-radius: var(--r);
  border-bottom: 3px solid var(--line);
  background: linear-gradient(145deg, #dcebf8, #f7e8ef);
  color: #1b242c;
  box-shadow: var(--lift-light);
  scroll-margin-top: 24px;
}

div > article:not(.hero):last-child {
  margin-bottom: 26px;
}

div > article:not(.hero) h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.55em;
  font-size: 1.32rem;
  line-height: 1.42;
  font-weight: 800;
  color: #121b22;
  letter-spacing: 0.01em;
}

div > article:not(.hero) h2::before {
  content: "";
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(145deg, #ffd6e6, #e3a5c0);
  box-shadow: 2px 2px 5px rgba(23, 31, 38, 0.3), -1px -1px 4px rgba(255, 255, 255, 0.9);
}

div > article:not(.hero) h3 {
  margin: 1.4em 0 0.5em;
  font-size: 1.08rem;
  line-height: 1.5;
  font-weight: 700;
  color: #16202a;
}

div > article:not(.hero) p {
  margin: 0.85em 0;
  line-height: 1.8;
  color: #21303b;
}

div > article:not(.hero) .subtitle {
  margin-top: -0.2em;
  margin-bottom: 1em;
  color: #46606f;
  font-size: 16px;
}

div > article:not(.hero) strong {
  color: #101a22;
}

div > article:not(.hero) a {
  color: #1a567c;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

div > article:not(.hero) ul,
div > article:not(.hero) ol {
  margin: 1em 0;
  padding-left: 1.45em;
}

div > article:not(.hero) ul {
  list-style: disc;
}

div > article:not(.hero) ol {
  list-style: decimal;
}

div > article:not(.hero) li {
  margin: 0.4em 0;
  line-height: 1.75;
}

div > article:not(.hero) li::marker {
  color: #b4738f;
}

div > article:not(.hero) blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-radius: var(--r);
  border-left: 3px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 3px 3px 8px rgba(23, 31, 38, 0.1), inset -3px -3px 8px rgba(255, 255, 255, 0.8);
  color: #2b3c48;
}

div > article:not(.hero) blockquote p:first-child {
  margin-top: 0;
}

div > article:not(.hero) blockquote p:last-child {
  margin-bottom: 0;
}

div > article:not(.hero) hr {
  height: 0;
  margin: 1.6em 0;
  border: 0;
  border-top: 1px solid rgba(23, 31, 38, 0.16);
}

div > article:not(.hero) table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 16px;
}

div > article:not(.hero) th,
div > article:not(.hero) td {
  padding: 9px 11px;
  text-align: left;
  border-bottom: 1px solid rgba(23, 31, 38, 0.14);
}

div > article:not(.hero) th {
  background: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  color: #14202a;
}

div > article:not(.hero) code {
  font-family: var(--pixel);
  font-size: 1.05em;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.65);
  color: #123243;
}

div > article:not(.hero) img {
  width: 100%;
  border-radius: var(--r);
  box-shadow: 5px 5px 14px rgba(23, 31, 38, 0.28);
}

/* ---------- 页脚三栏 ---------- */
footer {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  align-items: start;
  gap: 22px 26px;
  min-width: 0;
  max-width: 100%;
  padding: 32px clamp(16px, 3.2vw, 44px) 42px;
  border-top: 1px solid rgba(245, 224, 232, 0.09);
  font-size: 16px;
  color: #a4c0d5;
}

footer article {
  min-width: 0;
}

.f-brand .brand-txt {
  display: inline-block;
  font-size: 18px;
  color: var(--pink);
}

.f-brand .subtitle {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.65;
  color: #8fadc3;
}

.f-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}

.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 2px;
  color: #cfe4f3;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.f-links a:hover,
.f-links a:focus-visible {
  color: #ffffff;
}

.f-copy {
  text-align: right;
}

.f-copy p {
  font-family: var(--pixel);
  font-size: 1.15rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
  color: #7f9fb6;
  white-space: nowrap;
}

/* ---------- 动效 ---------- */
.js .rail nav li.drop {
  animation: dropIn 0.45s ease both;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.js .hero-copy.rise {
  animation: riseIn 0.6s ease both;
}

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

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ---------- 移动端 ---------- */
@media (max-width: 880px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
  }

  .rail {
    grid-column: 1;
    grid-row: auto;
    position: static;
    height: auto;
    width: 100%;
    max-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 14px;
    box-shadow: 0 6px 18px rgba(3, 8, 12, 0.55);
  }

  .rail nav {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .menu {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    width: max-content;
    padding-bottom: 0;
  }

  .menu a {
    white-space: nowrap;
    padding: 11px 14px;
    font-size: 16px;
  }

  .cta {
    order: 2;
    margin-left: auto;
    padding: 11px 18px;
    max-width: 60%;
  }

  main {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
  }

  .hero {
    min-height: clamp(260px, 40vh, 360px);
    padding: 30px 0 32px;
  }

  .hero-copy {
    width: min(100% - 28px, 820px);
  }

  div > article:not(.hero) {
    width: min(100% - 28px, 820px);
    margin-top: 16px;
    padding: 22px 18px 24px;
    scroll-margin-top: 16px;
  }

  footer {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 26px 18px 36px;
  }

  .f-copy {
    text-align: left;
  }

  .f-copy p {
    white-space: normal;
  }
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

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