@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --pink: #eb879c;
  --blush: #ffb6c1;
  --plum: #26171a;
  --ink-soft: #6f5359;
  --bg: #fbf2f4;
  --glass: rgba(255, 255, 255, 0.66);
  --line: rgba(38, 23, 26, 0.14);
  --edge: rgba(255, 255, 255, 0.86);
  --shadow: 0 1px 2px rgba(38, 23, 26, 0.06), 0 10px 26px -14px rgba(38, 23, 26, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-lift: 0 2px 4px rgba(38, 23, 26, 0.08), 0 18px 40px -18px rgba(38, 23, 26, 0.42);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  overflow-x: hidden;
  min-height: 100%;
  color: var(--plum);
  background:
    radial-gradient(1100px 520px at 84% -10%, rgba(255, 182, 193, 0.55), transparent 62%),
    radial-gradient(760px 480px at 4% 12%, rgba(235, 135, 156, 0.22), transparent 60%),
    var(--bg);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0.01em;
}

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

a { color: inherit; }

a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 3px solid #a94a63;
  outline-offset: 3px;
  border-radius: 8px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  line-height: 1.5;
  letter-spacing: 0.2em;
  color: #93596a;
}

/* ---------- 顶部：品牌行 + 菜单行 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 242, 244, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 18px 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-right: 10px;
  text-decoration: none;
  font-weight: 500;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.brand-t {
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.navrow {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.drawer { display: contents; }

.burger {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.burger::-webkit-details-marker { display: none; }

.burger::before {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  border-radius: 2px;
}

.burger:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }

.drawer[open] > .burger {
  position: fixed;
  top: 14px;
  left: 18px;
  z-index: 80;
  color: var(--plum);
  background: #fff;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--plum);
  background: linear-gradient(160deg, var(--blush), var(--pink));
  border: 1px solid rgba(38, 23, 26, 0.18);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }

.drawer-list {
  position: fixed;
  inset: 0;
  z-index: 70;
  margin: 0;
  padding: 88px 22px 36px;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  overflow-y: auto;
  color: #fdf0f3;
  background: rgba(38, 23, 26, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.drawer-list li { max-width: 640px; width: 100%; margin: 0 auto; }

.drawer-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 8px 18px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fdf0f3;
  text-decoration: none;
  font-size: 1.02rem;
  transition: background 0.22s ease, transform 0.22s ease;
}

.drawer-list a small {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: var(--blush);
}

.drawer-list a:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(3px);
}

.drawer-list a:focus-visible { outline-color: var(--blush); }

/* ---------- 主体网格：左栏 + 长文 ---------- */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 18px 64px;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 132px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.rail-t {
  margin: 0.15rem 0 0.7rem;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.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: 4px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 0.9rem;
  color: #4a3136;
  transition: background 0.22s ease, color 0.22s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: rgba(235, 135, 156, 0.22);
  color: var(--plum);
}

.doc { min-width: 0; }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 40px 26px;
  border-radius: var(--r-lg);
  background-image:
    radial-gradient(rgba(38, 23, 26, 0.15) 1px, transparent 1px),
    radial-gradient(520px 320px at 88% 4%, rgba(255, 182, 193, 0.55), transparent 68%);
  background-size: 20px 20px, 100% 100%;
  text-align: right;
  scroll-margin-top: 140px;
}

.hero-txt { width: 100%; }

.hero h1 {
  margin: 0.35rem 0 0.6rem;
  font-size: clamp(2rem, 6.6vw, 3.4rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.lede {
  margin: 0 0 0 auto;
  max-width: 34rem;
  font-size: 1rem;
  color: #4d3439;
}

.rotor {
  position: relative;
  display: block;
  height: 2.9rem;
  margin-top: 12px;
}

.rotor-i {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--plum);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.rotor-i.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.hero-fig { margin: 0; width: 100%; }

.hero-img,
.hero-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
}

/* ---------- 正文分节卡片 ---------- */

.doc > div:not(.hero) {
  margin-bottom: 24px;
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--glass);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  scroll-margin-top: 140px;
}

.doc > div > small {
  display: block;
  font-size: 0.74rem;
  line-height: 1.5;
  letter-spacing: 0.2em;
  color: #93596a;
  margin-bottom: 2px;
}

.doc h2 {
  margin: 0.1rem 0 0.7rem;
  font-size: clamp(1.28rem, 3.1vw, 1.72rem);
  line-height: 1.36;
  font-weight: 500;
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}

.doc h3 {
  margin: 1.3rem 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.5;
  font-weight: 500;
}

.doc p { margin: 0 0 0.95rem; }

.doc p:last-child,
.doc ul:last-child,
.doc ol:last-child { margin-bottom: 0; }

.doc a {
  color: #a2405a;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc ul,
.doc ol { margin: 0 0 1rem; padding-left: 1.25em; }

.doc li { margin-bottom: 0.35rem; }

.doc blockquote {
  margin: 1rem 0;
  padding: 12px 18px;
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgba(255, 182, 193, 0.24);
  color: #4a3136;
}

.doc img { border-radius: var(--r-md); }

.doc figure { margin: 1.1rem 0; }

.doc figure figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 6px;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.doc th,
.doc td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.doc th { background: rgba(255, 182, 193, 0.28); }

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

.foot {
  margin-top: 30px;
  padding: 40px 20px 18px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(180deg, #332025, var(--plum));
  color: #fbeef1;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 26px;
  max-width: 1200px;
  margin-inline: auto;
}

.foot .eyebrow { color: var(--blush); }

.foot-mark {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(2rem, 8.4vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: #fff;
  overflow-wrap: anywhere;
}

.foot-brand p {
  margin: 0;
  max-width: 34rem;
  font-size: 0.92rem;
  color: rgba(251, 238, 241, 0.78);
}

.foot-h {
  margin: 0.2rem 0 0.6rem;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.foot-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fbeef1;
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.22s ease;
}

.foot-nav a:hover { background: rgba(255, 255, 255, 0.12); }

.foot-end {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.84rem;
  color: rgba(251, 238, 241, 0.7);
}

.foot-end .copy { margin: 0; }

.foot-end a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  color: var(--blush);
  text-decoration: none;
}

/* ---------- 滚动出现 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

@media (max-width: 900px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px 14px 48px;
  }

  .rail { position: static; padding: 14px; }

  .rail-list { display: flex; flex-wrap: wrap; gap: 4px; }

  .rail-list a { padding: 4px 12px; }

  .hero {
    min-height: auto;
    padding: 46px 18px 28px;
    gap: 20px;
  }

  .doc > div:not(.hero) { padding: 22px 16px; }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 30px 16px 16px;
  }
}

@media (max-width: 480px) {
  .burger { padding: 0 16px; }
  .cta { padding: 0 16px; }
  .drawer-list { padding: 84px 14px 28px; }
  .drawer[open] > .burger { left: 14px; }
  .foot-end { justify-content: flex-start; }
}

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

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

  .rotor-i,
  .burger,
  .cta,
  .drawer-list a,
  .rail-list a,
  .foot-nav a { transition: none; }
}

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