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

:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #0a0a0a;
  --panel2: #121212;
  --line: #1c1c1c;
  --line2: #2a2a2a;
  --ink: #ededed;
  --dim: #9b9b9b;
  --accent: #4d9dff;
  --gold: #d8b26a;
  --maxw: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  letter-spacing: .004em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: rgba(77, 157, 255, .32);
  color: #fff;
}

/* 顶部两行 */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(0, 0, 0, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.brandrow {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-right: 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .06em;
}

.marktxt { text-shadow: 0 0 14px rgba(77, 157, 255, .22); }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(77, 157, 255, .85);
  flex: 0 0 auto;
}

.markimg {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
  border-bottom: 2px solid var(--accent);
}

.contact {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line2);
  border-bottom: 2px solid var(--accent);
  border-radius: 4px;
  color: #cfcfcf;
  text-decoration: none;
  font-size: 16px;
  transition: color .2s ease, background .2s ease;
}

.contact:hover,
.contact:focus-visible {
  color: #ffffff;
  background: #101010;
}

/* 菜单行 */
.tabs {
  max-width: var(--maxw);
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

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

.tabs > ol {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0 20px;
  width: max-content;
  min-width: 100%;
  list-style: none;
}

.tabs > li { display: flex; }

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 4px;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.tabs .tick { opacity: .45; flex: 0 0 auto; }

.tabs a:hover,
.tabs a:focus-visible {
  color: #ffffff;
  background: #101010;
  border-bottom-color: var(--accent);
}

.tabs a:hover .tick,
.tabs a:focus-visible .tick { opacity: 1; color: var(--accent); }

/* 开篇 */
.hero {
  position: relative;
  overflow: hidden;
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 45vh;
  padding: clamp(22px, 4vw, 46px) 20px clamp(18px, 3vw, 30px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  border-bottom: 1px solid var(--line);
}

.ghost {
  position: absolute;
  left: 14px;
  top: 4px;
  margin: 0;
  font-size: clamp(52px, 15.5vw, 164px);
  line-height: .9;
  font-weight: 700;
  letter-spacing: -.04em;
  color: #141414;
  white-space: nowrap;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.hero-copy {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 14px;
  width: 100%;
  text-align: right;
}

.spark {
  margin-top: 12px;
  flex: 0 0 auto;
  color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(77, 157, 255, .8));
}

h1 {
  margin: 0;
  font-size: clamp(27px, 5.6vw, 50px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.015em;
  text-shadow: 0 0 26px rgba(77, 157, 255, .16);
}

/* 主体：侧栏在左 */
main { padding-bottom: 46px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 20px 0;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 118px;
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.railt {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--dim);
}

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

.rail-list a {
  display: block;
  padding: 9px 11px;
  font-size: 16px;
  line-height: 1.4;
  color: #b4b4b4;
  text-decoration: none;
  background: var(--panel);
  border-radius: 4px;
  border-bottom: 2px solid #191919;
  transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #ffffff;
  background: #101010;
  border-bottom-color: var(--accent);
  box-shadow: 0 0 14px rgba(77, 157, 255, .16);
}

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 14px;
  padding: 6px 0;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
}

.totop:hover,
.totop:focus-visible { color: var(--accent); }

.sheet { min-width: 0; }

/* 正文 */
.prose {
  max-width: 70ch;
  overflow-wrap: break-word;
}

.prose h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #ffffff;
}

.prose-h {
  font-size: clamp(19px, 2.6vw, 23px) !important;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.subtitle {
  margin: 10px 0 6px;
  font-size: 16px;
  color: var(--dim);
}

.prose > div {
  margin-top: 34px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 118px;
}

.prose div h2 {
  position: relative;
  padding-left: 16px;
}

.prose div h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .32em;
  width: 4px;
  height: 1.05em;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(77, 157, 255, .85);
}

.prose h3 {
  margin: 1.5em 0 .5em;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
}

.prose p { margin: 0 0 1.1em; }

.prose a {
  color: #8dc2ff;
  text-decoration: underline;
  text-decoration-color: rgba(141, 194, 255, .35);
  text-underline-offset: .22em;
}

.prose a:hover {
  color: #ffffff;
  text-decoration-color: var(--accent);
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.2em;
}

.prose li { margin: 0 0 .5em; }
.prose li::marker { color: var(--accent); }

.prose strong { color: #ffffff; font-weight: 600; }

.prose img {
  display: block;
  margin: 1.3em 0;
  border-radius: 4px;
  border-bottom: 2px solid var(--accent);
  height: auto;
}

.prose figure { margin: 1.3em 0; }

.prose figcaption {
  margin-top: 8px;
  font-size: 16px;
  color: var(--dim);
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--gold);
  color: #d6d6d6;
}

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

.prose table {
  width: 100%;
  margin: 1.3em 0;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.prose th {
  background: var(--panel2);
  color: #ffffff;
  font-weight: 600;
}

.prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #111111;
  font-size: 15px;
}

.prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* 页脚 */
.foot {
  margin-top: 30px;
  padding: 40px 0 30px;
  border-top: 1px solid var(--line);
}

.foot-giant {
  overflow: hidden;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.giant {
  margin: 0;
  font-size: clamp(42px, 12.5vw, 128px);
  line-height: .95;
  font-weight: 700;
  letter-spacing: -.035em;
  white-space: nowrap;
  background: linear-gradient(180deg, #f4f4f4 10%, #383838 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-base {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding: 0 20px;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.copy {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 16px;
  color: var(--dim);
  text-decoration: none;
  border-radius: 4px;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: #ffffff;
  border-bottom-color: var(--accent);
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 24px;
  }
  .rail { display: none; }
  .hero { min-height: 38vh; }
  .prose > div { scroll-margin-top: 104px; }
  .top { position: static; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .prose { max-width: none; }
  .foot-row { flex-direction: column; align-items: flex-start; }
  .ghost { font-size: clamp(46px, 17vw, 82px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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