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

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --line: #000000;
  --r: 4px;
}

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.68;
  letter-spacing: .01em;
}

a { color: inherit; }

img { max-width: 100%; }

h1, h2, h3 { font-weight: 700; }

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100svh;
}

/* ---------- 左侧竖排栏 ---------- */
.rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1.25rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 54vw;
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.025em;
  text-decoration: none;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mark .logo {
  display: block;
  height: 26px;
  width: auto;
}

.drawer { position: relative; }

.drawer > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: 0 .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 1rem;
  cursor: pointer;
}

.drawer > summary::-webkit-details-marker { display: none; }

.drawer > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--ink);
}

.menu {
  display: grid;
  gap: .12rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: 0 .55rem;
  border-radius: var(--r);
  font-size: 1rem;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

.menu a::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--ink);
  transition: background-color .2s ease;
}

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

.menu a:hover::before,
.menu a:focus-visible::before { background: var(--paper); }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.15rem;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--paper);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}

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

.rail-cta { margin-left: auto; }

/* ---------- 主区 ---------- */
.col { min-width: 0; }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 84svh;
  padding: 1.6rem 1.25rem 0;
  overflow: hidden;
  text-align: right;
}

.hero-title {
  margin: auto 0 1.1rem;
  font-size: clamp(2.3rem, 10.5vw, 7.4rem);
  line-height: .92;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

.hero-title > span { display: inline-block; }

.slash {
  display: block;
  height: clamp(26px, 5vw, 62px);
  background: var(--ink);
  clip-path: polygon(0 0, 100% 42%, 100% 100%, 0 100%);
}

.hero-media {
  display: grid;
  flex: 1;
  min-height: 30svh;
  max-height: 54svh;
  overflow: hidden;
}

.hero-media .shot {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity .85s ease;
}

.hero-media .shot.on { opacity: 1; }

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

/* ---------- 正文 ---------- */
main { min-width: 0; }

.prose {
  counter-reset: sec;
  display: grid;
  gap: 1.4rem;
  max-width: 1200px;
  padding: 2rem 1.25rem 3.5rem;
}

.prose > section {
  counter-increment: sec;
  scroll-margin-top: 5.5rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
}

.prose > section::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  margin-bottom: .7rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .22em;
}

.prose h2 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.55rem, 4.4vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -.025em;
}

.prose h2 > span {
  display: inline-flex;
  align-items: center;
  gap: .62rem;
}

.prose h2 > span::before {
  content: "";
  flex: none;
  width: .58em;
  height: .58em;
  background: var(--ink);
}

.prose h3 {
  margin: 1.6rem 0 .6rem;
  font-size: 1.28rem;
  line-height: 1.3;
  letter-spacing: -.01em;
}

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

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

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

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

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

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

.prose img {
  height: auto;
  border-radius: var(--r);
}

.prose figure { margin: 1.2rem 0; }

.prose figcaption {
  margin-top: .5rem;
  font-size: 1rem;
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  gap: 1.6rem;
  padding: 2rem 1.25rem 1.6rem;
  border-top: 1px solid var(--line);
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.foot-title {
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 4.4rem);
  line-height: .95;
  letter-spacing: -.035em;
}

.foot-title > span { display: inline-block; }

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .4rem 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

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

.foot-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .15rem;
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

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

@media (max-width: 959px) {
  .drawer:not([open]) .menu { display: none; }

  .menu {
    position: absolute;
    top: calc(100% + .6rem);
    left: 0;
    z-index: 40;
    min-width: 226px;
    padding: .4rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
  }
}

@media (min-width: 960px) {
  .shell { grid-template-columns: 302px minmax(0, 1fr); }

  .rail {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
    height: 100svh;
    padding: 2rem 1.4rem;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .mark { max-width: 100%; }

  .drawer { margin-top: .4rem; }

  .drawer > summary { display: none; }

  .rail-cta {
    margin: auto 0 0;
    width: 100%;
    min-height: 48px;
  }

  .hero {
    min-height: 100svh;
    padding: 2.6rem 3rem 0;
  }

  .prose {
    gap: 2rem;
    padding: 3.5rem 3rem 6rem;
  }

  .prose > section { padding: 2rem 2.2rem 2.2rem; }

  .foot { padding: 3rem 3rem 2rem; }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

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