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

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

:root {
  --ink: #1f1726;
  --ink-lift: #2b2033;
  --plum: #56228b;
  --plum-lift: #8f63c9;
  --clay: #8b4513;
  --clay-lift: #c98343;
  --paper: #f1eaf7;
  --paper-dim: #bfb1ce;
  --line: rgba(213, 194, 232, 0.16);
  --line-soft: rgba(213, 194, 232, 0.09);
  --shadow: 0 22px 48px -26px rgba(8, 3, 14, 0.95);
  --r-blob: 30px 30px 74px 30px;
  --r-pill: 24px;
}

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

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(920px 520px at 82% -10%, rgba(86, 34, 139, 0.44), transparent 62%),
    radial-gradient(700px 440px at 2% 22%, rgba(139, 69, 19, 0.26), transparent 68%),
    radial-gradient(600px 600px at 96% 78%, rgba(86, 34, 139, 0.18), transparent 70%),
    var(--ink);
  color: var(--paper);
  font-family: 'Inter', 'Noto Sans SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--paper); text-decoration: none; }
menu { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

.brand:focus-visible,
.dock__toggle:focus-visible,
.dock__menu a:focus-visible,
.rail__nav a:focus-visible,
.baseboard__col a:focus-visible,
.prose a:focus-visible {
  outline: 2px solid var(--clay-lift);
  outline-offset: 3px;
  border-radius: 12px;
}

/* ---------- 顶部细条 ---------- */
.annunciator {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(90deg, rgba(86, 34, 139, 0.55), rgba(139, 69, 19, 0.42));
  overflow: hidden;
}

.annunciator__line {
  max-width: 1180px;
  margin: 0 auto;
  padding: 9px 24px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  color: #f6f0fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 页头 ---------- */
.masthead {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 4px 12px 4px 4px;
  border-radius: var(--r-pill);
}

.brand__logo {
  width: 38px;
  height: 38px;
  border-radius: 14px 14px 22px 14px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.brand__word {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.dock { position: relative; }

.dock__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(9px);
  cursor: pointer;
  font-size: 0.94rem;
  letter-spacing: 0.1em;
  list-style: none;
}

.dock__toggle::-webkit-details-marker { display: none; }
.dock__toggle::marker { content: ''; }

.dock__bars {
  width: 15px;
  height: 9px;
  border-top: 2px solid var(--clay-lift);
  border-bottom: 2px solid var(--clay-lift);
}

.dock__menu { display: flex; flex-wrap: wrap; gap: 2px; }

.dock__menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: var(--r-pill);
  font-size: 0.93rem;
  color: var(--paper-dim);
  transition: color 0.22s ease, background 0.22s ease;
}

.dock__menu a:hover { color: var(--paper); background: rgba(255, 255, 255, 0.07); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 45vh;
  padding: 44px 24px 0;
  text-align: center;
  background-image: radial-gradient(rgba(213, 194, 232, 0.17) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: center top;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(70% 70% at 50% 40%, transparent 30%, rgba(31, 23, 38, 0.72) 100%);
}

.hero__title {
  position: relative;
  z-index: 2;
  max-width: 20em;
  margin: 0;
  font-size: clamp(1.95rem, 6.6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.022em;
  text-wrap: balance;
  animation: rise 0.72s ease both;
}

.hero__media {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  height: 26vh;
  min-height: 148px;
  margin: 0;
  overflow: hidden;
  border-radius: 68px 68px 0 0;
  box-shadow: var(--shadow);
}

.hero__pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform;
}

/* ---------- 主体 ---------- */
.deck {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 24px 72px;
}

div[id] { scroll-margin-top: 28px; }

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 22px;
  align-self: start;
  padding: 22px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-blob);
  background: linear-gradient(165deg, rgba(86, 34, 139, 0.34), rgba(31, 23, 38, 0.36));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.rail__cap {
  display: flex;
  align-items: center;
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--clay-lift);
}

.rail__capText {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.rail__capText::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50% 50% 50% 22%;
  background: var(--clay-lift);
}

.rail__cap--top {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.rail__cap--top .rail__capText::before {
  background: var(--plum-lift);
  border-radius: 2px 50% 50% 50%;
}

.rail__cap--top a {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.rail__nav { display: flex; flex-direction: column; }

.rail__nav li {
  animation: rise 0.5s ease both;
}

.rail__nav li:nth-child(1) { animation-delay: 0.04s; }
.rail__nav li:nth-child(2) { animation-delay: 0.1s; }
.rail__nav li:nth-child(3) { animation-delay: 0.16s; }
.rail__nav li:nth-child(4) { animation-delay: 0.22s; }
.rail__nav li:nth-child(5) { animation-delay: 0.28s; }
.rail__nav li:nth-child(6) { animation-delay: 0.34s; }
.rail__nav li:nth-child(7) { animation-delay: 0.4s; }

.rail__nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 16px 16px 20px 16px;
  font-size: 0.93rem;
  color: var(--paper-dim);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rail__nav a:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(3px);
}

/* ---------- 正文 ---------- */
.prose {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
  max-width: 764px;
}

.prose > div {
  padding: 32px 30px 30px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(157deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  backdrop-filter: blur(7px);
  box-shadow: var(--shadow);
}

.prose > div:nth-child(even) {
  background: linear-gradient(157deg, rgba(139, 69, 19, 0.16), rgba(255, 255, 255, 0.015));
}

.prose > div > :first-child { margin-top: 0; }
.prose > div > :last-child { margin-bottom: 0; }

.prose h2 {
  margin: 0 0 15px;
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: #fff;
}

.prose h2 > span {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
}

.prose h2 > span::before {
  content: '';
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 0.52em;
  border-radius: 50% 50% 50% 20%;
  background: linear-gradient(140deg, var(--clay-lift), var(--plum-lift));
}

.prose h3 {
  margin: 1.5em 0 0.55em;
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.5;
  color: #fff;
}

.prose h3 > span {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
}

.prose h3 > span::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 0.6em;
  border-radius: 50%;
  background: var(--clay-lift);
}

.prose p { margin: 0 0 1.05em; }

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

.prose li { margin: 0.38em 0; }
.prose li::marker { color: var(--clay-lift); }

.prose a {
  color: var(--clay-lift);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover { color: #f0b784; }

.prose strong { color: #fff; font-weight: 600; }

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 20px 20px 34px 20px;
}

.prose time {
  display: inline-block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 20px;
  border-left: 3px solid var(--clay);
  border-radius: 0 18px 18px 0;
  background: rgba(139, 69, 19, 0.15);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.prose th { color: #fff; font-weight: 600; }

/* ---------- 页脚 ---------- */
.baseboard {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 24px 40px;
  border-top: 1px solid var(--line);
}

.baseboard__mark {
  grid-column: 1 / -1;
  margin: 0 0 22px;
  font-size: clamp(2.3rem, 11vw, 5.6rem);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: rgba(241, 234, 247, 0.16);
}

.baseboard__col {
  margin: 0;
  font-size: 0.95rem;
}

.baseboard__col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper-dim);
  transition: color 0.2s ease;
}

.baseboard__col a:hover { color: var(--paper); }

.baseboard__note {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  color: rgba(191, 177, 206, 0.72);
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 899px) {
  .hero { min-height: 40vh; padding-top: 34px; gap: 18px; }

  .dock__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 9px);
    z-index: 45;
    flex-direction: column;
    flex-wrap: nowrap;
    min-width: 208px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 24px 24px 30px 24px;
    background: rgba(43, 32, 51, 0.98);
    box-shadow: var(--shadow);
  }

  .dock__menu a {
    display: flex;
    min-height: 46px;
    padding: 0 14px;
  }

  .deck {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 28px 20px 56px;
  }

  .rail {
    position: static;
    border-radius: 24px 24px 40px 24px;
  }

  .rail__nav a { min-height: 44px; }

  .prose { max-width: none; }

  .baseboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 42px 20px 34px;
  }
}

@media (max-width: 420px) {
  body { font-size: 16.5px; }
  .masthead { padding: 12px 16px; }
  .annunciator__line { padding: 9px 16px; font-size: 0.78rem; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero__title { font-size: clamp(1.78rem, 8.4vw, 2.4rem); }
  .prose > div { padding: 26px 20px 24px; }
  .deck { padding-left: 16px; padding-right: 16px; }
  .baseboard { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__title,
  .rail__nav li { animation: none; }
  .hero__pic { transform: none; }
  .rail__nav a { transition: none; }
}

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