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

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

:root {
  --g: #69ff69;
  --c: #00ffff;
  --ink: #172617;
  --bg: #09130d;
  --line: rgba(105, 255, 105, .26);
  --chrome: linear-gradient(135deg, #f2fff6 0%, #bdf8e8 20%, #69ff69 44%, #00ffff 62%, #ddffe9 80%, #8dffb6 100%);
  --metal: linear-gradient(160deg, rgba(240, 255, 246, .97), rgba(182, 246, 255, .95) 58%, rgba(214, 255, 226, .97));
  --glow: 0 0 18px rgba(105, 255, 105, .45);
  --r: 28px;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Fira Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-bottom: 180px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: 200px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 6%, rgba(0, 255, 255, .16), transparent 44%),
    radial-gradient(circle at 90% 3%, rgba(105, 255, 105, .18), transparent 46%),
    var(--bg);
  color: #d9ffe6;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
}

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

/* ============ 底部固定条 ============ */
.deck {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 70;
  width: min(980px, calc(100% - 20px));
  padding: 9px 12px 11px;
  border: 1px solid rgba(0, 255, 255, .55);
  border-radius: var(--r);
  background: var(--metal);
  color: var(--ink);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(105, 255, 105, .38),
    0 18px 44px rgba(0, 0, 0, .6),
    0 0 26px rgba(0, 255, 255, .3);
}

.deck-top { display: flex; align-items: center; min-width: 0; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 6px 4px 2px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
}

.mark { border-radius: 10px; display: block; }
.logo-t {
  background: linear-gradient(100deg, #0c3a24, #0c3a24 40%, #00636b);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.deck-row { display: flex; align-items: center; gap: 8px; min-width: 0; }

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

.rail p { display: flex; gap: 6px; margin: 0; white-space: nowrap; }

.rail a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(23, 38, 23, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.rail a:hover, .rail a:focus-visible {
  background: var(--g);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 0 16px rgba(105, 255, 105, .95);
  transform: translateY(-1px);
  outline: none;
}

.pods { position: relative; flex: 0 0 auto; }

.pods summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(23, 38, 23, .22);
  border-radius: 999px;
  background: var(--chrome);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
.pods summary::-webkit-details-marker { display: none; }
.pods[open] summary { box-shadow: 0 0 16px rgba(105, 255, 105, .9); }

.pods-body {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  display: flex;
  gap: 14px;
  width: min(320px, 86vw);
  padding: 14px;
  border: 1px solid rgba(0, 255, 255, .55);
  border-radius: 22px;
  background: #eafff2;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .55);
}

.pod { flex: 1 1 0; min-width: 0; }
.pod h3 { margin: 0 0 8px; font-size: 16px; letter-spacing: .06em; color: #0a6b4c; }
.pod-l { display: grid; gap: 2px; margin: 0; }

.pod-l a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 9px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
}
.pod-l a:hover { background: var(--g); }

.find { flex: 0 1 auto; min-width: 0; }
.find input {
  display: block;
  width: 100%;
  max-width: 92px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(23, 38, 23, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}
.find input:focus {
  outline: 2px solid var(--c);
  outline-offset: 1px;
  max-width: 130px;
}

/* ============ 首屏 ============ */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 56px 16px 40px;
  overflow: hidden;
  text-align: center;
  isolation: isolate;
}

.dots {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(105, 255, 105, .34) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 28%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 28%, transparent 78%);
  opacity: .8;
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 9%;
  bottom: 6%;
  width: clamp(84px, 17vw, 180px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .92), rgba(0, 255, 255, .38) 42%, rgba(105, 255, 105, .16) 68%, transparent 72%);
  filter: drop-shadow(0 0 22px rgba(0, 255, 255, .55));
  pointer-events: none;
}

.hero::after {
  content: "✦";
  position: absolute;
  z-index: 1;
  right: 12%;
  top: 12%;
  font-size: clamp(18px, 3.4vw, 32px);
  color: var(--g);
  text-shadow: 0 0 14px rgba(105, 255, 105, .95);
  pointer-events: none;
}

.shot {
  position: absolute;
  z-index: 2;
  margin: 0;
  width: clamp(112px, 24vw, 240px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, .55);
  border-radius: var(--r);
  background: var(--chrome);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .55), 0 0 22px rgba(0, 255, 255, .3);
}

.shot .ph { width: 100%; height: 100%; object-fit: cover; display: block; }

.s1 { left: max(2%, calc(50% - 330px)); top: 11%; transform: rotate(-7deg); }

.s2 {
  right: max(2%, calc(50% - 330px));
  bottom: 9%;
  transform: rotate(6deg);
  background: linear-gradient(150deg, #b6f6ff, #69ff69 55%, #f4fff8);
}

.say { position: relative; z-index: 3; max-width: 620px; padding: 0 6px; }

.chip {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 14px;
  border: 1px solid rgba(0, 255, 255, .6);
  border-radius: 999px;
  background: rgba(0, 255, 255, .12);
  color: var(--c);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .1em;
}

.hero h1 {
  margin: 0 0 .28em;
  font-size: clamp(1.85rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(105, 255, 105, .55));
  overflow-wrap: break-word;
}

.lede {
  max-width: 44ch;
  margin: 0 auto;
  color: #b9ecc9;
  font-size: 17px;
}

/* ============ 主体 ============ */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px clamp(14px, 4vw, 38px) 56px;
}

.toc {
  min-width: 0;
  max-width: 100%;
  padding: 16px;
  border: 1px solid rgba(0, 255, 255, .45);
  border-radius: var(--r);
  background: var(--metal);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

.th {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 16px;
  letter-spacing: .16em;
  color: #0a6b4c;
}

.th-s {
  display: inline-block;
  width: 46px;
  height: 3px;
  margin-left: 10px;
  border-radius: 3px;
  background: var(--chrome);
  box-shadow: var(--glow);
}

.toc-l {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
  counter-reset: t;
}
.toc-l::-webkit-scrollbar { display: none; }

.toc-l li { flex: 0 0 auto; min-width: 0; }

.toc-l a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 16px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  background: rgba(255, 255, 255, .5);
}

.toc-l a::before {
  counter-increment: t;
  content: counter(t, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 14px;
  color: #0a7a5a;
}

.toc-l a:hover { background: rgba(105, 255, 105, .8); }
.toc-l a.on { background: var(--ink); color: var(--g); }
.toc-l a.on::before { color: var(--c); }
.toc-l a[hidden] { display: none; }

.flow { min-width: 0; max-width: 100%; overflow-wrap: break-word; }

.flow > div {
  margin-bottom: 26px;
  padding: clamp(18px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(152deg, rgba(26, 48, 33, .96), rgba(11, 23, 16, .97));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(105, 255, 105, .16);
  scroll-margin-top: 20px;
  scroll-margin-bottom: 180px;
}

.flow > div.mute { opacity: .32; }

.flow h2 {
  position: relative;
  margin: 0 0 .6em;
  padding-left: 18px;
  font-size: clamp(1.32rem, 5.2vw, 1.95rem);
  line-height: 1.28;
  color: #edfff3;
  text-shadow: 0 0 16px rgba(105, 255, 105, .32);
  overflow-wrap: break-word;
}

.flow h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: .16em;
  bottom: .16em;
  width: 5px;
  border-radius: 3px;
  background: var(--chrome);
  box-shadow: var(--glow);
}

.flow h3 {
  position: relative;
  margin: 1.5em 0 .5em;
  padding-left: 14px;
  font-size: 1.12rem;
  line-height: 1.4;
  color: #e2ffe9;
  overflow-wrap: break-word;
}

.flow h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 12px rgba(0, 255, 255, .9);
}

.flow p { margin: 0 0 1em; color: #cdeed8; }
.flow ul, .flow ol { margin: 0 0 1em; padding-left: 1.3em; }
.flow li { margin: .35em 0; color: #cdeed8; }
.flow li::marker { color: var(--g); }
.flow strong { color: #f2fff6; }

.flow a {
  color: var(--c);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.flow figure { margin: 20px 0; }
.flow img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.flow blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--c);
  border-radius: 0 18px 18px 0;
  background: rgba(0, 255, 255, .07);
  color: #d5f6e2;
}
.flow blockquote p:last-child { margin-bottom: 0; }

.flow table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 18px 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 16px;
}
.flow th, .flow td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}
.flow th { background: rgba(105, 255, 105, .12); color: #eaffef; }

.flow time {
  display: inline-block;
  padding: 2px 9px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 15px;
  color: #94f0bd;
}

.flow code {
  padding: 1px 6px;
  border-radius: 7px;
  background: #0a1a10;
  font-family: var(--mono);
  font-size: 15px;
  overflow-wrap: anywhere;
}

/* ============ 页脚 ============ */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px clamp(14px, 4vw, 38px) 18px;
  border-top: 1px solid var(--line);
}

.fb {
  margin: 0;
  font-size: 18px;
  letter-spacing: .02em;
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px rgba(105, 255, 105, .4));
}

.f-nav { min-width: 0; max-width: 100%; }
.f-nav p { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; }

.f-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #a9d9bd;
  text-decoration: none;
  font-size: 16px;
}
.f-nav a:hover { color: var(--g); text-shadow: var(--glow); }

.f-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 16px;
  color: #8fbf9f;
}
.f-copy p { margin: 0; }

.f-copy a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--g);
  text-decoration: none;
}
.f-copy a:hover { background: rgba(105, 255, 105, .14); }

/* ============ 动效 ============ */
.rv .toc-l li { opacity: 0; animation: rise .45s ease forwards; }
.rv .toc-l li:nth-child(2) { animation-delay: .05s; }
.rv .toc-l li:nth-child(3) { animation-delay: .1s; }
.rv .toc-l li:nth-child(4) { animation-delay: .15s; }
.rv .toc-l li:nth-child(5) { animation-delay: .2s; }
.rv .toc-l li:nth-child(6) { animation-delay: .25s; }
.rv .toc-l li:nth-child(7) { animation-delay: .3s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.rv .flow > div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.rv .flow > div.in { opacity: 1; transform: none; }

/* ============ 断点 ============ */
@media (max-width: 899px) {
  .toc { padding: 10px; }
  .toc .th { display: none; }
  .toc-l { margin-top: 0; }
  .find input { max-width: 74px; padding: 0 10px; }
  .pods summary { padding: 0 11px; }
  .s1 { left: -6%; top: 7%; width: 32vw; }
  .s2 { right: -6%; bottom: 5%; width: 32vw; }
  .say { max-width: 88%; }
  .foot { justify-content: flex-start; }
}

@media (min-width: 900px) {
  .board { grid-template-columns: 232px minmax(0, 1fr); gap: 34px; }
  .toc { position: sticky; top: 18px; align-self: start; }
  .toc-l { flex-direction: column; flex-wrap: nowrap; overflow: visible; }
  .hero { padding-top: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv .flow > div,
  .rv .toc-l li { opacity: 1; transform: none; animation: none; transition: none; }
  .rail a:hover { transform: none; }
}
</style>

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