@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 {
  --red: #ff0000;
  --purple: #8b00ff;
  --ink: #261717;
  --paper: #f7ece7;
  --dim: rgba(247, 236, 231, 0.74);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-2: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.2);
  --pad: clamp(1rem, 4vw, 3rem);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
  color: var(--paper);
  font-family: 'Be Vietnam Pro', 'Noto Sans', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

body::before {
  content: '';
  position: fixed;
  inset: -12vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38vmax 34vmax at 84% 4%, rgba(255, 0, 0, 0.46), transparent 68%),
    radial-gradient(40vmax 42vmax at 4% 24%, rgba(139, 0, 255, 0.44), transparent 70%),
    radial-gradient(46vmax 38vmax at 54% 94%, rgba(255, 0, 0, 0.2), transparent 72%),
    radial-gradient(30vmax 30vmax at 26% 64%, rgba(139, 0, 255, 0.22), transparent 70%);
  filter: blur(8px);
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(38, 23, 23, 0.6);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 40px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand .mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--red);
  font-size: 1rem;
  line-height: 1;
}

.brand .logo {
  height: 34px;
  width: auto;
}

.topsearch {
  margin-left: auto;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.topsearch input {
  width: clamp(7rem, 22vw, 15rem);
  min-height: 40px;
  padding: 0 0.7rem;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.95rem;
  appearance: none;
  -webkit-appearance: none;
}

.topsearch input::placeholder {
  color: rgba(247, 236, 231, 0.55);
}

.topsearch button {
  min-height: 40px;
  padding: 0 0.9rem;
  border: 0;
  border-left: 1px solid var(--line);
  background: rgba(255, 0, 0, 0.85);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.topsearch button:hover {
  background: var(--red);
}

/* 菜单 */
.topnav {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.topnav ul {
  list-style: none;
  margin: 0;
  padding: 0 var(--pad) 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.topnav li {
  position: relative;
}

.topnav li > a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.8rem;
  font-size: 0.95rem;
  color: var(--dim);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.topnav li > a:hover,
.topnav li > a:focus-visible {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.1);
}

.topnav li.grp > a::after {
  content: '';
  margin-left: 0.45rem;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.topnav li > ul {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 70;
  min-width: 11rem;
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0.35rem;
  list-style: none;
  background: rgba(38, 23, 23, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
}

.topnav li > ul li > a {
  display: flex;
  width: 100%;
  min-height: 40px;
}

.topnav li:hover > ul,
.topnav li:focus-within > ul,
.topnav li.open > ul {
  display: flex;
}

.topnav li.off {
  display: none !important;
}

/* hero */
.hero {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(1.6rem, 5vw, 4rem) var(--pad);
  border-bottom: 1px solid var(--line);
}

.hero-back {
  position: absolute;
  right: -0.06em;
  bottom: -0.14em;
  font-size: clamp(5rem, 22vw, 15rem);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: rgba(255, 0, 0, 0.17);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.hero-inner {
  position: relative;
  max-width: 44rem;
  text-align: right;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5.6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero h1::after {
  content: '';
  display: block;
  margin: 1rem 0 0 auto;
  width: 4.5rem;
  height: 3px;
  background: var(--red);
}

.hero-desc {
  margin: 0.9rem 0 0 auto;
  max-width: 32rem;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--dim);
}

/* 主体 */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--pad);
}

.doc {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.2rem);
  align-items: start;
}

.side {
  position: sticky;
  top: 8.5rem;
  padding: 0.95rem 0.9rem 1.1rem;
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.side h2 {
  margin: 0 0 0.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(247, 236, 231, 0.88);
}

.side nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.side nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.4rem 0.3rem 1.1rem;
  font-size: 0.95rem;
  color: var(--dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.side nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.45rem;
  height: 1px;
  background: var(--purple);
  transition: width 0.25s ease, background 0.25s ease;
}

.side nav a:hover {
  color: #fff;
}

.side nav a:hover::before {
  width: 0.85rem;
  background: var(--red);
}

.prose {
  min-width: 0;
}

.prose div {
  position: relative;
  margin-bottom: clamp(1.1rem, 3vw, 1.9rem);
  padding: clamp(1.15rem, 3vw, 2.2rem);
  background: var(--glass);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  scroll-margin-top: 9rem;
  animation: rise 0.6s ease both;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.prose div:nth-child(2) { animation-delay: 0.05s; }
.prose div:nth-child(3) { animation-delay: 0.1s; }
.prose div:nth-child(4) { animation-delay: 0.15s; }
.prose div:nth-child(5) { animation-delay: 0.2s; }
.prose div:nth-child(6) { animation-delay: 0.25s; }
.prose div:nth-child(7) { animation-delay: 0.3s; }

.prose div:hover {
  border-color: rgba(255, 0, 0, 0.45);
  background: var(--glass-2);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.prose h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.prose h2 span {
  position: relative;
  padding-bottom: 0.3rem;
}

.prose h2 span::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2rem;
  height: 2px;
  background: var(--red);
}

.prose h3 {
  margin: 1.6rem 0 0.6rem;
  font-size: 1.2rem;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 1rem;
  color: rgba(247, 236, 231, 0.87);
}

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

.prose a {
  color: #fff;
  border-bottom: 1px solid rgba(255, 0, 0, 0.6);
  transition: border-color 0.2s;
}

.prose a:hover {
  border-color: var(--red);
  color: var(--red);
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: rgba(247, 236, 231, 0.87);
}

.prose li {
  margin: 0.35rem 0;
}

.prose li::marker {
  color: var(--red);
}

.prose img {
  margin: 1rem 0;
  border: 1px solid var(--line);
}

.prose blockquote {
  margin: 1.2rem 0;
  padding: 0.7rem 1rem;
  border-left: 2px solid var(--purple);
  background: rgba(139, 0, 255, 0.13);
  color: rgba(247, 236, 231, 0.92);
}

.prose strong {
  color: #fff;
}

/* 订阅 */
.cta {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(2rem, 5vw, 3rem);
}

.cta-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 1rem;
  align-items: center;
  padding: clamp(1.1rem, 3vw, 1.8rem);
  border: 1px solid rgba(255, 0, 0, 0.42);
  background: rgba(255, 0, 0, 0.11);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

.cta h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  letter-spacing: 0.02em;
}

.cta-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cta-form input {
  flex: 1 1 11rem;
  min-height: 44px;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.1);
  color: var(--paper);
  font: inherit;
}

.cta-form input::placeholder {
  color: rgba(247, 236, 231, 0.6);
}

.cta-form button {
  min-height: 44px;
  padding: 0 1.2rem;
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.cta-form button:hover {
  background: #d40000;
}

/* 页脚 */
footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(1.6rem, 4vw, 2.4rem) var(--pad);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

footer p {
  margin: 0;
  max-width: 34rem;
  font-size: 0.95rem;
  color: var(--dim);
  line-height: 1.65;
}

footer p strong {
  color: #fff;
}

footer .flinks {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  max-width: none;
}

footer .flinks a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

footer .flinks a:hover {
  color: #fff;
  border-color: var(--red);
}

footer small {
  flex: 0 0 100%;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: rgba(247, 236, 231, 0.5);
}

/* 断点 */
@media (max-width: 900px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: static;
    top: auto;
  }

  .side nav ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 0.7rem;
  }

  .topbar {
    position: static;
  }

  .topnav li.grp > a {
    display: none;
  }

  .topnav li.grp,
  .topnav li.grp > ul {
    display: contents;
  }

  .topnav li > ul {
    position: static;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.15rem;
  }

  .prose div {
    scroll-margin-top: 1.5rem;
  }

  .cta-in {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 560px) {
  .brandrow {
    flex-wrap: wrap;
  }

  .topsearch {
    flex: 1 1 100%;
    margin-left: 0;
    order: 3;
  }

  .topsearch input {
    width: 100%;
  }

  .hero {
    padding-bottom: clamp(1.4rem, 6vw, 2.4rem);
  }

  .hero h1::after {
    margin-top: 0.8rem;
  }

  footer .flinks {
    margin-left: 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-delay: 0s !important;
    transition-duration: 0.001s !important;
  }
}

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