@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');

:root {
  --ink: #26171a;
  --ink2: #5b4146;
  --pink: #eb879c;
  --pink2: #ffb6c1;
  --deep: #b8405e;
  --paper: #fdf2f5;
  --card: #ffffff;
  --line: #f4d6de;
  --sh1: 0 2px 4px rgba(38, 23, 26, .06);
  --sh2: 0 12px 30px -14px rgba(184, 64, 94, .3);
  --hud: Orbitron, "JetBrains Mono", ui-monospace, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "JetBrains Mono", ui-monospace, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  overflow-x: hidden;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
  border-radius: 8px;
}

hr {
  height: 2px;
  border: 0;
  margin: 10px 0 16px;
  background: linear-gradient(90deg, var(--pink), rgba(235, 135, 156, 0));
}

/* ---------- 顶栏 ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: block;
  padding: 10px 16px 12px;
  background: rgba(253, 242, 245, .95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(38, 23, 26, .07), 0 8px 24px -18px rgba(38, 23, 26, .5);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font-family: var(--hud);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .08em;
  color: var(--ink);
  text-decoration: none;
}

.brand::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(235, 135, 156, .3);
}

.menu-box { display: block; margin-top: 4px; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--sh1);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 240ms ease, color 240ms ease;
}

.menu-btn::-webkit-details-marker { display: none; }
.menu-btn::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-right: 2px solid var(--deep);
  border-bottom: 2px solid var(--deep);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 220ms ease;
}

.menu-box[open] .menu-btn::after { transform: rotate(-135deg) translateY(-2px); }

.menu-box:not([open]) .rail { display: none; }

.rail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--sh1);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background 240ms ease, color 240ms ease, transform 240ms ease;
}

.rail a:active { background: var(--pink2); transform: translateY(1px); }

.rail-r li:last-child a {
  background: var(--pink);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--sh2);
}

/* ---------- 首屏 ---------- */

.wrap { overflow-x: clip; }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-height: 100svh;
  overflow: hidden;
  border-radius: 0 0 0 90px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 182, 193, .12) 0 1px, transparent 1px 44px),
    linear-gradient(152deg, #26171a 0%, #4c2630 52%, #8d3c51 100%);
  color: #fff3f6;
}

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

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(104deg, rgba(38, 23, 26, .88) 6%, rgba(38, 23, 26, .46) 58%, rgba(38, 23, 26, .8) 100%);
}

.hero-in {
  position: relative;
  z-index: 2;
  margin-left: auto;
  max-width: 780px;
  padding: 13vh 20px 90px;
  text-align: right;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--hud);
  font-weight: 900;
  font-size: clamp(30px, 8.4vw, 64px);
  line-height: 1.16;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(38, 23, 26, .55);
}

.hero-sub {
  margin: 0 0 0 auto;
  max-width: 32em;
  font-size: 16px;
  line-height: 1.7;
  color: #ffd7e0;
}

.hero-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 20px;
  background: linear-gradient(90deg, var(--pink), var(--pink2) 62%, var(--pink));
  clip-path: polygon(0 100%, 100% 22%, 100% 100%);
}

/* ---------- 主体 ---------- */

.stage {
  display: block;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 44px;
}

.toc {
  margin-bottom: 18px;
  padding: 14px 14px 10px;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--sh1), var(--sh2);
}

.toc h2 {
  margin: 0;
  font-family: var(--hud);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .18em;
  color: var(--ink2);
}

.toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.toc-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink2);
  font-size: 16px;
  text-decoration: none;
  transition: background 220ms ease, color 220ms ease;
}

.toc-list a:hover { background: rgba(235, 135, 156, .16); color: var(--deep); }

.doc { min-width: 0; }

.doc > div {
  margin: 0 0 14px;
  padding: 24px 18px 26px;
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--sh1), var(--sh2);
  animation: rise 280ms ease both;
}

.doc > div:nth-child(2) { animation-delay: 40ms; }
.doc > div:nth-child(3) { animation-delay: 80ms; }
.doc > div:nth-child(4) { animation-delay: 120ms; }
.doc > div:nth-child(5) { animation-delay: 160ms; }
.doc > div:nth-child(6) { animation-delay: 200ms; }
.doc > div:nth-child(7) { animation-delay: 240ms; }

.doc div[id] { scroll-margin-top: 110px; }

.doc h2 {
  margin: 0;
  font-family: var(--hud);
  font-weight: 900;
  font-size: clamp(21px, 5vw, 30px);
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--ink);
}

.doc h3 {
  margin: 22px 0 6px;
  font-family: var(--hud);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.45;
  color: var(--deep);
}

.doc p { margin: 12px 0; }

.doc a {
  color: var(--deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.doc strong { color: var(--deep); font-weight: 500; }

.doc ul,
.doc ol { margin: 12px 0; padding-left: 22px; }

.doc li { margin: 6px 0; }

.doc blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 4px;
  background: #fff2f5;
  color: var(--ink2);
}

.doc img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--sh1);
}

.doc figure { margin: 16px 0; }

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

/* ---------- 页脚 ---------- */

.foot {
  margin-top: 18px;
  padding: 32px 18px 20px;
  border-radius: 4px 4px 0 0;
  background: var(--ink);
  color: #ffdfe6;
}

.foot-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.foot dl { margin: 0; }

.foot dt {
  margin-bottom: 4px;
  font-family: var(--hud);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .16em;
  color: var(--pink2);
}

.foot dd { margin: 0; font-size: 16px; }

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #ffe9ee;
  text-decoration: none;
  transition: color 220ms ease;
}

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

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  max-width: 1180px;
  margin: 22px auto 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 182, 193, .3);
}

.foot-base p { margin: 0; font-size: 16px; }

.copy { color: #ffc9d5; }

/* ---------- 中屏 ---------- */

@media (min-width: 600px) {
  .hero-in { padding: 16vh 34px 100px; }
  .stage { padding: 26px 24px 54px; }
  .doc > div { padding: 30px 26px 30px; }
  .foot { padding: 40px 26px 22px; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 桌面 ---------- */

@media (min-width: 920px) {
  .bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    padding: 12px 32px;
  }

  .menu-box { display: contents; }
  .menu-box:not([open]) .rail { display: flex; }
  .menu-btn { display: none; }

  .rail {
    flex-wrap: nowrap;
    gap: 2px;
    margin: 0;
    animation: none;
  }

  .rail-l { grid-column: 1; justify-content: flex-end; }
  .rail-r { grid-column: 3; justify-content: flex-start; }

  .rail a {
    padding: 0 11px;
    background: transparent;
    box-shadow: none;
    color: var(--ink2);
    white-space: nowrap;
  }

  .rail a:hover {
    background: rgba(235, 135, 156, .18);
    color: var(--deep);
    transform: translateY(-1px);
  }

  .rail-r li:last-child a {
    padding: 0 18px;
    background: var(--pink);
    color: var(--ink);
    box-shadow: var(--sh2);
  }

  .rail-r li:last-child a:hover {
    background: var(--pink2);
    color: var(--ink);
  }

  .brand {
    grid-column: 2;
    justify-self: center;
    padding: 0 14px;
  }

  .hero { border-radius: 0 0 0 150px; }
  .hero-in { padding: 17vh 64px 110px; }

  .stage {
    display: grid;
    grid-template-columns: 216px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
    padding: 44px 32px 70px;
  }

  .toc {
    position: sticky;
    top: 100px;
    margin-bottom: 0;
  }

  .toc-list { flex-direction: column; gap: 2px; }

  .doc > div { padding: 34px 34px 34px; }

  .foot { padding: 46px 32px 22px; }
}

@media (min-width: 1200px) {
  .hero-in { padding-right: 90px; }
}

/* ---------- 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .doc > div { animation: none; }
  .rail a,
  .toc-list a,
  .menu-btn,
  .menu-btn::after,
  .foot a { transition: none; }
}
</｜DSML｜ parameter>
</｜DSML｜ invoke>
</｜DSML｜ calls>

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