:root {
  --ink: #000000;
  --paper: #ffffff;
  --mut: rgba(0, 0, 0, 0.62);
  --rule: rgba(0, 0, 0, 0.16);
  --hair: rgba(0, 0, 0, 0.08);
  --pad: clamp(16px, 4vw, 40px);
}

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

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

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0 0 96px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Merriweather", Georgia, "Songti SC", "SimSun", serif;
  font-size: 17px;
  line-height: 1.66;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  font-family: "Abril Fatface", Georgia, "Songti SC", serif;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0;
}

p {
  margin: 0 0 1em;
}

/* ---------- 版面骨架 ---------- */

.spread {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px) var(--pad) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: clamp(24px, 4vw, 58px);
  align-items: start;
}

.piece {
  min-width: 0;
}

/* ---------- 头条 ---------- */

.masthead {
  min-height: 70vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  text-align: right;
  padding-top: clamp(10px, 3vw, 26px);
  border-bottom: 7px solid var(--ink);
  margin-bottom: clamp(26px, 5vw, 52px);
}

.masthead-text {
  justify-self: end;
  max-width: 22ch;
}

.kicker {
  display: inline-block;
  font-family: "Merriweather", Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--mut);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 14px;
  font-size: 1rem;
}

.masthead h1 {
  font-size: clamp(2.5rem, 8.4vw, 5.2rem);
  overflow-wrap: break-word;
}

.standfirst {
  font-size: 1rem;
  color: var(--mut);
  margin: 18px 0 0;
  text-align: right;
  max-width: 34ch;
  justify-self: end;
}

.slash {
  display: block;
  height: 16px;
  margin: 22px -4px 20px;
  background: var(--ink);
  transform: skewY(-1.6deg);
}

.masthead-fig {
  margin: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-bottom: 0;
}

.masthead-fig img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 26vh;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

/* ---------- 正文 ---------- */

.piece > div {
  padding: clamp(26px, 4.4vw, 46px) 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 14px;
  scroll-margin-bottom: 110px;
}

.piece > div:last-child {
  border-bottom: 0;
}

.piece > div h2 {
  font-size: clamp(1.65rem, 4.2vw, 2.55rem);
  margin: 0 0 0.6em;
  padding-bottom: 0.28em;
  border-bottom: 3px solid var(--ink);
  display: inline-block;
}

.piece > div h2::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 6px;
  width: 42%;
  background: var(--ink);
}

.piece > div h3 {
  font-size: 1.3rem;
  margin: 1.6em 0 0.5em;
}

.piece p {
  max-width: 66ch;
  margin-bottom: 1.05em;
}

.piece div > p:first-of-type::first-letter {
  float: left;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: 4.1em;
  line-height: 0.76;
  padding: 0.06em 0.09em 0 0;
}

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

.piece li {
  margin-bottom: 0.45em;
}

.piece blockquote {
  margin: 1.6em 0;
  padding: 0.5em 0 0.5em 1.2em;
  border-left: 7px solid var(--ink);
  font-size: 1.28rem;
  line-height: 1.42;
  font-style: italic;
}

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

.piece figure {
  margin: 1.6em 0;
}

.piece figcaption {
  font-size: 0.94rem;
  color: var(--mut);
  border-top: 1px solid var(--rule);
  padding-top: 8px;
  margin-top: 8px;
}

.piece a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.piece hr {
  border: 0;
  border-top: 3px double var(--ink);
  margin: 2em 0;
}

.piece code,
.piece pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.94rem;
  background: rgba(0, 0, 0, 0.05);
}

.piece pre {
  padding: 14px;
  overflow-x: auto;
  border-left: 5px solid var(--ink);
}

.piece table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 0.97rem;
}

.piece th,
.piece td {
  border-bottom: 1px solid var(--rule);
  padding: 9px 8px;
  text-align: left;
}

.piece th {
  border-bottom: 2px solid var(--ink);
}

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

.rail {
  position: sticky;
  top: 22px;
  align-self: start;
  border-top: 7px solid var(--ink);
  padding-top: 14px;
}

.eyebrow {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.34em;
  color: var(--mut);
  margin-bottom: 6px;
  font-size: 1rem;
}

.rail-title {
  font-size: 1.55rem;
  margin-bottom: 12px;
}

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

.rail-list li {
  border-bottom: 1px solid var(--hair);
  counter-increment: rail;
}

.rail-list a {
  display: block;
  padding: 12px 0 12px 30px;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
  position: relative;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 12px;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: 0.9rem;
  color: var(--mut);
}

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

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 66px;
  padding: 6px clamp(10px, 3vw, 26px);
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--paper);
  border-top: 3px solid var(--ink);
}

.dock-nav {
  flex: 1 1 0;
  min-width: 0;
}

.dock-nav--a {
  display: flex;
  justify-content: flex-end;
}

.dock-nav--b {
  display: flex;
  justify-content: flex-start;
}

.dock-nav ul {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dock-nav a {
  display: inline-block;
  padding: 13px 9px;
  color: var(--paper);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.4;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.dock-nav a:hover,
.dock-nav a:focus-visible {
  border-bottom-color: var(--paper);
}

.dock-brand {
  margin-inline: auto;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--paper);
  text-decoration: none;
  padding: 10px 10px;
  white-space: nowrap;
}

.dock-toggle {
  flex: 0 0 auto;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
}

.dock-toggle:hover,
.dock-toggle:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 全屏遮罩菜单 ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(22px, 6vw, 56px) var(--pad) 120px;
  overflow-y: auto;
  transform: translateY(102%);
  visibility: hidden;
  transition: transform 0.52s cubic-bezier(0.2, 0.85, 0.2, 1), visibility 0.52s;
}

.sheet.open {
  transform: none;
  visibility: visible;
}

.sheet-close {
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  padding: 11px 16px;
  min-height: 44px;
  cursor: pointer;
  margin-bottom: clamp(20px, 5vw, 44px);
}

.sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sheet-list li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sheet.open .sheet-list li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 45ms + 90ms);
}

.sheet-list a {
  display: block;
  padding: 16px 0;
  color: var(--paper);
  text-decoration: none;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: clamp(1.5rem, 6vw, 2.3rem);
  line-height: 1.2;
}

.sheet-list a:hover,
.sheet-list a:focus-visible {
  padding-left: 12px;
  color: var(--paper);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

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

.foot {
  max-width: 1180px;
  margin: clamp(30px, 6vw, 64px) auto 0;
  padding: clamp(30px, 5vw, 56px) var(--pad) 40px;
  border-top: 7px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px clamp(20px, 4vw, 48px);
}

.foot-brand {
  grid-area: 1 / 1 / 2 / 2;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  line-height: 1.1;
  margin: 0;
}

.foot-desc {
  grid-area: 2 / 1 / 3 / 2;
  color: var(--mut);
  font-size: 1rem;
  max-width: 34ch;
  margin: 8px 0 0;
}

.foot-links {
  margin: 0;
  font-size: 1rem;
}

.foot-links--a {
  grid-area: 1 / 2 / 2 / 3;
}

.foot-links--b {
  grid-area: 2 / 2 / 3 / 3;
}

.foot-links a {
  display: inline-block;
  padding: 10px 6px;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.foot-links a:hover,
.foot-links a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.foot-cta {
  grid-area: 3 / 1 / 4 / 3;
  margin: clamp(20px, 4vw, 34px) 0 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  text-align: center;
  padding: clamp(14px, 3vw, 24px) 0;
}

.foot-cta a {
  display: inline-block;
  font-family: "Abril Fatface", Georgia, serif;
  font-size: clamp(1.6rem, 6vw, 3rem);
  line-height: 1.2;
  text-decoration: none;
  padding: 6px 10px;
}

.foot-cta a:hover,
.foot-cta a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 8px;
}

.foot-copy {
  grid-area: 4 / 1 / 5 / 3;
  margin: 18px 0 0;
  text-align: center;
  font-size: 1rem;
  color: var(--mut);
}

.foot-note {
  grid-area: 5 / 1 / 6 / 3;
  display: block;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--mut);
  font-size: 1rem;
}

/* ---------- 揭示动效 ---------- */

html.js [data-rv] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

html.js [data-rv].rv-in {
  opacity: 1;
  transform: none;
}

/* ---------- 宽屏 ---------- */

@media (min-width: 1040px) {
  .piece > #about {
    column-count: 2;
    column-gap: 2.6rem;
  }

  .piece > #about h2 {
    column-span: all;
  }

  .masthead h1 {
    font-size: clamp(3.4rem, 7vw, 5.6rem);
  }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 1040px) {
  .dock-nav {
    display: none;
  }

  .spread {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .rail {
    position: static;
    margin-bottom: 10px;
  }

  .rail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
  }
}

@media (max-width: 700px) {
  .foot {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot > * {
    grid-column: 1;
    grid-row: auto;
  }

  .foot-cta {
    grid-column: 1;
  }

  .masthead {
    min-height: 62vh;
  }

  .rail-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }

  .dock-brand {
    font-size: 1.2rem;
  }
}

/* ---------- 减少动效 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js [data-rv] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .sheet,
  .sheet-list li {
    transition: none;
  }
}

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