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

:root {
  --ink: #111111;
  --paper: #F5F1E8;
  --flame: #FF4D1A;
  --sand: #d8d2c5;
  --font: 'Space Grotesk', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: inherit; }
.anchor-top { display: block; height: 0; }

/* 顶部细条 */
.topline {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--flame);
  color: var(--ink);
  padding: 8px 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.topline-dot {
  width: 9px;
  height: 9px;
  background: var(--ink);
  border-radius: 50%;
  flex: none;
}
.topline-text { white-space: nowrap; }
.topline-bar {
  flex: 1 1 auto;
  height: 2px;
  background: var(--ink);
  opacity: 0.35;
}

/* 页头 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.mast {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.mast-side { display: flex; flex-wrap: wrap; }
.mast-side--end { justify-content: flex-end; }
.mast-side a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 13px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.mast-side a:hover,
.mast-side a:focus-visible { background: var(--flame); }

.brand {
  display: flex;
  align-items: center;
  margin: 6px 0;
  padding: 8px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-logo { display: block; height: 26px; width: auto; }

/* 首屏 */
.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  align-content: end;
  padding: 64px 20px 96px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  text-align: right;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; }
.hero-media img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.62);
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  justify-items: end;
}
.hero-rule {
  width: 92px;
  height: 9px;
  background: var(--flame);
  margin-bottom: 22px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7.4vw, 5.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero-cut {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  background: var(--flame);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 3;
}

/* 主体网格 */
.content-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 48px;
  align-items: start;
}

.prose { min-width: 0; }
.prose > div {
  padding-bottom: 44px;
  margin-bottom: 44px;
  border-bottom: 2px solid var(--ink);
  scroll-margin-top: 108px;
}
.prose > div:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.prose h2 {
  margin: 0 0 12px;
  font-size: clamp(1.65rem, 3.5vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.prose h3 {
  margin: 30px 0 10px;
  font-size: 1.28rem;
  line-height: 1.35;
  font-weight: 700;
}
.prose p { margin: 0 0 16px; max-width: 66ch; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.3em; }
.prose li { margin-bottom: 8px; }
.prose a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--flame);
}
.prose a:hover { background: var(--flame); }
.prose strong { font-weight: 700; }
.prose blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 6px solid var(--flame);
  font-weight: 500;
}
.prose img { border: 2px solid var(--ink); border-radius: 28px; display: block; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; }
.prose th, .prose td { border: 2px solid var(--ink); padding: 9px 12px; text-align: left; }

hr {
  border: 0;
  height: 5px;
  max-width: 140px;
  background: var(--flame);
  margin: 0 0 22px;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 104px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--flame);
  color: var(--ink);
  padding: 24px 20px;
}
.rail h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.rail hr { background: var(--ink); height: 3px; max-width: none; margin: 10px 0 14px; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 2px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(17, 17, 17, 0.25);
  transition: border-color 0.16s ease;
}
.rail li:last-child a { border-bottom: 0; }
.rail a:hover { border-bottom-color: var(--ink); }

/* 页脚 */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 20px 26px;
  border-top: 2px solid var(--ink);
}
.foot-cols {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
.foot dl { margin: 0; }
.foot dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--flame);
  margin-bottom: 10px;
}
.foot dd { margin: 0; }
.foot dd a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 0;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 241, 232, 0.2);
  transition: color 0.16s ease;
}
.foot dd a:hover { color: var(--flame); }
.foot-base {
  max-width: 1240px;
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(245, 241, 232, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.85rem;
}
.to-top {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  background: var(--flame);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* 进入动效 */
.js .prose > div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.js .prose > div.is-in { opacity: 1; transform: none; }

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

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 34px 18px 60px;
  }
  .rail { position: static; }
  .hero {
    min-height: 52vh;
    padding: 44px 18px 78px;
    text-align: left;
  }
  .hero-inner { justify-items: start; }
  .hero h1 { font-size: clamp(1.85rem, 8.6vw, 3.2rem); }
  .foot-cols { gap: 20px; }
}

@media (max-width: 820px) {
  .mast {
    grid-template-columns: 1fr;
    padding: 0 8px 6px;
  }
  .brand {
    order: -1;
    justify-self: center;
    margin: 8px 0 4px;
    padding: 7px 16px;
  }
  .mast-side, .mast-side--end { justify-content: center; }
  .mast-side a { padding: 0 11px; font-size: 0.9rem; }
  .prose > div { scroll-margin-top: 168px; }
  .foot { padding: 42px 18px 22px; }
  .foot-cols { grid-template-columns: 1fr; gap: 8px; }
}

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