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

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #f7f4ec;
  --white: #ffffff;
  --line: 3px solid #000000;
  --sh: 5px 5px 0 #000000;
  --sh-sm: 3px 3px 0 #000000;
  --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: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: Calistoga, Georgia, "PingFang SC", "Microsoft YaHei", serif;
  line-height: 1.16;
  margin: 0 0 .5em;
  font-weight: 400;
  letter-spacing: -.01em;
}

a {
  color: inherit;
}

p {
  margin: 0 0 1em;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: var(--paper);
  border-bottom: var(--line);
}

.brandmark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: var(--line);
  background: var(--red);
  box-shadow: var(--sh-sm);
  border-radius: var(--r);
  text-decoration: none;
}

.brandmark:hover {
  background: var(--blue);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
}

.brandmark-glyph {
  font-family: Calistoga, Georgia, serif;
  font-size: 24px;
  line-height: 1;
}

.brandmark-img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 11px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: var(--r);
}

.nav a:hover,
.nav a:focus-visible {
  border-color: #000;
  background: var(--blue);
  box-shadow: var(--sh-sm);
  outline: none;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  min-height: calc(100vh - 67px);
  min-height: calc(100svh - 67px);
  padding: clamp(26px, 5vw, 64px);
  padding-bottom: clamp(40px, 9vw, 110px);
  background: var(--blue);
  border-bottom: var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  pointer-events: none;
}

.hero-bg span {
  font-family: Calistoga, Georgia, "PingFang SC", serif;
  font-size: clamp(96px, 24vw, 300px);
  line-height: .88;
  color: #000;
  opacity: .16;
  white-space: nowrap;
  transform: rotate(-2deg) translateX(-6%);
}

.hero-in {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  text-align: right;
  max-width: min(880px, 100%);
}

.hero h1 {
  font-size: clamp(38px, 8.2vw, 88px);
  margin: 0;
  text-shadow: 4px 4px 0 var(--white);
}

.hero-desc {
  max-width: 44ch;
  margin: 0;
  padding: 12px 16px;
  background: var(--white);
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- 双栏 ---------- */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  align-items: start;
  gap: clamp(22px, 4vw, 52px);
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 60px) clamp(15px, 4vw, 44px) clamp(40px, 7vw, 80px);
}

.stream {
  min-width: 0;
}

.stream div {
  scroll-margin-top: 86px;
  padding: clamp(18px, 3.5vw, 34px) 0 clamp(26px, 4vw, 44px);
  border-bottom: 3px dashed #000;
}

.stream div:first-child {
  padding-top: 0;
}

.stream div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stream h2,
.stream h3 {
  font-size: clamp(23px, 3.6vw, 38px);
  scroll-margin-top: 86px;
}

.stream h2 span,
.stream h3 span {
  display: inline;
  background: linear-gradient(to top, var(--red) 0 32%, transparent 32% 100%);
}

.stream h3 {
  font-size: clamp(20px, 2.6vw, 26px);
}

.stream p {
  font-size: 17px;
}

.stream ul,
.stream ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.stream li {
  margin: .3em 0;
}

.stream a {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
  text-decoration-color: var(--red);
}

.stream a:hover {
  background: var(--red);
  text-decoration-color: #000;
}

.stream blockquote {
  margin: 1.3em 0;
  padding: 14px 18px;
  background: var(--white);
  border: var(--line);
  border-bottom: 7px solid var(--red);
  border-radius: var(--r);
  box-shadow: var(--sh);
}

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

.stream figure {
  margin: 1.3em 0;
  padding: 10px;
  background: var(--white);
  border: var(--line);
  border-bottom: 7px solid var(--blue);
  border-radius: var(--r);
  box-shadow: var(--sh);
}

.stream figcaption {
  font-size: 15px;
  margin-top: 8px;
}

.stream img {
  display: block;
  max-width: 100%;
  height: auto;
  border: var(--line);
  border-radius: var(--r);
}

.stream figure img {
  border: 0;
}

.stream table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  background: var(--white);
  border: var(--line);
  border-radius: var(--r);
  overflow: hidden;
  font-size: 16px;
}

.stream th,
.stream td {
  border: 2px solid #000;
  padding: 9px 11px;
  text-align: left;
}

.stream th {
  background: var(--blue);
  font-weight: 700;
}

.stream strong {
  font-weight: 700;
}

.stream code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .92em;
  background: #000;
  color: #fff;
  padding: .1em .35em;
  border-radius: 4px;
}

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 18px;
}

.rail-block {
  background: var(--white);
  border: var(--line);
  border-bottom: 8px solid var(--red);
  border-radius: var(--r);
  box-shadow: var(--sh);
  padding: 13px 15px 16px;
}

.rail-h {
  font-size: 18px;
  margin: 0;
}

.rail-h span {
  display: inline-block;
  padding: 2px 9px;
  background: var(--blue);
  border: 3px solid #000;
  border-radius: var(--r);
}

.rail-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  background: var(--paper);
  border: 3px solid #000;
  border-radius: var(--r);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  background: var(--blue);
  box-shadow: var(--sh-sm);
  outline: none;
  transform: translate(-2px, -2px);
}

.rail-block--back {
  border-bottom-color: var(--blue);
}

.rail-back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  font-weight: 700;
  text-decoration: none;
  background: var(--red);
  color: #000;
  border: 3px solid #000;
  border-radius: var(--r);
}

.rail-back:hover {
  background: #000;
  color: var(--red);
}

/* ---------- 页脚 ---------- */
.foot {
  background: var(--ink);
  color: var(--white);
  padding: clamp(26px, 5vw, 54px) clamp(15px, 4vw, 44px) 22px;
  border-top: var(--line);
}

.cta-block {
  max-width: 1100px;
  margin: 0 auto;
}

.cta-block a {
  display: block;
  padding: 14px 12px;
  text-align: center;
  text-decoration: none;
  font-family: Calistoga, Georgia, "PingFang SC", serif;
  font-size: clamp(30px, 6.6vw, 64px);
  line-height: 1.1;
  color: var(--blue);
  border: 3px solid var(--white);
  border-radius: var(--r);
  box-shadow: 6px 6px 0 var(--red);
  word-break: break-word;
}

.cta-block a:hover {
  color: #000;
  background: var(--blue);
  box-shadow: 6px 6px 0 var(--white);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 36px auto 26px;
}

.foot dl {
  margin: 0;
}

.foot dt {
  font-family: Calistoga, Georgia, "PingFang SC", serif;
  font-size: 18px;
  color: var(--blue);
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--red);
}

.foot dd {
  margin: 0;
}

.foot dd a,
.foot-brand {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--white);
}

.foot dd a:hover {
  color: var(--red);
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 16px;
  border-top: 3px solid var(--white);
}

.foot-bar p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
  border: 3px solid var(--white);
  border-radius: var(--r);
}

.foot-links a:hover {
  background: var(--blue);
  color: #000;
  border-color: #000;
}

/* ---------- 入场动效 ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .8, .3, 1);
}

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

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

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

  .brandmark:hover,
  .rail-list a:hover {
    transform: none;
  }
}

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

  .rail {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    order: 2;
  }
}

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

  .hero {
    padding-bottom: clamp(34px, 10vw, 60px);
  }
}

@media (max-width: 480px) {
  .nav a {
    padding: 0 9px;
  }

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

  .stream h2 span,
  .stream h3 span {
    background: linear-gradient(to top, var(--red) 0 28%, transparent 28% 100%);
  }
}

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