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

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

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

body {
  margin: 0;
  padding-bottom: 112px;
  background: #000;
  color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: #00ff80; }
a:focus-visible { outline: 3px solid #00ff80; outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; }

hr {
  border: 0;
  border-top: 3px solid #00ff80;
  margin: 0.5rem 0 1.1rem;
  height: 0;
}

/* 角落标记 */
.mark {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 40;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00ff80;
  color: #000;
  border: 3px solid #0000ff;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  overflow: hidden;
}
.mark img { width: 100%; height: 100%; object-fit: cover; }

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 4px solid #00ff80;
}

.hero-fig {
  margin: 0;
  padding: 0;
  background: #0000ff;
  border-bottom: 3px solid #0000ff;
  min-height: 148px;
  max-height: 38vh;
  overflow: hidden;
  position: relative;
}

.hero-box {
  min-height: 148px;
  height: 100%;
  background:
    repeating-linear-gradient(45deg, #0000ff 0 12px, #000000 12px 24px);
}

.hero-fig .hero-img {
  width: 100%;
  height: 100%;
  min-height: 148px;
  object-fit: cover;
  will-change: transform;
}

.hero-copy {
  padding: 20px 18px 24px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 7vw, 46px);
  line-height: 1.12;
  color: #fff;
}

.hero-copy hr { margin: 0 0 12px; border-top: 3px solid #00ff80; }

.lede {
  margin: 0;
  color: #00ff80;
  font-size: 15px;
  line-height: 1.55;
}

/* 内容分栏 */
.split { display: grid; grid-template-columns: 1fr; }

.side {
  background: #0000ff;
  color: #fff;
  padding: 18px 16px 22px;
  border-bottom: 4px solid #00ff80;
}

.side h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.16em;
  color: #fff;
}

.side hr { border-top: 3px solid #fff; margin: 8px 0 12px; }

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

.side-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-left: 4px solid #00ff80;
  background: #0000ff;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
}

.side-list a:hover,
.side-list a:focus-visible { background: #00ff80; color: #000; }

.content {
  padding: 20px 18px 44px;
  max-width: 78ch;
  overflow-wrap: break-word;
}

.content article {
  padding: 26px 0 8px;
  border-top: 3px solid #fff;
  scroll-margin-top: 12px;
}

.content article:first-child { border-top: 0; padding-top: 4px; }
.content article:last-child { padding-bottom: 28px; }

.content h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(20px, 5vw, 30px);
  line-height: 1.22;
  color: #00ff80;
}

.content h3 {
  margin: 1.5em 0 0.4em;
  font-size: 18px;
  line-height: 1.35;
  color: #fff;
  border-left: 4px solid #0000ff;
  padding-left: 10px;
}

.content p { margin: 0 0 1em; }
.content ul, .content ol { margin: 0 0 1em; padding-left: 1.5em; }
.content li { margin: 0.35em 0; }
.content a { color: #00ff80; text-decoration: underline; }
.content strong { color: #00ff80; }
.content em { color: #fff; background: #0000ff; font-style: normal; padding: 0 4px; }

.content blockquote {
  margin: 1.2em 0;
  padding: 12px 14px;
  background: #0000ff;
  color: #fff;
  border-left: 4px solid #00ff80;
  border-radius: 4px;
}

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

.content figure { margin: 1.2em 0; }
.content figcaption { font-size: 14px; color: #00ff80; padding-top: 6px; }

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 15px;
}

.content th, .content td { border: 2px solid #00ff80; padding: 8px 10px; text-align: left; }
.content th { background: #0000ff; color: #fff; }

.content code {
  background: #131313;
  border: 1px solid #00ff80;
  padding: 1px 4px;
  font-size: 0.92em;
}

.content pre {
  background: #131313;
  border: 2px solid #00ff80;
  padding: 12px;
  overflow-x: auto;
  font-size: 14px;
}

/* 页脚 */
.foot {
  border-top: 3px solid #0000ff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 14px 16px;
  background: #000;
}

.foot-mark {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00ff80;
  color: #000;
  border: 3px solid #0000ff;
  text-decoration: none;
  font-weight: 700;
  overflow: hidden;
}

.foot-mark img { width: 100%; height: 100%; object-fit: cover; }

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  font-size: 14px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  text-decoration: none;
}

.foot-nav a:hover, .foot-nav a:focus-visible { color: #00ff80; }

.copy {
  margin: 0 0 0 auto;
  font-size: 13px;
  color: #00ff80;
}

/* 底部固定条 */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #000;
  border-top: 3px solid #00ff80;
}

.dock-nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.dock-nav::-webkit-scrollbar { display: none; }

.dock-nav ol {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: max-content;
}

.dock-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border: 2px solid #0000ff;
  border-radius: 4px;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  white-space: nowrap;
}

.dock-nav a:hover,
.dock-nav a:focus-visible { background: #00ff80; color: #000; border-color: #00ff80; }

.cta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid #00ff80;
  border-radius: 4px;
  background: #00ff80;
  color: #000;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}

.cta:hover, .cta:focus-visible { background: #0000ff; color: #fff; border-color: #0000ff; }

/* 滚动揭示 */
.reveal { opacity: 0; }
.reveal.in { opacity: 1; }

/* 桌面 */
@media (min-width: 900px) {
  body { padding-bottom: 96px; font-size: 17px; }

  .mark { top: 14px; left: 14px; width: 48px; height: 48px; }

  .hero {
    grid-template-columns: 1.05fr 1fr;
    min-height: 45vh;
    align-items: stretch;
  }

  .hero-fig {
    min-height: 45vh;
    max-height: none;
    border-bottom: 0;
    border-right: 4px solid #00ff80;
  }

  .hero-fig .hero-img { min-height: 45vh; height: 100%; }
  .hero-box { min-height: 45vh; }

  .hero-copy { padding: 30px 34px; align-items: flex-end; }
  .hero-copy h1 { max-width: 22ch; }

  .split { grid-template-columns: minmax(230px, 280px) 1fr; align-items: start; }

  .side {
    position: sticky;
    top: 0;
    min-height: 62vh;
    padding: 78px 18px 28px;
    border-bottom: 0;
    border-right: 4px solid #00ff80;
  }

  .content { padding: 26px 34px 64px; max-width: none; }
  .content article { padding-top: 30px; }
  .content p, .content ul, .content ol, .content blockquote { max-width: 74ch; }

  .foot { padding: 16px 22px; }
  .dock { padding: 9px 16px calc(9px + env(safe-area-inset-bottom, 0px)); }
}

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

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