@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

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

:root {
  --lime: #80ff00;
  --green: #00ff00;
  --ink: #1f2617;
  --paper: #eef2e2;
  --card: #ffffff;
  --line: 3px solid var(--ink);
  --shadow: 7px 7px 0 var(--ink);
  --serif: "Crimson Pro", Georgia, "Songti SC", "SimSun", serif;
  --sans: "Atkinson Hyperlegible", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

body {
  margin: 0;
  padding-bottom: 104px;
  overflow-x: clip;
  background-color: var(--paper);
  background-image: repeating-linear-gradient(0deg, rgba(31, 38, 23, 0.07) 0 1px, transparent 1px 34px);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  filter: saturate(115%);
}

h1,
h2,
h3,
.fbig {
  font-family: var(--serif);
  line-height: 1.14;
  letter-spacing: 0.005em;
  font-weight: 700;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  padding-bottom: max(0.45rem, env(safe-area-inset-bottom));
  background: var(--ink);
  border-top: var(--line);
  color: var(--lime);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 0.6rem;
  background: var(--lime);
  border: var(--line);
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

.brand .logo {
  width: 26px;
  height: 26px;
  object-fit: cover;
  display: block;
}

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

.dock-nav::-webkit-scrollbar {
  display: none;
}

.dock-nav ul {
  display: flex;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dock-nav a {
  display: block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 0.62rem;
  color: var(--lime);
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
}

.dock-nav a:hover,
.dock-nav a:focus-visible {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--ink);
}

.menu-btn {
  flex: 0 0 auto;
  min-width: 62px;
  min-height: 44px;
  padding: 0 0.7rem;
  background: var(--green);
  border: var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transform: rotate(2deg);
}

menu-btn:active {
  transform: rotate(0deg);
}

/* ---------- 全屏遮罩菜单 ---------- */
.ovl {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem 2rem;
  background: var(--ink);
  color: var(--lime);
  overflow-y: auto;
}

.ovl.open {
  display: flex;
}

.ovl-close {
  align-self: flex-end;
  min-height: 44px;
  min-width: 74px;
  background: transparent;
  border: 2px solid var(--lime);
  color: var(--lime);
  font-family: var(--sans);
  font-size: 16px;
  cursor: pointer;
}

.ovl-nav ul {
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ovl-nav a {
  display: block;
  min-height: 54px;
  padding: 0.35rem 0.2rem;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 7vw, 2.4rem);
  text-decoration: none;
  border-bottom: 2px dashed rgba(128, 255, 0, 0.4);
}

.ovl-nav a:hover {
  background: var(--lime);
  color: var(--ink);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.6rem;
  min-height: 100svh;
  padding: 2.4rem 1rem 5.5rem;
  overflow: hidden;
}

.hero-copy {
  max-width: 40ch;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 10vw, 4.6rem);
  text-align: left;
  animation: jitter 4.2s ease-in-out infinite;
  word-break: break-word;
}

h1 span {
  background-image: linear-gradient(transparent 64%, var(--green) 64%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-bottom: 0.08em;
}

@keyframes jitter {
  0%, 100% { transform: translate(0, 0) rotate(-1deg); }
  50% { transform: translate(1px, -2px) rotate(0.2deg); }
}

.lead {
  margin: 0;
  max-width: 42ch;
  padding-left: 0.85rem;
  border-left: 7px solid var(--lime);
  font-size: 17px;
}

.hero-fig {
  position: relative;
  margin: 0;
  height: clamp(210px, 32vh, 400px);
  border: var(--line);
  background: repeating-linear-gradient(45deg, var(--lime) 0 20px, var(--ink) 20px 22px);
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
  overflow: hidden;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(150%) contrast(105%);
}

.stk {
  position: absolute;
  top: -16px;
  right: 16px;
  width: 68px;
  height: 68px;
  background: var(--green);
  border: var(--line);
  transform: rotate(14deg);
  mix-blend-mode: screen;
  z-index: 2;
}

.stk.s2 {
  top: auto;
  right: auto;
  bottom: -18px;
  left: 12px;
  width: 46px;
  height: 46px;
  background: var(--lime);
  transform: rotate(-11deg);
  mix-blend-mode: multiply;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 54px;
  background: var(--lime);
  border-top: var(--line);
  clip-path: polygon(0 46%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

/* ---------- 主体与右栏 ---------- */
main {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1rem 3rem;
}

.content article {
  position: relative;
  margin: 0 0 2.6rem;
  padding: 1.4rem 1.1rem 1.6rem;
  background: var(--card);
  border: var(--line);
  box-shadow: var(--shadow);
  scroll-margin-top: 1.4rem;
}

.content article:nth-child(odd) {
  transform: rotate(0.35deg);
}

.content article:nth-child(even) {
  transform: rotate(-0.4deg);
}

.content > article > *:last-child {
  margin-bottom: 0;
}

.content h2 {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.22rem 0.8rem;
  background: var(--lime);
  border: var(--line);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: clamp(1.35rem, 5.4vw, 1.9rem);
  transform: rotate(-1deg);
}

.content h2 > span {
  position: relative;
  z-index: 1;
}

.content h3 {
  display: inline-block;
  margin: 1.5rem 0 0.55rem;
  padding-bottom: 0.1rem;
  border-bottom: 4px solid var(--green);
  font-size: 1.18rem;
}

.content h3 > span {
  position: relative;
  z-index: 1;
}

.content p {
  margin: 0 0 1rem;
}

.content ul,
.content ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.content li {
  margin-bottom: 0.4rem;
}

.content a {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--green);
  text-underline-offset: 3px;
}

.content a:hover {
  background: var(--lime);
}

.content img {
  display: block;
  width: auto;
  height: auto;
  margin: 1.1rem 0;
  border: var(--line);
}

.content blockquote {
  margin: 1.1rem 0;
  padding: 0.8rem 1rem;
  background: var(--paper);
  border-left: 8px solid var(--green);
  font-style: normal;
}

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

.content table {
  width: 100%;
  margin: 1.1rem 0;
  border-collapse: collapse;
  font-size: 16px;
}

.content th,
.content td {
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--ink);
  text-align: left;
}

.content th {
  background: var(--lime);
}

.rail {
  display: block;
  align-self: start;
  padding: 1rem;
  background: var(--card);
  border: var(--line);
  box-shadow: var(--shadow);
  transform: rotate(0.6deg);
}

.rail h2 {
  margin: 0 0 0.8rem;
  font-size: 1.25rem;
}

.rail h2 > span {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  background: var(--ink);
  color: var(--lime);
  transform: rotate(1.6deg);
}

.rail nav ul {
  display: grid;
  gap: 0.3rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.rail nav a {
  display: block;
  min-height: 44px;
  line-height: 44px;
  padding: 0 0.6rem;
  background: var(--paper);
  border-left: 5px solid var(--ink);
  font-size: 16px;
  text-decoration: none;
}

.rail nav a:hover {
  background: var(--lime);
}

.rail h3 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--sans);
}

.rail h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  background: var(--green);
  border: 2px solid var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- 页脚 ---------- */
footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.3rem;
  padding: 2.4rem 1rem 6rem;
  background: var(--ink);
  border-top: 7px solid var(--lime);
  color: var(--paper);
}

footer p {
  margin: 0;
}

.fbig {
  font-size: clamp(1.8rem, 7.5vw, 3rem);
  color: var(--lime);
  line-height: 1.1;
}

.flinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.8rem;
}

.flinks a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid rgba(128, 255, 0, 0.45);
}

.flinks a:hover {
  background: var(--lime);
  color: var(--ink);
}

.fcta a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.2rem 1rem;
  background: var(--lime);
  border: var(--line);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  transform: rotate(-1.5deg);
}

footer small {
  grid-column: 1 / -1;
  font-size: 16px;
  color: rgba(238, 242, 226, 0.72);
}

/* ---------- 断点 ---------- */
@media (min-width: 720px) {
  footer {
    grid-template-columns: 1.3fr 1fr 1fr;
    align-items: start;
    padding: 3rem 1.6rem 6rem;
  }
  .fbig {
    grid-column: 1;
  }
  footer small {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(128, 255, 0, 0.25);
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 3rem;
    align-items: start;
    padding: 3rem 1.6rem 4rem;
  }
  .rail {
    position: sticky;
    top: 1.2rem;
  }
  .hero {
    padding: 3rem 1.6rem 6rem;
  }
  .content article {
    padding: 1.8rem 1.6rem 2rem;
  }
  .dock {
    padding: 0.5rem 1rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

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