@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #f7f4ec;
  --line: 3px solid #000000;
  --shadow: 6px 6px 0 #000000;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .05) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, .05) 1px, transparent 1px);
  background-size: 30px 30px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
}

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

a {
  color: inherit;
}

p {
  margin: 0 0 1rem;
}

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

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

.skip {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 200;
  padding: .6rem 1rem;
  border: var(--line);
  background: var(--blue);
  font-family: var(--mono);
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 4px 4px 0 #000;
}

.skip:focus {
  top: .75rem;
}

/* 顶部细条 */
.strip {
  background: var(--ink);
  color: #fff;
}

.strip p {
  margin: 0;
  padding: .55rem 1rem;
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: .14em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 页头 */
.mast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  padding: .8rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: var(--line);
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  min-height: 46px;
  padding: .15rem .35rem;
  border: var(--line);
  background: var(--blue);
  box-shadow: 4px 4px 0 #000;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}

.brand__mark:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

.brand__img {
  width: 30px;
  height: 30px;
}

.brand__glyph {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.brand__name {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .35rem .8rem;
  border: var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

.nav a:hover,
.nav a[aria-current="true"] {
  background: var(--blue);
  box-shadow: 3px 3px 0 #000;
  transform: translate(-1px, -1px);
}

/* 主体网格 */
main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 3.5rem;
}

.doc {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}

/* 首屏 */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
  min-height: 100vh;
  padding: 1.75rem clamp(1rem, 3vw, 2rem) 2.5rem;
  border: var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero__ghost {
  position: absolute;
  right: -.4rem;
  bottom: -1.5rem;
  z-index: -1;
  max-width: 100%;
  font-family: var(--mono);
  font-size: clamp(3rem, 12vw, 8rem);
  font-weight: 700;
  line-height: .85;
  letter-spacing: -.03em;
  color: rgba(59, 177, 255, .32);
  white-space: nowrap;
}

.hero__fig {
  align-self: flex-start;
  padding: .4rem;
  border: var(--line);
  background: var(--paper);
  box-shadow: 4px 4px 0 #000;
  max-width: 100%;
}

.hero__art {
  width: 132px;
  height: auto;
}

.hero h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.9rem, 5.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.015em;
  max-width: 22ch;
}

.hero__lead {
  margin: 0;
  max-width: 46ch;
  padding-left: .9rem;
  border-left: 6px solid var(--red);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* 正文区块 */
.doc > div {
  padding: 1.75rem clamp(1rem, 3vw, 1.75rem);
  border: var(--line);
  background: rgba(255, 255, 255, .74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  scroll-margin-top: 6.5rem;
  min-width: 0;
}

.doc h2 {
  margin: 0 0 .9rem;
  font-family: var(--mono);
  font-size: clamp(1.35rem, 3.2vw, 1.95rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.doc h2 > span,
.rail__h > span {
  display: inline-block;
}

.doc h2 > span {
  box-shadow: inset 0 -.42em 0 var(--blue);
}

.doc h3 {
  margin: 1.5rem 0 .6rem;
  font-family: var(--mono);
  font-size: 1.15rem;
  line-height: 1.35;
}

.doc h3 > span {
  display: inline-block;
  box-shadow: inset 0 -.38em 0 var(--red);
}

.doc ul,
.doc ol {
  padding-left: 1.4rem;
}

.doc li {
  margin-bottom: .4rem;
}

.doc a {
  text-decoration: none;
  border-bottom: 2px solid var(--blue);
}

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

.doc blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border: var(--line);
  background: #fff;
  box-shadow: 4px 4px 0 #000;
}

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

.doc figure {
  margin: 1.25rem 0;
}

.doc figure img {
  border: var(--line);
  box-shadow: 4px 4px 0 #000;
}

.doc figcaption {
  margin-top: .5rem;
  font-family: var(--mono);
  font-size: 1rem;
  opacity: .8;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  border: var(--line);
  font-size: 1rem;
}

.doc th,
.doc td {
  padding: .55rem .7rem;
  border: 2px solid #000;
  text-align: left;
  vertical-align: top;
}

.doc th {
  background: var(--blue);
  font-family: var(--mono);
}

.doc code {
  font-family: var(--mono);
  padding: .1rem .3rem;
  background: #fff;
  border: 2px solid #000;
}

/* 侧栏 */
.rail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.rail__block {
  padding: 1rem;
  border: var(--line);
  background: #fff;
  box-shadow: 5px 5px 0 #000;
}

.rail__block--alt {
  background: var(--red);
  color: #fff;
}

.rail__h {
  margin: 0 0 .75rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.rail__h > span {
  box-shadow: inset 0 -.4em 0 rgba(255, 255, 255, .7);
}

.rail__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail__list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .25rem .2rem;
  border-bottom: 2px solid rgba(0, 0, 0, .14);
  font-size: 1rem;
  text-decoration: none;
}

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

.rail__kw {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.5;
}

/* 页脚 */
footer {
  margin-top: 1rem;
  padding: 2.5rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
  border-top: 6px solid #000;
  background: var(--ink);
  color: #fff;
}

.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  max-width: 1180px;
  margin: 0 auto;
}

.foot__grid dl {
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--blue);
  min-width: 0;
}

.foot__grid dt {
  margin-bottom: .55rem;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--blue);
}

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

.foot__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border: 3px solid #fff;
  background: var(--blue);
  color: #000;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.35rem;
}

.foot__img {
  width: 44px;
  height: 44px;
}

.foot__links {
  display: flex;
  flex-direction: column;
}

.foot__links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}

.foot__links a:hover {
  border-bottom-color: var(--red);
  color: var(--blue);
}

.foot__kw {
  font-family: var(--mono);
  line-height: 1.6;
}

.sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  max-width: 1180px;
  margin: 2rem auto 1.25rem;
  padding: 1rem;
  border: 3px solid #fff;
  background: #141414;
}

.sub__label {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: .08em;
}

.sub input {
  flex: 1 1 12rem;
  min-width: 0;
  min-height: 44px;
  padding: .4rem .65rem;
  border: 3px solid #fff;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 1rem;
}

.sub button {
  min-height: 44px;
  padding: .4rem 1.4rem;
  border: 3px solid #fff;
  border-radius: 0;
  background: var(--blue);
  color: #000;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}

.sub button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--red);
}

.foot__note {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 1rem;
  border-top: 2px solid rgba(255, 255, 255, .25);
  font-family: var(--mono);
  font-size: 1rem;
}

/* 进场动效 */
.rv-on .doc > div {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}

.rv-on .doc > div.in {
  opacity: 1;
  transform: none;
}

/* 断点 */
@media (min-width: 700px) {
  .foot__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

@media (min-width: 960px) {
  .mast {
    position: sticky;
    top: 0;
    z-index: 60;
  }

  main {
    grid-template-columns: minmax(0, 1fr) 19rem;
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .rail {
    position: sticky;
    top: 6.5rem;
    align-self: start;
  }

  .hero {
    justify-content: center;
    min-height: 100vh;
    padding-top: 2.5rem;
  }

  .doc > div {
    scroll-margin-top: 8rem;
  }
}

@media (max-width: 699px) {
  .doc > div {
    scroll-margin-top: 1rem;
  }

  .strip p {
    letter-spacing: .06em;
  }
}

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

  .rv-on .doc > div {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .brand__mark,
  .nav a,
  .sub button {
    transition: none;
  }
}

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