@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --shade: #f1f1f1;
  --line: #d7d7d7;
  --max: 1280px;
  --r: 10px;
}

*,
*::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: 'Be Vietnam Pro', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.01em;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
}

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

menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

/* 顶部细条 */
.topline {
  background: var(--ink);
  color: var(--paper);
  padding: 0.45rem 1rem;
}

.topline__brand {
  margin: 0;
  max-width: var(--max);
  margin-inline: auto;
  font-size: 0.72rem;
  letter-spacing: 0.34em;
  font-weight: 500;
}

/* 页头 */
.mast {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 1rem;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.mark {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: var(--r);
}

.mark__mono {
  font-weight: 700;
  font-size: 1.05rem;
}

.mark__img {
  width: 44px;
  height: 44px;
  object-fit: cover;
}

.menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
  min-width: 0;
}

.menu__sum {
  order: 2;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  cursor: pointer;
  list-style: none;
}

.menu__sum::-webkit-details-marker {
  display: none;
}

.menu__list {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.menu__list .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: var(--shade);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
}

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

.pill__n {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

/* 首屏 */
.hero {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 7vh 1rem 6vh;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero__fig {
  margin: 0;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  will-change: transform;
}

.hero__mono {
  font-weight: 700;
  font-size: 1.6rem;
}

.hero__art {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.hero__h1 {
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  font-weight: 700;
  max-width: 20ch;
  overflow-wrap: break-word;
}

/* 主区网格 */
.stage {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.rail {
  grid-column: 1 / 4;
  align-self: start;
  position: sticky;
  top: 76px;
  min-width: 0;
  border-top: 2px solid var(--ink);
  padding-top: 0.8rem;
}

.rail__h2 {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  margin-bottom: 0.7rem;
}

.rail__list {
  min-width: 0;
}

.rail__list a {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-height: 40px;
  padding: 0.55rem 0.35rem;
  border-top: 1px solid var(--line);
  text-decoration: none;
  font-size: 0.92rem;
  border-radius: 6px;
}

.rail__list li:last-child a {
  border-bottom: 1px solid var(--line);
}

.rail__list a:hover {
  background: var(--shade);
}

.content {
  grid-column: 4 / 13;
  min-width: 0;
}

.sect {
  border-top: 2px solid var(--ink);
  padding-top: 0.9rem;
  margin-bottom: 2.4rem;
}

.sect__h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 700;
}

.subtitle {
  margin: 0.55rem 0 0;
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.74;
}

/* 正文 */
.prose {
  min-width: 0;
  overflow-wrap: break-word;
}

.prose > * {
  max-width: 100%;
  min-width: 0;
}

.prose > article {
  padding: 2.4rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

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

.prose h2 {
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.prose h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.6rem 0 0.4rem;
}

.prose p {
  margin: 0 0 1rem;
  max-width: 68ch;
}

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

.prose li {
  margin-bottom: 0.4rem;
}

.prose figure,
.prose aside {
  margin: 1.3rem 0;
  padding: 1rem 1.1rem;
  background: var(--shade);
  border-radius: var(--r);
}

.prose blockquote {
  margin: 1.3rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 4px solid var(--ink);
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid var(--line);
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  background: var(--shade);
  border-radius: var(--r);
  font-size: 0.92rem;
  line-height: 1.6;
}

.prose img,
.prose video,
.prose iframe {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
  margin: 1rem 0;
}

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

.prose time {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.prose code {
  font-size: 0.9em;
}

/* 页脚 */
.foot {
  border-top: 2px solid var(--ink);
  margin-top: 2rem;
  padding: 2.4rem 1rem 1.2rem;
}

.foot__grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.3fr 1fr;
  gap: 2rem 1.5rem;
}

.foot__grid > * {
  min-width: 0;
}

.foot__mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  border-radius: var(--r);
}

.foot__brand {
  margin: 0.6rem 0 0;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.foot__dl {
  margin: 0;
}

.foot__dl dt {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.foot__dl dd {
  margin: 0;
}

.foot__dl a {
  display: inline-block;
  min-height: 40px;
  padding: 0.45rem 0;
  font-size: 0.92rem;
  text-decoration: none;
}

.foot__dl a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.sub {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 240px;
}

.sub__lb {
  font-size: 0.82rem;
}

.sub__in {
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  max-width: 100%;
}

.sub__btn {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.foot__copy {
  max-width: var(--max);
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

/* 动效 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

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

  .hero__fig {
    transform: none !important;
  }
}

@media (max-width: 960px) {
  .stage {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 3rem;
  }

  .rail {
    grid-column: 1 / -1;
    position: static;
    min-width: 0;
    margin-bottom: 1.8rem;
  }

  .rail__list {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

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

  .rail__list a {
    border: 0;
    background: var(--shade);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    white-space: nowrap;
  }

  .rail__list li:last-child a {
    border-bottom: 0;
  }

  .foot__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .mast {
    flex-wrap: nowrap;
  }

  .menu {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    overflow: hidden;
    flex-wrap: nowrap;
    align-items: center;
  }

  .menu__list {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 0.15rem;
  }

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

  .hero {
    min-height: 40vh;
    padding: 5vh 1rem 4vh;
  }

  .prose > article {
    scroll-margin-top: 130px;
  }

  .prose table {
    font-size: 0.9rem;
  }
}

@media (max-width: 560px) {
  .foot__grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .sub {
    max-width: 100%;
  }
}

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