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

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --ash: #5c5c5c;
  --rule: #d9d9d4;
  --sand: #f2f2ef;
  --dock: 78px;
}

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

body {
  margin: 0;
  padding-bottom: calc(var(--dock) + 30px);
  background: var(--paper);
  color: var(--ink);
  font-family: Lora, Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: Raleway, "PingFang SC", "Noto Sans SC", sans-serif;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #000;
  color: #fff;
  border-top: 1px solid #3a3a3a;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
}

.dock-in {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.3rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: #fff;
  text-decoration: none;
  font-family: Raleway, "PingFang SC", sans-serif;
  font-size: 16px;
  letter-spacing: 0.06em;
}

.brand-mark { width: 24px; height: 24px; object-fit: contain; }

.dock-nav { display: flex; align-items: center; gap: 0.1rem; }

.grp { position: relative; }

.grp > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.65rem;
  cursor: pointer;
  font-family: Raleway, "PingFang SC", sans-serif;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
}

.grp > summary::-webkit-details-marker { display: none; }

.grp > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(45deg) translateY(-2px);
}

.grp[open] > summary { background: #fff; color: #000; border-color: #fff; }
.grp[open] > summary::after { border-color: #000; transform: rotate(-135deg) translateY(-1px); }

.grp > menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  min-width: 184px;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #000;
  border: 1px solid #fff;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

.grp > menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.1rem 0.95rem;
  color: #fff;
  text-decoration: none;
  font-family: Raleway, "PingFang SC", sans-serif;
  font-size: 16px;
}

.grp > menu a:hover,
.grp > menu a:focus-visible { background: #fff; color: #000; }

.dock-nav .grp:last-child > menu { left: auto; right: 0; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 calc(9vh + 96px);
  background: #000;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: radial-gradient(circle, #fff 1px, transparent 1.2px);
  background-size: 22px 22px;
  opacity: 0.13;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 8vh;
  background: var(--paper);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 3;
}

.hero-img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(1) contrast(1.12);
  opacity: 0.58;
  z-index: 0;
  will-change: transform;
}

.hero-txt {
  position: relative;
  z-index: 2;
  padding: 0 clamp(1.2rem, 5vw, 5rem);
  text-align: right;
}

.hero h1 {
  font-size: clamp(2rem, 6.4vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.lede {
  max-width: 62ch;
  margin: 0 0 0 auto;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #dcdcdc;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.6);
}

/* ---------- 主体 ---------- */
main { padding: 2.4rem 0 0; }

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.6rem);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.4rem;
}

.prose { min-width: 0; }

.prose article {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-bottom: 4px solid var(--ink);
  border-radius: 10px;
  padding: 1.5rem 1.25rem 1.8rem;
  margin: 0 0 2.2rem;
  scroll-margin-top: 22px;
}

.prose h2 { font-size: clamp(1.32rem, 2.6vw, 1.82rem); margin: 0 0 0.7rem; }
.prose h3 { font-size: 1.1rem; letter-spacing: 0; margin: 1.4rem 0 0.5rem; }
.prose p { margin: 0 0 1.05em; }
.prose ul, .prose ol { margin: 0 0 1.05em; padding-left: 1.25em; }
.prose li { margin: 0 0 0.42em; }

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

.prose a:hover { background: var(--ink); color: #fff; text-decoration: none; }

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.15rem 0 0.15rem 1.05rem;
  border-left: 4px solid var(--ink);
  font-size: 1.14em;
  font-style: italic;
}

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

.prose figure { margin: 1.4rem 0; }
.prose figcaption {
  font-family: Raleway, sans-serif;
  font-size: 14px;
  color: var(--ash);
  margin-top: 0.5rem;
}

.prose img { width: 100%; height: auto; border-radius: 10px; filter: grayscale(1); }

.prose article > small,
.side > small {
  display: block;
  font-family: Raleway, "PingFang SC", sans-serif;
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--ash);
  margin: 0 0 0.35rem;
}

/* ---------- 侧栏 ---------- */
.side {
  border-top: 4px solid var(--ink);
  padding-top: 0.9rem;
}

.side h2 { font-size: 1.12rem; margin: 0 0 0.8rem; }

.side ol {
  list-style: none;
  counter-reset: toc;
  margin: 0;
  padding: 0;
}

.side li { counter-increment: toc; }

.side a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.2rem 0;
  border-bottom: 1px solid var(--sand);
  text-decoration: none;
  font-size: 16px;
}

.side a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: Raleway, sans-serif;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ash);
}

.side a:hover { background: var(--ink); color: #fff; }

/* ---------- 页脚 ---------- */
footer {
  margin-top: 2.4rem;
  padding: 2.6rem clamp(1rem, 4vw, 2.6rem) 1.4rem;
  background: #000;
  color: #fff;
}

.fcols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  max-width: 1200px;
  margin: 0 auto;
}

.fcols dl:last-child { grid-column: span 2; }
.fcols dl { margin: 0; }

footer dt {
  font-family: Raleway, sans-serif;
  font-size: 14px;
  letter-spacing: 0.2em;
  padding-bottom: 0.5rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid #fff;
}

footer dd { margin: 0; color: #e2e2e2; font-size: 16px; }

footer dd a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

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

.copy {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  padding-top: 0.9rem;
  border-top: 1px solid #3d3d3d;
  font-family: Raleway, sans-serif;
  font-size: 15px;
  color: #bfbfbf;
}

/* ---------- 动效 ---------- */
.js .prose > article {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .prose > article.in { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */
@media (max-width: 639px) {
  body { padding-bottom: 140px; }
  .dock-in { flex-direction: column; align-items: stretch; gap: 0; }
  .brand { justify-content: flex-start; min-height: 42px; }
  .dock-nav { justify-content: space-between; padding-bottom: 0.25rem; }
  .grp > summary { flex: 1; justify-content: center; padding: 0 0.4rem; }
  .grp > menu { min-width: 150px; }
  .hero { padding-bottom: 160px; }
  .hero-txt { padding: 0 1.15rem; }
}

@media (min-width: 960px) {
  .content {
    grid-template-columns: minmax(0, 1fr) 248px;
    gap: 3.2rem;
    align-items: start;
  }

  .side {
    position: sticky;
    top: 1.6rem;
    border-top: 0;
    border-left: 1px solid var(--rule);
    padding: 0.2rem 0 0 1.2rem;
  }

  .fcols { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .fcols dl:last-child { grid-column: auto; }
}

@media (min-width: 1024px) {
  .prose article { column-count: 2; column-gap: 2.4rem; padding: 1.9rem 2rem 2.3rem; }
  .prose article > * { break-inside: avoid; }
  .prose article > p { orphans: 3; widows: 3; }

  .prose article > p:first-of-type::first-letter {
    float: left;
    font-family: Raleway, "PingFang SC", sans-serif;
    font-weight: 700;
    font-size: 3.4em;
    line-height: 0.86;
    padding: 0.06em 0.12em 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .prose > article { opacity: 1; transform: none; transition: none; }
  .hero-img { transform: none !important; }
}

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