@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --ink: #192617;
  --ink2: #22331f;
  --ink3: #2b4026;
  --neon: #87ff71;
  --sun: #ffce5c;
  --paper: #eef6e8;
  --dim: rgba(238, 246, 232, 0.76);
  --line: rgba(135, 255, 113, 0.26);
  --r: 28px;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image: radial-gradient(rgba(135, 255, 113, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--paper);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  padding-bottom: clamp(158px, 24vh, 200px);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--neon);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 99;
  padding: 12px 20px;
  border-radius: 0 0 18px 0;
  background: var(--sun);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

/* ---------- 顶部细条 ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 14px;
  background: rgba(25, 38, 23, 0.9);
  border-bottom: 2px dashed var(--line);
  backdrop-filter: blur(8px);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--neon);
  color: var(--ink);
  text-decoration: none;
  transform: rotate(-7deg);
  box-shadow: 3px 3px 0 rgba(255, 206, 92, 0.85);
}

.mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.mark-dot {
  width: 14px;
  height: 14px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.slogan {
  margin: 0 0 0 auto;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 130px 20px 90px;
  text-align: center;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 206, 92, 0.16), transparent 42%),
    radial-gradient(circle at 82% 74%, rgba(135, 255, 113, 0.18), transparent 48%),
    repeating-linear-gradient(0deg, rgba(135, 255, 113, 0.07) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(135, 255, 113, 0.07) 0 1px, transparent 1px 48px);
}

.shapes {
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
}

.shapes span {
  position: absolute;
  display: block;
  mix-blend-mode: screen;
}

.s1 {
  top: 12%;
  left: -46px;
  width: 190px;
  height: 190px;
  background: var(--neon);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: rotate(-8deg);
  opacity: 0.7;
}

.s2 {
  right: -34px;
  bottom: 15%;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--sun);
  opacity: 0.8;
}

.s3 {
  top: 58%;
  left: 6%;
  width: 140px;
  height: 140px;
  border: 8px dashed var(--neon);
  border-radius: 50%;
  transform: rotate(14deg);
  opacity: 0.55;
}

.s4 {
  top: 20%;
  right: 12%;
  width: 92px;
  height: 92px;
  background: var(--sun);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transform: rotate(26deg);
  opacity: 0.9;
}

.s5 {
  bottom: 24%;
  right: 26%;
  width: 70px;
  height: 70px;
  background: var(--neon);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transform: rotate(-18deg);
  opacity: 0.75;
}

.chip {
  position: relative;
  margin: 0;
  padding: 6px 18px;
  border: 2px solid var(--sun);
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: var(--sun);
  transform: rotate(-2deg);
}

.hero h1 {
  position: relative;
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.4rem, 10vw, 5.4rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.04em;
  color: var(--neon);
  text-shadow: 6px 6px 0 rgba(255, 206, 92, 0.8);
}

.hero-rule {
  display: block;
  width: 96px;
  height: 12px;
  margin-top: 8px;
  background: repeating-linear-gradient(90deg, var(--sun) 0 10px, transparent 10px 20px);
  transform: rotate(-3deg);
}

/* ---------- 版面 ---------- */

main {
  padding: 40px 18px 0;
}

.board {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  max-width: 1080px;
  margin: 0 auto;
}

.prose {
  min-width: 0;
}

.prose article {
  position: relative;
  margin: 0 0 26px;
  padding: 26px 22px 32px;
  border-radius: var(--r);
  border-top: 2px dashed var(--line);
  border-bottom: 6px solid var(--neon);
  background: var(--ink2);
  scroll-margin-top: 90px;
  overflow: hidden;
}

.prose article:nth-of-type(even) {
  border-bottom-color: var(--sun);
  border-radius: var(--r) 8px var(--r) 8px;
}

.prose article::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 12px;
  height: 12px;
  background: var(--sun);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  opacity: 0.7;
}

.prose small,
.side small {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--sun);
  transform: rotate(-1.5deg);
}

.prose h2 {
  margin: 0.1em 0 0.55em;
  font-size: clamp(1.35rem, 5vw, 1.95rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.prose h3 {
  margin: 1.2em 0 0.4em;
  font-size: clamp(1.12rem, 4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--neon);
}

.prose p {
  margin: 0 0 0.9em;
  color: var(--dim);
}

.prose strong {
  color: var(--paper);
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 0;
  list-style: none;
}

.prose li {
  position: relative;
  margin: 0.45em 0;
  padding-left: 24px;
  color: var(--dim);
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 10px;
  height: 10px;
  background: var(--sun);
  transform: rotate(45deg);
}

.prose ol {
  counter-reset: n;
}

.prose ol > li {
  counter-increment: n;
  padding-left: 34px;
}

.prose ol > li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--neon);
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.prose blockquote {
  margin: 1em 0;
  padding: 14px 18px;
  border-left: 6px solid var(--sun);
  border-radius: 0 18px 18px 0;
  background: var(--ink3);
  color: var(--paper);
}

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

.prose figure {
  margin: 1em 0;
}

.prose figure img {
  border-radius: 18px;
  border: 3px solid var(--line);
}

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

.prose a {
  font-weight: 600;
}

/* ---------- 侧栏 ---------- */

.side {
  padding: 22px 20px 24px;
  border-radius: var(--r) 8px var(--r) 8px;
  border: 2px dashed var(--sun);
  background: rgba(255, 206, 92, 0.06);
}

.side h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--paper);
}

.side-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 2px solid rgba(135, 255, 113, 0.4);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.side-list a:hover {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--ink);
  transform: translateX(4px) rotate(-1.5deg);
}

.totop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 6px 20px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

/* ---------- 页脚 ---------- */

footer {
  margin-top: 56px;
  padding: 34px 18px 10px;
  border-top: 2px dashed var(--line);
  background: rgba(21, 32, 19, 0.85);
}

.cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
}

footer dl {
  margin: 0;
}

footer dt {
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--sun);
}

footer dd {
  margin: 0;
  color: var(--dim);
}

footer dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px dotted transparent;
}

footer dd a:hover {
  color: var(--neon);
  border-bottom-color: var(--neon);
}

.base {
  max-width: 1080px;
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 2px solid rgba(135, 255, 113, 0.14);
  text-align: center;
}

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

/* ---------- 底部导航 ---------- */

.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 70;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(25, 38, 23, 0.95);
  border-top: 2px dashed var(--line);
  backdrop-filter: blur(10px);
}

.dock ol {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 2px solid rgba(135, 255, 113, 0.4);
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.dock a:hover,
.dock a:focus-visible,
.dock a[aria-current] {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--ink);
  transform: translateY(-2px) rotate(-2deg);
}

.dock a:focus-visible,
.side-list a:focus-visible,
.totop:focus-visible,
.mark:focus-visible,
footer a:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* ---------- 平板与桌面 ---------- */

@media (min-width: 620px) {
  .cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 920px) {
  body {
    font-size: 18px;
    padding-bottom: 120px;
  }

  main {
    padding: 56px 28px 0;
  }

  .board {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 34px;
    align-items: start;
  }

  .side {
    position: sticky;
    top: 82px;
  }

  .prose article {
    padding: 34px 34px 40px;
    margin-bottom: 34px;
  }

  .dock {
    padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

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