:root {
  --ink: #172623;
  --ink2: #24403a;
  --mint: #5cc6b0;
  --mint-d: #3d9d89;
  --sand: #d4c4a8;
  --paper: #f4ecdd;
  --paper2: #eee2cd;
  --paper3: #fcf7ee;
  --clay: #c67b5c;
  --olive: #6b7b3c;
  --line: rgba(23, 38, 35, 0.22);
  --r: 28px;
  --max: 1180px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Baloo 2', 'Comic Neue', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.17;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23g)' opacity='.35'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
}

/* ---------- 顶栏 ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 3px solid var(--mint);
}

.mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 18px 12px 18px 12px;
  background: var(--mint);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  border: 2px solid var(--ink2);
  transition: transform 0.3s ease-out, background 0.3s ease-out;
}

.mark:hover {
  transform: rotate(-4deg) scale(1.05);
  background: var(--sand);
}

.mark img,
.mark svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.markTxt {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

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

.topNav::-webkit-scrollbar {
  display: none;
}

.topNav ol {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topNav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 2px solid transparent;
  color: var(--sand);
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease-out, background 0.25s ease-out, border-color 0.25s ease-out;
}

.topNav a:hover,
.topNav a:focus-visible {
  color: var(--ink);
  background: var(--mint);
  border-color: var(--mint);
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--clay);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease-out, background 0.25s ease-out;
}

.cta:hover {
  background: var(--mint);
  color: var(--ink);
  transform: translateY(-2px);
}

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

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 45vh;
  overflow: hidden;
  padding: 34px 18px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--paper2), var(--paper));
  border-bottom: 2px solid var(--line);
}

.heroNum {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(120px, 26vw, 250px);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.05em;
  color: rgba(92, 198, 176, 0.3);
  pointer-events: none;
  will-change: transform;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 22ch;
  font-size: clamp(28px, 5.2vw, 54px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.heroPic {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 26px auto 0;
  border: 2px solid var(--ink);
  border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0;
  overflow: hidden;
}

.heroPic img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- 主体 ---------- */

.wrap {
  display: grid;
  grid-template-columns: 206px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 18px 64px;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 86px;
  padding: 16px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r) 20px var(--r) 20px;
  background: var(--paper2);
}

.railEb {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--olive);
}

.railH {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.railList {
  counter-reset: rail;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.railList li {
  counter-increment: rail;
  animation: rise 0.55s ease-out both;
}

.railList li:nth-child(1) { animation-delay: 0.04s; }
.railList li:nth-child(2) { animation-delay: 0.09s; }
.railList li:nth-child(3) { animation-delay: 0.14s; }
.railList li:nth-child(4) { animation-delay: 0.19s; }
.railList li:nth-child(5) { animation-delay: 0.24s; }
.railList li:nth-child(6) { animation-delay: 0.29s; }
.railList li:nth-child(7) { animation-delay: 0.34s; }

.railList a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border-radius: 14px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.25s ease-out, color 0.25s ease-out;
}

.railList a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: 'Comic Neue', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--clay);
}

.railList a:hover,
.railList a.is-on {
  background: var(--mint);
  color: var(--ink);
}

.body {
  min-width: 0;
}

.prose {
  padding: 4px 26px 30px;
  background: var(--paper3);
  border: 2px solid var(--ink);
  border-radius: var(--r);
}

.prose > section {
  padding: 28px 0;
  border-top: 2px dashed var(--line);
  scroll-margin-top: 104px;
}

.prose > section:first-child {
  padding-top: 22px;
  border-top: 0;
}

.prose small {
  display: block;
  margin: 0 0 6px;
  font-family: 'Comic Neue', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--clay);
}

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.26;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 24px 0 10px;
  font-size: 20px;
  line-height: 1.4;
}

.prose p {
  max-width: 66ch;
  margin: 0 0 14px;
}

.prose ul,
.prose ol {
  max-width: 66ch;
  margin: 0 0 16px;
  padding-left: 24px;
}

.prose li {
  margin: 0 0 8px;
}

.prose li::marker {
  color: var(--clay);
}

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--mint);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

.prose a:hover {
  background: var(--mint);
}

.prose img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  margin: 16px 0;
  border: 2px solid var(--ink);
  border-radius: 20px;
}

.prose figure {
  margin: 18px 0;
}

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

.prose blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  background: var(--paper2);
  border-left: 6px solid var(--mint);
  border-radius: 0 20px 20px 0;
}

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

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.prose th {
  background: var(--paper2);
}

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

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

footer {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 12px 26px;
  padding: 42px max(18px, calc((100% - var(--max)) / 2)) 0;
  background: var(--ink);
  color: var(--sand);
  border-top: 6px solid var(--mint);
}

footer article {
  min-width: 0;
}

footer ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  color: var(--sand);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.25s ease-out, border-color 0.25s ease-out;
}

footer a:hover,
footer a:focus-visible {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

.fBrand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fMark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 20px 14px 20px 14px;
  background: var(--mint);
  color: var(--ink);
}

.fMark img,
.fMark svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fBrandName {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: 0.04em;
}

.fHost p {
  margin: 0;
  font-size: 16px;
  color: var(--sand);
  word-break: break-all;
}

.fBar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 0 30px;
  border-top: 2px solid rgba(212, 196, 168, 0.24);
  font-size: 15px;
}

.fCopy,
.fTop {
  margin: 0;
}

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

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 14px 44px;
  }

  .rail {
    position: sticky;
    top: 74px;
    z-index: 12;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 10px;
    border-radius: 20px;
    scrollbar-width: none;
  }

  .rail::-webkit-scrollbar {
    display: none;
  }

  .railEb,
  .railH {
    display: none;
  }

  .railList {
    flex-direction: row;
    gap: 6px;
  }

  .railList a {
    min-height: 44px;
    white-space: nowrap;
  }

  .hero {
    min-height: 40vh;
    padding-top: 24px;
  }

  .prose {
    padding: 2px 16px 24px;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .top {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  .topNav {
    order: 3;
    flex-basis: 100%;
  }

  .cta {
    margin-left: auto;
  }

  .rail {
    position: static;
  }

  .heroNum {
    font-size: clamp(96px, 34vw, 170px);
  }

  .prose > article {
    scroll-margin-top: 78px;
  }

  footer {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .fBar {
    padding-bottom: 26px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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