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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --soft: #f4f4f1;
  --line: rgba(0, 0, 0, 0.14);
  --hair: rgba(0, 0, 0, 0.55);
  --u: 8px;
  --pad: 1.25rem;
  --sans: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --serif: 'Libre Bodoni', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 14px 30px -16px rgba(0, 0, 0, 0.35);
}

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

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

body {
  margin: 0;
  padding-bottom: 13rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

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

p { margin: 0 0 1.15rem; }

.skip {
  position: absolute;
  top: -4rem;
  left: 0;
  z-index: 90;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 1rem;
}

.skip:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- 通用药丸 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pill:hover,
.pill:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.pill--cta {
  background: var(--ink);
  color: var(--paper);
}

.pill--cta:hover,
.pill--cta:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--u);
  align-content: start;
  min-height: 100vh;
  padding: clamp(2.5rem, 8vh, 6rem) var(--pad) clamp(4rem, 12vh, 8rem);
  border-bottom: 1px solid var(--ink);
}

.hero__text {
  grid-column: 1 / 7;
  min-width: 0;
}

.hero--text .hero__text { grid-column: 1 / 10; }

.hero__brand {
  margin: 0 0 2.25rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  line-height: 1.5;
}

.hero__title {
  margin: 0 0 1.6rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 7.4vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero__desc {
  max-width: 32ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.72);
}

.hero__fig {
  grid-column: 7 / 13;
  position: relative;
  min-height: 56vh;
  align-self: start;
}

.hero__shot {
  position: absolute;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__shot--1 {
  top: 0;
  left: 0;
  width: 74%;
}

.hero__shot--2 {
  right: 0;
  bottom: 6%;
  width: 52%;
}

/* ---------- 主体 ---------- */
.doc {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: calc(var(--u) * 3);
  padding: clamp(3rem, 7vh, 5rem) var(--pad) clamp(3rem, 7vh, 5rem);
}

.prose {
  grid-column: 1 / 9;
  min-width: 0;
  font-size: 1.0625rem;
}

.prose > article {
  padding: clamp(2.5rem, 6vh, 4.5rem) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 2rem;
}

.prose > article:first-child {
  padding-top: 0;
  border-top: 0;
}

.prose h2,
.prose h3 {
  position: relative;
  margin: 0 0 1.15rem;
  padding-left: 1.5rem;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.prose h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.prose h2::before,
.prose h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 2px;
  height: 1em;
  background: var(--ink);
}

.prose h2 > span,
.prose h3 > span { display: block; }

.prose p { max-width: 66ch; }

.prose ul,
.prose ol {
  margin: 0 0 1.3rem;
  padding-left: 1.4rem;
}

.prose li {
  margin-bottom: 0.45rem;
  line-height: 1.75;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose strong { font-weight: 700; }

.prose img,
.prose figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.prose figure { margin: 1.5rem 0; }

.prose blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--soft);
}

.prose blockquote p:last-child { margin-bottom: 0; }

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

.prose th,
.prose td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th { font-weight: 700; }

.prose code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--soft);
  font-size: 0.95em;
}

/* ---------- 右侧栏 ---------- */
.rail {
  grid-column: 10 / 13;
  align-self: start;
  position: sticky;
  top: 1.5rem;
  display: grid;
  gap: 1rem;
}

.rail__block {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.rail__h {
  margin: 0 0 0.6rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.4;
}

.rail__h > span { display: block; }

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

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.15rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
  text-decoration: none;
}

.rail__list li:last-child a { border-bottom: 0; }

.rail__list a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  gap: clamp(2rem, 5vh, 3.5rem);
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--pad) 2.5rem;
  border-top: 1px solid var(--ink);
}

.foot__h {
  margin: 0 0 1.5rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 7vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.foot__h > span { display: block; }

.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.foot dl { margin: 0; }

.foot dt {
  margin-bottom: 0.6rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.foot dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.foot dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.2rem 0;
  text-decoration: none;
}

.foot dd a:hover { text-decoration: underline; text-underline-offset: 4px; }

.foot__copy {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

/* ---------- 底部固定导航 ---------- */
.nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem calc(0.6rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--ink);
  backdrop-filter: blur(6px);
}

.nav__list {
  order: 2;
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__brand {
  order: 0;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.nav__logo {
  width: auto;
  height: 26px;
}

.nav__word { font-size: 1rem; }

.nav__cta { order: 1; }

.nav a[aria-current] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.rail__list li:nth-child(1) a { transition-delay: 0.02s; }
.rail__list li:nth-child(2) a { transition-delay: 0.05s; }
.rail__list li:nth-child(3) a { transition-delay: 0.08s; }
.rail__list li:nth-child(4) a { transition-delay: 0.11s; }
.rail__list li:nth-child(5) a { transition-delay: 0.14s; }
.rail__list li:nth-child(6) a { transition-delay: 0.17s; }
.rail__list li:nth-child(7) a { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill { transition: none; }
}

/* ---------- 断点 ---------- */
@media (max-width: 899px) {
  .hero__fig { grid-column: 1 / 13; margin-top: 2.5rem; min-height: 46vh; }
  .hero__text { grid-column: 1 / 13; }
  .hero--text .hero__text { grid-column: 1 / 13; }

  .doc {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .prose,
  .rail { grid-column: 1 / -1; }

  .rail { position: static; }
}

@media (min-width: 900px) {
  :root { --pad: 3rem; }

  body { padding-bottom: 8.5rem; }

  .nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 0.7rem 2rem calc(0.7rem + env(safe-area-inset-bottom));
  }

  .nav__list {
    order: 0;
    flex-basis: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .nav__brand { order: 0; flex: 0 0 auto; grid-column: 2; justify-self: center; }
  .nav__cta { order: 0; grid-column: 4; justify-self: end; }
  .nav__list--l { grid-column: 1; justify-self: start; }
  .nav__list--r { grid-column: 3; justify-self: end; }
}

@media (max-width: 420px) {
  .nav__list { gap: 0.3rem; }
  .pill { padding: 0.5rem 0.75rem; }
  .foot__cols { gap: 0.9rem; }
}

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