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

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

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

body {
  margin: 0;
  background: #fff;
  color: #000;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

small {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: #5a5a5a;
  margin-bottom: .45rem;
}

/* ---------- 左侧竖排导航 ---------- */

.rail {
  background: #fff;
  border-right: 1px solid #000;
  padding: 1.6rem 1.15rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  z-index: 30;
  min-width: 0;
  max-width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  color: #000;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -.05em;
  line-height: 1;
  min-width: 0;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: 0;
  flex: none;
}

.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-search {
  display: flex;
  gap: .4rem;
  margin: 0;
  min-width: 0;
}

.rail-search input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 44px;
  padding: 0 .95rem;
  border: 1.5px solid #000;
  border-radius: 999px;
  background: transparent;
  color: #000;
  font: inherit;
  font-size: .94rem;
}

.rail-search input::placeholder { color: #777; }

.rail-search button {
  flex: none;
  height: 44px;
  min-width: 54px;
  border: 1.5px solid #000;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font: inherit;
  font-size: .94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.rail-search button:hover { background: #fff; color: #000; }

.rail nav {
  min-width: 0;
  width: 100%;
}

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

.pill {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .5rem 1.05rem;
  border: 1.5px solid #000;
  border-radius: 999px;
  color: #000;
  text-decoration: none;
  font-size: .97rem;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1.3;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.pill:hover,
.pill:focus-visible,
.pill[aria-current="true"] {
  background: #000;
  color: #fff;
}

/* ---------- 主体 ---------- */

main {
  min-width: 0;
  max-width: 100%;
}

.hero {
  position: relative;
  min-height: 70vh;
  padding: clamp(1.5rem, 5vw, 4.5rem);
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  min-width: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: clamp(30px, 7vw, 88px);
  background: #fff;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-row {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem 1.5rem;
  text-align: right;
  padding-bottom: clamp(28px, 7vw, 84px);
  min-width: 0;
}

.hero-icon {
  flex: none;
  display: block;
  width: clamp(54px, 8vw, 88px);
  padding: 8px;
  background: #fff;
  border-radius: 12px;
  will-change: transform;
}

.hero-icon:empty { display: none; }

.hero-icon img,
.hero-icon-img {
  display: block;
  width: 100%;
  height: auto;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8.6vw, 7.4rem);
  line-height: .9;
  font-weight: 900;
  letter-spacing: -.05em;
  text-wrap: balance;
  max-width: 22ch;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

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

.content {
  padding: 0 clamp(1.25rem, 5vw, 4.5rem) clamp(3rem, 8vw, 7rem);
  min-width: 0;
}

.content > section {
  max-width: 68ch;
  padding-block: clamp(2.4rem, 6vw, 5rem);
  border-top: 1px solid rgba(0, 0, 0, .16);
  scroll-margin-top: 1.5rem;
  min-width: 0;
}

.content > section:first-child {
  border-top: 0;
  padding-top: clamp(2rem, 5vw, 4rem);
}

.content h2 {
  display: inline-block;
  max-width: 100%;
  margin: .1rem 0 1.25rem;
  padding-bottom: .18rem;
  border-bottom: 6px solid #000;
  font-size: clamp(1.7rem, 4.4vw, 3.1rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.045em;
  overflow-wrap: break-word;
}

.content h3 {
  margin: 1.8rem 0 .6rem;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

.content p {
  margin: 0 0 1.15rem;
  max-width: 66ch;
  line-height: 1.85;
  overflow-wrap: break-word;
}

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

.content ul,
.content ol {
  margin: 0 0 1.2rem;
  padding-left: 1.25rem;
}

.content li { margin-bottom: .5rem; }

.content a {
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}

.content strong { font-weight: 700; }

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.content figure { margin: 1.5rem 0; }

.content figcaption {
  margin-top: .5rem;
  font-size: .85rem;
  color: #5a5a5a;
}

.content blockquote {
  margin: 1.6rem 0;
  padding: .2rem 0 .2rem 1.2rem;
  border-left: 7px solid #000;
  font-weight: 500;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  margin: 0 0 1.2rem;
  table-layout: fixed;
}

.content th,
.content td {
  padding: .6rem .5rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, .16);
  overflow-wrap: break-word;
}

.content time {
  font-size: .85rem;
  letter-spacing: .04em;
  color: #5a5a5a;
}

.content pre {
  max-width: 100%;
  overflow-x: auto;
}

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

footer {
  background: #000;
  color: #fff;
  padding: clamp(2.4rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4.5rem) 1.5rem;
  display: grid;
  gap: 2.4rem;
  min-width: 0;
  max-width: 100%;
}

footer small { color: #b5b5b5; }

.foot-a { min-width: 0; }

.foot-big {
  margin: .1rem 0 1rem;
  font-size: clamp(2.8rem, 10.5vw, 7.5rem);
  line-height: .86;
  font-weight: 900;
  letter-spacing: -.05em;
  word-break: break-word;
  overflow-wrap: break-word;
}

.foot-desc {
  margin: 0;
  max-width: 44ch;
  color: #dcdcdc;
  line-height: 1.75;
}

.foot-desc:empty { display: none; }

.foot-b { min-width: 0; }

.foot-h {
  margin: .2rem 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.foot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 .9rem;
}

.foot-list li { min-width: 0; }

.foot-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .2rem 0;
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  overflow-wrap: break-word;
}

.foot-list a:hover,
.foot-list a:focus-visible {
  color: #000;
  background: #fff;
  border-bottom-color: #fff;
  padding-left: .4rem;
}

.foot-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .28);
  font-size: .85rem;
  color: #cfcfcf;
  min-width: 0;
}

.foot-bar a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}

/* ---------- 动效 ---------- */

.js .content > section {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}

.js .content > section.in {
  opacity: 1;
  transform: none;
}

/* ---------- 断点 ---------- */

@media (max-width: 899px) {
  .rail {
    border-right: 0;
    border-bottom: 1px solid #000;
    padding: .9rem 1rem .85rem;
    gap: .7rem;
    width: 100%;
  }

  .rail nav ul {
    flex-direction: row;
    gap: .45rem;
    overflow-x: auto;
    padding-bottom: .2rem;
    scrollbar-width: none;
  }

  .rail nav ul::-webkit-scrollbar { display: none; }

  .pill {
    white-space: nowrap;
    font-size: .88rem;
    padding: .35rem .85rem;
  }

  .rail-search {
    max-width: 340px;
    width: 100%;
  }

  .hero { min-height: 60vh; }
}

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

  .hero-row {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (min-width: 760px) {
  footer { grid-template-columns: 1.15fr .85fr; }
}

@media (min-width: 900px) {
  body { grid-template-columns: 300px minmax(0, 1fr); }

  .rail {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
  }

  main { grid-column: 2; }
  footer { grid-column: 2; }

  .content > section { scroll-margin-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .js .content > section { opacity: 1; transform: none; }
}

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