:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: rgba(0, 0, 0, 0.16);
  --rail: 112px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", "Songti SC", serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
}

p {
  margin: 0;
}

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

.shell {
  margin-left: var(--rail);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 1 auto;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.25rem;
}

/* ---------- 左侧竖排导航 ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail);
  background: var(--paper);
  border-right: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding: 1.1rem 0.7rem 1.5rem;
  z-index: 30;
}

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.3rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.02em;
  transition: background 0.22s ease, color 0.22s ease;
}

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

.mark img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
}

.rail-nav {
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 1.5rem;
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.32rem 0.5rem;
  font-size: 13px;
  line-height: 1.36;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

/* ---------- 顶部细条 ---------- */
.strip {
  position: fixed;
  top: 0;
  left: var(--rail);
  right: 0;
  z-index: 20;
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 2.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.09em;
  color: #2b2b2b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 2rem;
  align-items: center;
  padding: 7.5rem 0 4.5rem;
  border-bottom: 1px solid var(--ink);
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.15) 1px, transparent 1.5px);
  background-size: 26px 26px;
  background-position: 0 0;
}

.hero-copy {
  max-width: 34ch;
}

.hero h1 {
  font-size: clamp(2.35rem, 6.2vw, 4.6rem);
  margin-bottom: 1.5rem;
}

.hero-lead {
  font-size: 1.02rem;
  color: #1e1e1e;
  max-width: 38ch;
  margin-bottom: 2.2rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 1.6rem;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.14em;
  transition: background 0.22s ease, color 0.22s ease;
}

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

.hero-media {
  position: relative;
  height: min(64vh, 540px);
}

.frame {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.frame:hover img {
  transform: scale(1.045);
  filter: grayscale(0) contrast(1.02);
}

.frame-a {
  top: 0;
  left: 0;
  width: 64%;
  height: 68%;
}

.frame-b {
  right: 0;
  bottom: 0;
  width: 56%;
  height: 60%;
}

/* ---------- 正文 ---------- */
.content {
  padding: 4rem 0 5.5rem;
}

.prose > article {
  padding: 3.25rem 0;
  border-top: 1px solid var(--ink);
  scroll-margin-top: 130px;
}

.prose > article:first-child {
  border-top: 0;
  padding-top: 0;
}

.prose h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  margin-bottom: 1.1rem;
}

.prose h3 {
  font-size: 1.16rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 2.1rem 0 0.6rem;
}

.prose p {
  margin-bottom: 1.1rem;
  max-width: 68ch;
  color: #141414;
}

.prose ul,
.prose ol {
  margin: 0 0 1.3rem;
  padding-left: 1.3rem;
  max-width: 68ch;
}

.prose li {
  margin: 0.35rem 0;
}

.prose a {
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  transition: background 0.2s ease, color 0.2s ease;
}

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

.prose blockquote {
  margin: 1.6rem 0;
  padding: 0.4rem 0 0.4rem 1.3rem;
  border-left: 3px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.14rem;
  max-width: 60ch;
}

.prose img {
  margin: 1.6rem 0;
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 2.2rem 0;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  border: 1px solid var(--ink);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

/* ---------- 页脚 ---------- */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 2.25rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 1.5rem;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.18) 1px, transparent 1.5px);
  background-size: 24px 24px;
}

.foot-cta {
  grid-column: 1 / -1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 2.25rem;
}

.foot-cta h2 {
  font-size: clamp(1.9rem, 5.4vw, 3.6rem);
  margin-bottom: 0.9rem;
}

.foot-cta .subtitle {
  max-width: 54ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
}

.foot-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.foot-col a:hover {
  color: var(--paper);
  border-bottom-color: var(--paper);
}

.foot-base {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  padding-top: 1.35rem;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.foot-base a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
}

.foot-base a:hover {
  color: var(--paper);
}

/* ---------- 入场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 0.7, 0.3, 1);
}

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  :root {
    --rail: 0px;
  }

  .shell {
    margin-left: 0;
  }

  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    left: auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    overflow-x: auto;
  }

  .mark {
    flex: 0 0 auto;
    padding: 0.3rem 0.6rem;
    min-height: 44px;
  }

  .rail-nav {
    margin-top: 0;
    flex: 1 1 auto;
    overflow: visible;
  }

  .rail-nav ul {
    flex-direction: row;
    gap: 0.15rem;
  }

  .rail-nav a {
    white-space: nowrap;
    min-height: 44px;
    padding: 0.45rem 0.6rem;
    font-size: 14px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .rail-nav a:hover,
  .rail-nav a:focus-visible {
    background: transparent;
    color: var(--ink);
    border-bottom-color: var(--ink);
  }

  .strip {
    position: static;
    height: auto;
    padding: 0.6rem 1.1rem;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.5;
  }

  .wrap {
    padding: 0 1.1rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2.75rem 0 3.25rem;
    gap: 2.5rem;
    background-size: 22px 22px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-media {
    height: 330px;
  }

  .content {
    padding: 2.75rem 0 3.5rem;
  }

  .prose > article {
    padding: 2.4rem 0;
    scroll-margin-top: 96px;
  }

  .foot {
    padding: 3rem 1.1rem 1.75rem;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.25rem;
  }

  .foot-cta {
    padding-bottom: 1.75rem;
  }
}

@media (max-width: 420px) {
  .hero-media {
    height: 280px;
  }

  .frame-a {
    width: 70%;
    height: 62%;
  }

  .frame-b {
    width: 62%;
    height: 56%;
  }
}

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

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

  .frame img,
  .mark,
  .hero-cta,
  .rail-nav a {
    transition: none;
  }
}

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