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

:root {
  --ink: #000000;
  --sur: #121212;
  --txt: #dcdde2;
  --dim: #98a0b0;
  --line: rgba(122, 160, 255, 0.18);
  --line-strong: rgba(122, 167, 255, 0.45);
  --blue: #274779;
  --neon: #7aa7ff;
  --glow: 0 0 14px rgba(90, 140, 255, 0.4);
  --max: 1180px;
  --title: "Amatic SC", "Cabin", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "Cabin", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--txt);
  font: 17px/1.75 var(--body);
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

a { color: var(--neon); }

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

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.15rem;
}

/* ---- head ---- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.head-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.15rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.1rem 0.3rem 0.1rem 0;
  color: #fff;
  text-decoration: none;
  font-family: var(--title);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
}

.brand .mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: linear-gradient(140deg, var(--blue), #0b1a33);
  border: 1px solid var(--line-strong);
  color: #dfe9ff;
  font-size: 1.25rem;
  box-shadow: var(--glow);
}

.brand .logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 4px;
}

.brand:hover .brand-txt { text-shadow: var(--glow); }

.menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.8rem;
}

.menu p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  margin: 0;
}

.menu p a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.72rem;
  border-radius: 4px;
  color: var(--txt);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.menu p a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--blue);
  margin-right: 0.5rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.menu p a:hover {
  background: rgba(122, 167, 255, 0.1);
  color: #fff;
  transform: translateY(-1px);
}

.menu p a:hover::before {
  background: var(--neon);
  box-shadow: var(--glow);
}

.search {
  display: flex;
  gap: 0.4rem;
  margin: 0;
}

input[type="search"],
input[type="email"] {
  min-width: 0;
  min-height: 44px;
  padding: 0.45rem 0.65rem;
  background: #0a0a0c;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--txt);
  font: inherit;
  font-size: 1rem;
}

.search input { width: 13rem; }

input[type="search"]::placeholder,
input[type="email"]::placeholder { color: var(--dim); }

.search button,
.f-sub button {
  min-height: 44px;
  padding: 0 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, rgba(39, 71, 121, 0.8), rgba(18, 18, 18, 0.9));
  color: #e6eeff;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.search button:hover,
.f-sub button:hover {
  border-color: var(--neon);
  color: #fff;
  transform: translateY(-1px);
}

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.15rem 6rem;
  text-align: left;
}

.hero h1 {
  margin: 0;
  max-width: 15em;
  font-family: var(--title);
  font-weight: 700;
  font-size: clamp(2.9rem, 9.5vw, 7rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 26px rgba(90, 140, 255, 0.4);
}

.blade {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -14%;
  height: 52%;
  z-index: 1;
  transform: skewY(-7deg);
  background: linear-gradient(100deg, #071226 0%, #0e2149 38%, #1c3d84 62%, #0a1730 100%);
  box-shadow: 0 0 70px rgba(35, 80, 190, 0.45);
  will-change: transform;
}

/* ---- doc ---- */
.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 0 2.5rem;
  padding: 0 1.15rem;
  max-width: var(--max);
  margin: 0 auto;
}

.doc > section {
  grid-column: 1;
  padding: 3.1rem 0;
  border-top: 1px solid rgba(122, 160, 255, 0.13);
  scroll-margin-top: 9.5rem;
}

.doc > section:first-of-type {
  border-top: 0;
  padding-top: 2.4rem;
}

.doc > section > *:first-child { margin-top: 0; }

.doc section p {
  margin: 0 0 1.15em;
  max-width: 44em;
  line-height: 1.85;
}

.doc section h2 {
  font-family: var(--title);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.6vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #fff;
  margin: 2.4rem 0 0.9rem;
}

.doc section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  color: #eef2fb;
  margin: 2rem 0 0.65rem;
}

.doc section ul,
.doc section ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.doc section li {
  margin: 0.4em 0;
  line-height: 1.8;
}

.doc section a {
  color: var(--neon);
  text-decoration: none;
  border-bottom: 1px solid rgba(122, 167, 255, 0.35);
}

.doc section a:hover {
  color: #fff;
  border-bottom-color: var(--neon);
}

.doc section blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid var(--blue);
  color: #c3c8d4;
}

.doc section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin: 0 0 1.3em;
}

.doc section th,
.doc section td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
  text-align: left;
}

.doc section th { background: rgba(122, 160, 255, 0.07); }

.doc section code {
  font-size: 0.95em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(122, 160, 255, 0.1);
}

/* ---- aside ---- */
.side {
  grid-column: 2;
  grid-row: 1 / span 30;
  align-self: start;
  position: sticky;
  top: 9.5rem;
  margin-top: 2.4rem;
  padding: 1.1rem 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.side h2 {
  margin: 0 0 0.5rem;
  font-family: var(--title);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  color: #fff;
}

.side h2 + h2 { margin-top: 1.3rem; }

.side h2 > span { position: relative; display: inline-block; padding-bottom: 0.3rem; }

.side h2 > span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.2rem;
  height: 2px;
  background: var(--neon);
  box-shadow: var(--glow);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list a,
.side-top a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.5rem;
  border-radius: 4px;
  color: var(--txt);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 0;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.side-list a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--blue);
  margin-right: 0.55rem;
}

.side-list a:hover,
.side-top a:hover {
  background: rgba(122, 167, 255, 0.12);
  color: #fff;
  padding-left: 0.8rem;
}

.side-top { margin: 0; }

/* ---- footer ---- */
.site-foot {
  max-width: var(--max);
  margin: 5rem auto 0;
  padding: 2.6rem 1.15rem 3.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
}

.site-foot p { margin: 0; }

.f-brand strong {
  font-family: var(--title);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 16px rgba(90, 140, 255, 0.3);
}

.f-col {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.f-col a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.2rem;
  color: var(--dim);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.f-col a:hover {
  color: var(--neon);
  border-bottom-color: rgba(122, 167, 255, 0.4);
}

.f-sub {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.f-sub input { flex: 1 1 8rem; }

.f-bar {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(122, 160, 255, 0.12);
  color: var(--dim);
  font-size: 0.95rem;
}

.f-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
}

.f-bar a:hover { color: var(--neon); }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .menu { flex-direction: column; align-items: stretch; }
  .search input { width: 100%; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .side {
    grid-column: 1;
    grid-row: auto;
    position: static;
    margin: 0 0 3rem;
  }
  .doc > section { scroll-margin-top: 12rem; }
  .site-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .hero { min-height: 58vh; }
  .hero-in { padding: 3.2rem 1.15rem 4rem; }
  .hero h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .site-foot { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

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