/* 白虎网站 · 黑白编辑栅格 */

:root {
  --ink: #000000;
  --paper: #ffffff;
  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  --pad: clamp(1rem, 4vw, 3rem);
  --gap: clamp(1rem, 3vw, 2.5rem);
  --rule: 3px;
}

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

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, 0.13) 1px, transparent 1px);
  background-size: 13px 13px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

a { color: inherit; }

img { max-width: 100%; }

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

/* 顶部细条 */

.tickertape {
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.44em;
  text-indent: 0.44em;
  text-align: center;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

/* 报头 */

.masthead {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 0.6rem var(--pad);
  background: var(--paper);
  border-bottom: 6px solid var(--ink);
}

.wordmark {
  position: relative;
  z-index: 3;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.burger {
  position: absolute;
  left: calc(var(--pad) * 0.55);
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  min-height: 44px;
  min-width: 68px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}

body.menu-open .burger {
  position: fixed;
  left: auto;
  right: calc(var(--pad) * 0.55);
  top: 0.9rem;
  transform: none;
  border-color: var(--paper);
}

body.menu-open a:focus-visible,
body.menu-open .burger:focus-visible {
  outline-color: var(--paper);
}

/* 主菜单（横向居中，品牌两侧分列） */

.primary {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.menu {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  height: 100%;
  margin: 0;
  padding: 0 var(--pad);
  list-style: none;
  pointer-events: auto;
}

.menu li { display: flex; }

.menu li:nth-child(4) { margin-left: auto; }

.menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.5rem;
  font-size: 0.74rem;
  text-decoration: none;
  white-space: nowrap;
}

.menu a:hover {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 1099px) {
  .primary { display: none; }
}

/* 全屏遮罩菜单 */

body.menu-open .primary {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--ink);
  color: var(--paper);
  padding: 5.4rem var(--pad) 2rem;
  overflow-y: auto;
  pointer-events: auto;
}

body.menu-open .menu {
  display: block;
  height: auto;
  padding: 0;
  counter-reset: m;
}

body.menu-open .menu li {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

body.menu-open .menu li:nth-child(4) { margin-left: 0; }

body.menu-open .menu li::before {
  counter-increment: m;
  content: counter(m, decimal-leading-zero);
  font-size: 0.78rem;
  opacity: 0.65;
}

body.menu-open .menu a {
  flex: 1;
  min-height: 56px;
  padding: 1.05rem 0.2rem;
  color: var(--paper);
  font-size: 1.05rem;
}

body.menu-open .menu a:hover {
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.32em;
}

/* 粘性锚点条 */

.rail {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  border-bottom: var(--rule) solid var(--ink);
  overflow-x: auto;
  scrollbar-width: none;
}

.rail::-webkit-scrollbar { display: none; }

.rail-list {
  display: flex;
  margin: 0;
  padding: 0 var(--pad);
  list-style: none;
  min-width: max-content;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.72rem;
  color: var(--paper);
  font-size: 0.72rem;
  text-decoration: none;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.rail-list a:hover {
  background: var(--paper);
  color: var(--ink);
}

/* 首屏 */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--gap);
  align-items: end;
  min-height: 70vh;
  padding: clamp(1.4rem, 4vw, 3rem) var(--pad);
  background: var(--paper);
  border-bottom: 6px solid var(--ink);
  overflow: hidden;
}

.hero-index {
  position: absolute;
  right: -0.06em;
  bottom: -0.2em;
  z-index: 0;
  font-size: clamp(9rem, 28vw, 22rem);
  line-height: 0.78;
  font-weight: 700;
  letter-spacing: -0.07em;
  color: rgba(0, 0, 0, 0.07);
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
  align-self: end;
}

h1 {
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.standfirst {
  margin: 0;
  max-width: 34ch;
  font-size: 1rem;
  border-left: 5px solid var(--ink);
  padding-left: 0.9rem;
}

.hero-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  aspect-ratio: 4 / 5;
  border: 3px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
}

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

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: start;
  }
  .hero-figure { aspect-ratio: 16 / 10; }
}

/* 正文栅格 */

.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(1rem, 3vw, 2.8rem);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.2rem, 3vw, 2.4rem) var(--pad) 3rem;
}

@media (max-width: 900px) {
  .spread { grid-template-columns: 1fr; }
}

.sheet { min-width: 0; }

.sheet > article {
  border-top: var(--rule) solid var(--ink);
  padding: 1.5rem 0 2.4rem;
  scroll-margin-top: 110px;
}

.sheet > article:first-child {
  border-top: 0;
  padding-top: 0.4rem;
}

.sheet h2 {
  font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
  max-width: 24ch;
}

.sheet h3 {
  font-size: 1.12rem;
  margin: 1.6rem 0 0.4rem;
}

.sheet p {
  max-width: 64ch;
  margin: 0 0 1rem;
}

.sheet > article > p:first-of-type::first-letter {
  float: left;
  font-size: 3.1em;
  line-height: 0.84;
  padding: 0.04em 0.1em 0 0;
  font-weight: 700;
}

.sheet ul,
.sheet ol {
  max-width: 64ch;
  padding-left: 1.3rem;
}

.sheet li { margin: 0.25rem 0; }

.sheet blockquote {
  margin: 1.4rem 0;
  padding: 0.9rem 1.1rem;
  border-left: 6px solid var(--ink);
  background: rgba(0, 0, 0, 0.045);
  font-size: 1.02rem;
}

.sheet blockquote p { margin: 0; max-width: none; }

.sheet figure { margin: 1.4rem 0; }

.sheet img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--ink);
  border-radius: 18px;
}

.sheet figcaption {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

hr {
  border: 0;
  border-top: 2px solid var(--ink);
  margin: 0.2rem 0 1.1rem;
}

/* 侧栏 */

.sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  padding: 1rem 1rem 1.2rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
}

.side-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: s;
  display: grid;
  gap: 0.1rem;
}

.side-list li {
  counter-increment: s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.35);
}

.side-list li::before {
  content: counter(s, decimal-leading-zero);
  font-size: 0.7rem;
  opacity: 0.6;
}

.side-list a {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 40px;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  text-decoration: none;
}

.side-list a:hover {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

/* 页脚 */

.colophon {
  display: grid;
  grid-template-columns: 1.3fr 1.6fr auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.6rem, 4vw, 3rem) var(--pad) 1.4rem;
  background: var(--ink);
  color: var(--paper);
  border-top: 6px solid var(--ink);
}

.colophon article { min-width: 0; }

.col-brand {
  margin: 0;
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

.col-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.9rem;
}

.col-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.35rem 0;
  color: var(--paper);
  font-size: 0.78rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.col-nav a:hover { text-decoration: underline; }

.col-c { display: flex; }

.totop {
  display: inline-flex;
  align-items: center;
  align-self: start;
  min-height: 46px;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--paper);
  border-radius: 999px;
  color: var(--paper);
  font-size: 0.78rem;
  text-decoration: none;
}

.totop:hover {
  background: var(--paper);
  color: var(--ink);
}

.col-rule {
  grid-column: 1 / -1;
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  text-align: center;
}

.col-rule p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
}

@media (max-width: 820px) {
  .colophon { grid-template-columns: 1fr; }
  .col-nav { grid-template-columns: 1fr; }
}

/* 滚动浮现 */

html.js .sheet > article {
  opacity: 0;
  transform: translateY(16px);
}

html.js .sheet > article.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

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