:root {
  --ink: #192617;
  --ink-deep: #0e1a0b;
  --ink-soft: #12200f;
  --lime: #87ff71;
  --honey: #ffce5c;
  --paper: #eeffe6;
  --muted: #bcd8ae;
  --line: rgba(135, 255, 113, 0.28);
  --glass: rgba(255, 255, 255, 0.055);
  --r: 18px;
  --dock: 124px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom));
  font-family: "Fira Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(rgba(135, 255, 113, 0.14) 1.2px, transparent 1.4px),
    repeating-linear-gradient(135deg, rgba(255, 206, 92, 0.05) 0 2px, transparent 2px 16px);
  background-size: 22px 22px, 100% 100%;
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.5em;
}

a {
  color: var(--lime);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--honey);
}

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

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- 英雄区 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 72px 0 48px;
  overflow: hidden;
  border-bottom: 2px dashed var(--line);
}

.hero-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
}

.hero-title {
  font-size: clamp(2.35rem, 8.5vw, 5rem);
  color: #f7fff2;
  margin: 0 0 20px;
  text-shadow: 6px 6px 0 rgba(135, 255, 113, 0.16);
  word-break: break-word;
}

.hero-title::after {
  content: "";
  display: block;
  width: 96px;
  height: 10px;
  margin-top: 18px;
  background: var(--honey);
  clip-path: polygon(0 0, 100% 0, 92% 100%, 4% 100%);
}

.hero-sub {
  max-width: 54ch;
  margin: 0 0 30px;
  padding-left: 14px;
  border-left: 5px solid var(--lime);
  color: var(--muted);
  font-size: 1.02rem;
}

.collage {
  position: relative;
  height: clamp(190px, 30vw, 300px);
  max-width: 560px;
}

.collage-img {
  position: absolute;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.45);
  will-change: transform;
}

.collage-img.c1 {
  top: 0;
  left: 0;
  width: 58%;
  height: 84%;
  transform: rotate(-4deg);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.collage-img.c2 {
  right: 3%;
  bottom: 0;
  width: 46%;
  height: 68%;
  transform: rotate(5deg);
  clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.shape {
  position: absolute;
  display: block;
}

.tri {
  top: 9%;
  right: 5%;
  width: 190px;
  height: 168px;
  background: var(--lime);
  opacity: 0.82;
  transform: rotate(12deg);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.squig {
  right: 4%;
  bottom: 12%;
  width: 240px;
  height: 60px;
  opacity: 0.7;
  background-image: radial-gradient(circle at 24px 30px, transparent 0 13px, var(--honey) 13px 17px, transparent 17px);
  background-size: 48px 60px;
  background-repeat: repeat-x;
}

.dotgrid {
  left: -34px;
  bottom: 10%;
  width: 160px;
  height: 160px;
  opacity: 0.45;
  transform: rotate(-8deg);
  background-image: radial-gradient(var(--honey) 2px, transparent 2.6px);
  background-size: 18px 18px;
}

.ring {
  top: 26%;
  left: 44%;
  width: 96px;
  height: 96px;
  border: 8px solid var(--lime);
  border-radius: 50%;
  opacity: 0.4;
}

.chip {
  top: 14%;
  left: 6%;
  width: 44px;
  height: 44px;
  background: var(--honey);
  transform: rotate(20deg);
  opacity: 0.7;
  clip-path: polygon(0 0, 100% 20%, 80% 100%, 10% 80%);
}

/* ---------- 正文 + 侧栏 ---------- */
.deck {
  display: grid;
  gap: 30px;
  padding: 34px 0 56px;
}

.prose {
  min-width: 0;
}

.prose > article {
  padding: 46px 0;
  border-top: 2px dashed rgba(255, 255, 255, 0.14);
  scroll-margin-top: 20px;
}

.prose > article:first-child {
  border-top: 0;
  padding-top: 8px;
}

.prose h2 {
  position: relative;
  padding-left: 26px;
  font-size: clamp(1.42rem, 4.6vw, 1.95rem);
  color: #f6ffef;
  margin: 0 0 8px;
}

.prose h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 12px;
  height: 12px;
  background: var(--lime);
  transform: rotate(45deg);
}

.prose h3 {
  font-size: 1.16rem;
  color: var(--honey);
  margin: 1.5em 0 0.4em;
}

.subtitle {
  margin: -2px 0 16px;
  color: var(--honey);
  font-family: "Fira Code", ui-monospace, monospace;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
}

.prose p {
  color: #dcefd1;
  max-width: 68ch;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  max-width: 68ch;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose ul {
  list-style: none;
  padding-left: 1.1em;
}

.prose ul li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--honey);
  transform: rotate(45deg) translateY(-1px);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 5px solid var(--honey);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--glass);
  color: #eaf7df;
}

.prose img,
.prose figure {
  max-width: 100%;
  height: auto;
}

.prose img {
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.96rem;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  text-align: left;
}

.prose th {
  color: var(--lime);
  font-family: "Fira Code", monospace;
}

.prose code {
  font-family: "Fira Code", monospace;
  background: rgba(135, 255, 113, 0.12);
  padding: 1px 6px;
  border-radius: 6px;
}

.rail {
  order: -1;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px dashed var(--line);
  border-radius: var(--r);
  padding: 18px 18px 22px;
}

.rail-title {
  font-size: 1.12rem;
  color: var(--lime);
  margin: 0 0 4px;
}

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

.rail-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rail-list li::before {
  counter-increment: rail;
  content: counter(rail, decimal-leading-zero);
  font-family: "Fira Code", monospace;
  font-size: 0.8rem;
  color: var(--honey);
}

.rail-list a {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 10px;
  color: #e6f8dc;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.16);
}

.rail-list a:hover {
  background: rgba(135, 255, 113, 0.14);
  color: var(--lime);
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  gap: 6px;
  padding: 6px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(14, 26, 11, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 2px solid var(--line);
}

.dock-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  font-family: "Fira Code", monospace;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.05em;
  color: var(--lime);
  text-decoration: none;
  border-bottom: 1px dashed rgba(135, 255, 113, 0.24);
}

.dock-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.dock-bar a,
.dock-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 2px solid var(--lime);
  background: transparent;
  color: var(--lime);
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.dock-bar button {
  background: var(--lime);
  color: var(--ink-deep);
}

.dock-bar a:hover,
.dock-bar button:hover {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--ink-deep);
}

.bars {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 8px;
  background: currentColor;
}

.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.bars::before {
  top: -6px;
}

.bars::after {
  top: 6px;
}

/* ---------- 全屏菜单 ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 18px 130px;
  overflow: auto;
  background-color: var(--ink-deep);
  background-image:
    radial-gradient(rgba(255, 206, 92, 0.2) 1.4px, transparent 1.6px),
    repeating-linear-gradient(45deg, rgba(135, 255, 113, 0.06) 0 2px, transparent 2px 18px);
  background-size: 24px 24px, 100% 100%;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.36s ease, visibility 0.36s ease;
}

.sheet.is-open {
  transform: none;
  visibility: visible;
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-brand {
  font-family: "Fira Code", monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--honey);
  font-size: 1.1rem;
}

.sheet-close {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px dashed var(--honey);
  background: transparent;
  color: var(--honey);
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
  cursor: pointer;
}

.sheet-search input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 2px dashed var(--lime);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
  font-family: inherit;
  font-size: 1rem;
}

.sheet-search input::placeholder {
  color: var(--muted);
}

.sheet-list {
  counter-reset: sheet;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.sheet-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sheet-list li::before {
  counter-increment: sheet;
  content: counter(sheet, decimal-leading-zero);
  font-family: "Fira Code", monospace;
  font-size: 0.86rem;
  color: var(--honey);
  min-width: 2.2ch;
}

.sheet-list a {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  border-left: 6px solid var(--honey);
  background: rgba(135, 255, 113, 0.08);
  color: #f0ffe9;
  font-family: "Fira Code", monospace;
  font-size: 1.02rem;
  text-decoration: none;
}

.sheet-list a:hover {
  background: var(--lime);
  color: var(--ink-deep);
}

.sheet-squig {
  display: block;
  height: 46px;
  margin-top: 8px;
  opacity: 0.6;
  background-image: radial-gradient(circle at 22px 23px, transparent 0 11px, var(--lime) 11px 14px, transparent 14px);
  background-size: 44px 46px;
  background-repeat: repeat-x;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 40px;
  padding: 38px 15px calc(var(--dock) + 40px);
  background: var(--ink-deep);
  border-top: 2px solid var(--line);
}

.foot-in {
  max-width: 1180px;
  margin: 0 auto;
}

.foot-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 2px dashed rgba(255, 206, 92, 0.32);
}

.foot-brand {
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  color: var(--honey);
  margin: 0;
}

.foot-squig {
  flex: 1;
  height: 30px;
  min-width: 60px;
  opacity: 0.55;
  background-image: radial-gradient(circle at 15px 15px, transparent 0 7px, var(--lime) 7px 10px, transparent 10px);
  background-size: 30px 30px;
  background-repeat: repeat-x;
}

.foot-grid {
  display: grid;
  gap: 16px;
  padding: 22px 0;
}

.foot-col {
  padding: 14px 16px;
  border: 1px dashed rgba(135, 255, 113, 0.26);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.foot-col h2 {
  font-size: 1rem;
  color: var(--lime);
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}

.foot-col address {
  font-style: normal;
  color: #e2f5d7;
  font-size: 0.96rem;
  line-height: 1.6;
}

.foot-host {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: "Fira Code", monospace;
  font-size: 0.86rem;
  word-break: break-all;
}

.foot-dl,
.foot-ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-dl dt,
.foot-dl dd,
.foot-ul li {
  margin: 0;
}

.foot-dl a,
.foot-ul a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  color: #e2f5d7;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.16);
}

.foot-dl dt a {
  color: var(--honey);
}

.foot-dl a:hover,
.foot-ul a:hover {
  color: var(--lime);
}

.sub {
  display: grid;
  gap: 8px;
}

.sub input {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--paper);
  font-family: inherit;
  font-size: 0.95rem;
}

.sub input::placeholder {
  color: var(--muted);
}

.sub button {
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid var(--lime);
  background: var(--lime);
  color: var(--ink-deep);
  font-family: "Fira Code", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.sub button:hover {
  background: var(--honey);
  border-color: var(--honey);
}

.foot-bottom {
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
  text-align: center;
}

.foot-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ---------- 动效 ---------- */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rv.on {
  opacity: 1;
  transform: none;
}

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

/* ---------- 断点 ---------- */
@media (min-width: 720px) {
  .wrap {
    padding: 0 26px;
  }
  .foot {
    padding-left: 26px;
    padding-right: 26px;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .hero {
    padding: 96px 0 64px;
  }
}

@media (min-width: 960px) {
  .deck {
    grid-template-columns: minmax(0, 1fr) 272px;
    gap: 46px;
    align-items: start;
    padding: 46px 0 70px;
  }
  .rail {
    order: 0;
    position: sticky;
    top: 24px;
  }
  .prose > article {
    padding: 60px 0;
  }
  .foot-grid {
    grid-template-columns: 1.15fr 1fr 1fr 1.1fr;
  }
  .dock {
    padding-left: 26px;
    padding-right: 26px;
  }
  .sheet {
    padding: 26px 26px 140px;
    align-items: center;
  }
  .sheet-top,
  .sheet-search,
  .sheet-list {
    width: 100%;
    max-width: 640px;
  }
}

@media (max-width: 420px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .dotgrid {
    display: none;
  }
  .ring {
    left: 62%;
    top: 18%;
  }
}

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