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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --ash: #5f5f5f;
  --hair: #d9d9d9;
  --tint: #f3f3f3;
  --serif: "Lora", "Songti SC", "SimSun", Georgia, serif;
  --sans: "Raleway", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --gutter: clamp(1rem, 4vw, 3.25rem);
  --gap: clamp(1.25rem, 3vw, 3rem);
  --radius: 28px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  color: #101010;
  background: var(--paper);
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: -0.01em;
}

a { color: inherit; }

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

/* ---------- 报头 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.masthead-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem var(--gutter);
  border-bottom: 1px solid var(--hair);
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.logo::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 0.55rem;
  background: var(--ink);
  border-radius: 50%;
}

.pill-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.45rem var(--gutter);
}

.pill-nav ol {
  display: flex;
  flex: 1 1 auto;
  gap: 0.4rem;
  margin: 0;
  padding: 0 0.15rem;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.pill-nav ol::-webkit-scrollbar { display: none; }

.pill-nav li { flex: 0 0 auto; }

.pill-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.95rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pill-nav a:hover,
.pill-nav a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.pill-nav .cta {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.5rem 1.35rem;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
}

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

/* ---------- 开篇 ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: clamp(2.5rem, 8vw, 5.5rem) var(--gutter);
  overflow: hidden;
  background: #000;
  background-image: linear-gradient(140deg, #1c1c1c, #000 70%);
  color: var(--paper);
  text-align: center;
}

.hero-figure {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

.hero-figure img,
.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0.78));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 44rem;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6.4vw, 4.1rem);
  font-weight: 700;
  line-height: 1.14;
  color: var(--paper);
}

.hero-lede {
  max-width: 32rem;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #efefef;
}

/* ---------- 版心 ---------- */

.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  align-items: start;
  gap: var(--gap);
  padding: clamp(2rem, 5vw, 4.5rem) var(--gutter);
  background: linear-gradient(180deg, var(--paper), var(--tint) 45%, var(--paper));
  border-bottom: 1px solid var(--ink);
}

.prose {
  max-width: 68ch;
  min-width: 0;
  font-size: 1rem;
}

.prose > article {
  margin-top: 2.6rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--hair);
}

.prose > article:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose > article:first-of-type p:first-of-type::first-letter {
  float: left;
  padding: 0.4rem 0.5rem 0 0;
  font-family: var(--serif);
  font-size: 4.4rem;
  font-weight: 700;
  line-height: 0.78;
}

.prose h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.22;
  font-weight: 700;
}

.prose h2 + hr {
  width: 100%;
  margin: 0 0 1.4rem;
  border: 0;
  border-top: 2px solid var(--ink);
}

.prose h3 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.22rem;
  line-height: 1.35;
}

.prose p { margin: 0 0 1.1rem; }

.prose ul,
.prose ol {
  margin: 0 0 1.2rem;
  padding-left: 1.35rem;
}

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

.prose blockquote {
  margin: 1.8rem 0;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 4px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.14rem;
  font-style: italic;
  line-height: 1.6;
}

.prose figure { margin: 1.6rem 0; }

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--ash);
}

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

main article[id] { scroll-margin-top: 8.5rem; }

/* ---------- 侧栏 ---------- */

.rail {
  position: sticky;
  top: 8.5rem;
  padding: 1.1rem 1.15rem 1.35rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.1);
}

.rail-title {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.rail-title + hr {
  margin: 0 0 0.85rem;
  border: 0;
  border-top: 1px solid var(--ink);
}

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

.rail li + li { border-top: 1px solid #e5e5e5; }

.rail a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.32rem 0.15rem;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.16s ease, letter-spacing 0.16s ease;
}

.rail a::before {
  counter-increment: rail;
  content: counter(rail, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--ash);
}

.rail a:hover,
.rail a:focus-visible {
  transform: translateX(3px);
  letter-spacing: 0.02em;
}

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

.colophon {
  margin-top: clamp(1.5rem, 5vw, 3.5rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 1.5rem;
  background: var(--ink);
  color: var(--paper);
}

.colophon-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}

.mega {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 7.5vw, 4.6rem);
  font-weight: 700;
  line-height: 0.94;
}

.colophon address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #dcdcdc;
}

.colophon address p { margin: 0 0 0.15rem; }

.colophon address a,
.colophon ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.16s ease, opacity 0.16s ease;
}

.colophon address a:hover,
.colophon ul a:hover,
.colophon address a:focus-visible,
.colophon ul a:focus-visible { border-bottom-color: var(--paper); }

.colophon ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.colophon-base {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  text-align: center;
}

.colophon-base p {
  margin: 0;
  font-size: 0.95rem;
  color: #c9c9c9;
  letter-spacing: 0.04em;
}

/* ---------- 动效 ---------- */

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

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

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

@media (max-width: 980px) {
  .spread { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; order: -1; }
  .prose { max-width: none; }
}

@media (max-width: 820px) {
  .colophon-grid { grid-template-columns: 1fr 1fr; }
  .colophon-brand { grid-column: 1 / -1; }
  .hero { min-height: 66vh; }
  .prose > article:first-of-type p:first-of-type::first-letter { font-size: 3.5rem; }
}

@media (max-width: 560px) {
  html { font-size: 17px; }
  .masthead-brand { padding: 0.35rem var(--gutter); }
  .pill-nav { flex-wrap: wrap; padding-bottom: 0.5rem; }
  .pill-nav ol { width: 100%; flex: 1 1 100%; }
  .pill-nav .cta { margin-left: auto; }
  .colophon-grid { grid-template-columns: 1fr; }
  .hero-lede { font-size: 1rem; }
}

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

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