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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rail: 232px;
  --gap: 1rem;
  --serif: 'Newsreader', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --sans: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-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;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ---------- 左侧固定栏 ---------- */

.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 22px 18px 28px;
  background: var(--paper);
  border-right: 1px solid var(--ink);
  overflow-y: auto;
}

.rail__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
  width: max-content;
}

.rail__logo img {
  width: 34px;
  height: 34px;
}

.rail__mark-t {
  display: inline-block;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 8px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  letter-spacing: .04em;
}

.rail__nav {
  display: flex;
  flex-direction: column;
}

.rail__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 11px 2px;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid rgba(0, 0, 0, .16);
}

.rail__link i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .16em;
  opacity: .5;
}

.rail__link:hover span,
.rail__link:focus-visible span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- 主区 ---------- */

main { margin-left: var(--rail); }

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.hero__fig {
  position: absolute;
  inset: 0;
  margin: 0;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero__img.is-on { opacity: 1; }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .58) 46%, rgba(0, 0, 0, .18) 100%);
  pointer-events: none;
}

.hero__txt {
  position: relative;
  z-index: 2;
  padding: 64px 40px 56px;
  max-width: 20ch;
}

.hero__txt h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -.01em;
}

.shell {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: start;
  padding: 60px 40px 84px;
}

.stream { grid-column: 1 / span 8; }

.aside {
  grid-column: 10 / span 3;
  position: sticky;
  top: 26px;
  border-top: 3px solid var(--ink);
  padding-top: 14px;
}

.aside__h {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .18em;
  line-height: 1.4;
}

.aside__h span { display: inline-block; }

.toc { display: flex; flex-direction: column; }

.toc__a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 40px;
  padding: 9px 0;
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px dotted rgba(0, 0, 0, .4);
  opacity: 0;
  animation: rise .5s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.toc__a i {
  font-style: normal;
  font-size: 11px;
  letter-spacing: .16em;
  opacity: .5;
}

.toc__a:hover span { text-decoration: underline; text-underline-offset: 4px; }

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

.stream > article {
  margin: 0 0 28px;
  padding: 30px 30px 36px;
  background: #fff;
  border: 1px solid var(--ink);
  border-bottom-width: 5px;
  border-radius: 18px;
  scroll-margin-top: 24px;
  opacity: 0;
  transform: translateY(14px);
  animation: rise .58s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

.stream h2 {
  margin: 0 0 .55em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -.01em;
}

.stream h3 {
  margin: 1.5em 0 .5em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.3;
}

.stream h2 > span,
.stream h3 > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ink);
}

.stream p { margin: 0 0 1.05em; }

.stream ul,
.stream ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.stream li { margin-bottom: .45em; }

.stream a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stream figure {
  margin: 1.4em 0;
  padding: 0;
}

.stream figure img {
  width: 100%;
  border-radius: 12px;
}

.stream figcaption {
  margin-top: .6em;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, .65);
}

.stream blockquote {
  margin: 1.4em 0;
  padding: .2em 0 .2em 1.2em;
  border-left: 4px solid var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.stream table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 16px;
}

.stream th,
.stream td {
  border-bottom: 1px solid rgba(0, 0, 0, .35);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.stream strong { font-weight: 700; }

.stream hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 2em 0;
}

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

.foot {
  margin-left: var(--rail);
  border-top: 1px solid var(--ink);
  padding: 56px 40px 26px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.foot__brand { grid-column: 1 / span 6; }

.foot__giant {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6.4vw, 5.6rem);
  line-height: .92;
  letter-spacing: -.02em;
}

.foot__giant span { display: inline-block; }

.foot__col { grid-column: span 3; }

.foot__h {
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .18em;
}

.foot__h span { display: inline-block; }

.fdl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  margin: 0;
  font-size: 16px;
}

.fdl dt {
  font-size: 11px;
  letter-spacing: .12em;
  opacity: .5;
  padding-top: 11px;
}

.fdl dd { margin: 0; }

.fdl dd a {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.fdl dd a:hover { border-bottom-color: var(--ink); }

.foot__bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid var(--ink);
  font-size: 16px;
}

.foot__cp { margin: 0; }

.foot__top {
  display: inline-block;
  min-height: 40px;
  padding: 8px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

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

@media (max-width: 1080px) {
  .stream { grid-column: 1 / span 12; }
  .aside {
    grid-column: 1 / span 12;
    position: static;
    margin-top: 8px;
  }
  .toc {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }
}

@media (max-width: 900px) {
  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    width: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    padding: 8px 14px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    overflow: visible;
  }
  .rail__logo { min-height: 40px; }
  .rail__mark-t { font-size: 18px; padding: 5px 6px; }
  .rail__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  .rail__link {
    min-height: 44px;
    padding: 10px 11px;
    font-size: 16px;
    border-bottom: 0;
    border: 1px solid var(--ink);
    border-radius: 999px;
  }
  .rail__link i { display: none; }

  main,
  .foot { margin-left: 0; }

  .hero {
    min-height: 56vh;
    align-items: flex-start;
  }
  .hero__txt {
    padding: 30px 20px 34px;
    max-width: none;
  }
  .shell { padding: 30px 20px 48px; }
  .stream > article {
    padding: 22px 20px 26px;
    scroll-margin-top: 118px;
    border-radius: 14px;
  }
  .foot { padding: 40px 20px 22px; }
  .foot__brand { grid-column: 1 / -1; }
  .foot__col { grid-column: span 6; }
  .foot__bar { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .toc { grid-template-columns: 1fr; }
  .foot__col { grid-column: 1 / -1; }
  .hero__txt h1 { font-size: clamp(1.9rem, 8.4vw, 2.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stream > article,
  .toc__a {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .hero__img { transition: none; }
}

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