@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400&family=Playfair+Display:ital@1&display=swap');

:root {
  --sky: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #ffffff;
  --wash: #e7f4ff;
  --lemon: #ffe98a;
  --line: 3px;
}

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

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

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: var(--line) solid var(--red);
  outline-offset: 2px;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.55em;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.45rem, 4.2vw, 2.05rem);
  font-weight: 800;
}

h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

p {
  margin: 0 0 1em;
}

hr {
  border: 0;
  border-top: var(--line) solid var(--ink);
  margin: 0.55em 0 1.1em;
  height: 0;
}

/* ---------- 头部 ---------- */

.site-head {
  background: var(--paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 14px 16px 12px;
  padding: 6px 16px;
  background: var(--sky);
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  transform: rotate(-1.4deg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.brand:hover {
  transform: rotate(-1.4deg) translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.anchorbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--sky);
  border-top: var(--line) solid var(--ink);
  border-bottom: var(--line) solid var(--ink);
}

.bar-in {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
}

.pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: thin;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 15px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.pill:hover {
  background: var(--lemon);
}

.pill.is-on {
  background: var(--ink);
  color: var(--paper);
}

.cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 18px;
  background: var(--red);
  color: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
  font-size: 0.94rem;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}

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

.hero {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  text-align: right;
  padding: 34px 18px 30px;
  border-bottom: var(--line) solid var(--ink);
  background-color: var(--wash);
  background-image: radial-gradient(rgba(0, 0, 0, 0.24) 1.6px, transparent 1.7px);
  background-size: 16px 16px;
}

.hero-tick {
  display: block;
  width: 64px;
  height: 12px;
  margin-bottom: 14px;
  background: var(--red);
  border: var(--line) solid var(--ink);
}

.hero h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.05rem, 8.6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.hero-sub {
  margin: 16px 0 0;
  max-width: 48ch;
  font-size: 1rem;
  line-height: 1.7;
}

/* ---------- 主体骨架 ---------- */

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 16px 56px;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.side {
  position: sticky;
  top: 76px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  padding: 14px 14px 16px;
}

.side-h {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.side hr {
  margin: 0 0 10px;
}

.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 8px;
  border-bottom: 2px dashed rgba(0, 0, 0, 0.16);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.side-nav li:last-child a {
  border-bottom: 0;
}

.side-nav a:hover {
  background: var(--lemon);
}

.side-nav a.is-on {
  background: var(--ink);
  color: var(--paper);
}

.body {
  min-width: 0;
}

/* ---------- 正文 ---------- */

.prose > section {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  padding: 22px 20px 8px;
  margin: 0 0 22px;
  scroll-margin-top: 150px;
  animation: rise 0.45s ease-out both;
}

.prose > section:nth-child(2) { animation-delay: 0.06s; }
.prose > section:nth-child(3) { animation-delay: 0.12s; }
.prose > section:nth-child(4) { animation-delay: 0.18s; }
.prose > section:nth-child(5) { animation-delay: 0.24s; }
.prose > section:nth-child(6) { animation-delay: 0.3s; }
.prose > section:nth-child(7) { animation-delay: 0.36s; }

.prose > section:last-child {
  margin-bottom: 0;
}

.prose > section > h2:first-child,
.prose > section > h3:first-child {
  margin-top: 0;
}

.prose h2 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.prose h3 {
  margin-top: 1.4em;
}

.prose p,
.prose li {
  font-size: 1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

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

.prose li::marker {
  font-weight: 800;
}

.prose a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--red);
  text-underline-offset: 3px;
}

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

.prose strong {
  font-weight: 800;
  background: linear-gradient(to top, var(--lemon) 0 42%, transparent 42%);
}

.prose blockquote {
  margin: 0 0 1.1em;
  padding: 12px 16px;
  border: var(--line) solid var(--ink);
  border-left-width: 10px;
  border-radius: 10px;
  background: var(--wash);
}

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

.prose figure {
  margin: 0 0 1.1em;
}

.prose figcaption {
  font-size: 0.9rem;
  margin-top: 6px;
}

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

.prose th,
.prose td {
  border: 2px solid var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.prose th {
  background: var(--sky);
  font-weight: 800;
}

.prose time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

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

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

.foot {
  background: var(--ink);
  color: var(--paper);
  border-top: var(--line) solid var(--ink);
  padding: 36px 16px 22px;
}

.foot-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 26px;
  align-items: start;
}

.giant {
  margin: 0;
  font-family: "Playfair Display", Georgia, "Songti SC", serif;
  font-style: italic;
  font-size: clamp(1.9rem, 6.4vw, 3rem);
  line-height: 1.05;
  color: var(--sky);
  word-break: break-word;
}

.f-addr {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.f-mark {
  display: inline-block;
}

.f-host {
  font-weight: 400;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  word-break: break-all;
}

.f-nav dl {
  margin: 0;
}

.f-nav dt {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--sky);
  margin-bottom: 8px;
}

.f-nav dd {
  margin: 0;
}

.f-nav a,
.f-more a,
.f-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 2px 0;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.f-nav a:hover,
.f-more a:hover,
.f-links a:hover {
  border-bottom-color: var(--red);
  color: var(--sky);
}

.f-more,
.f-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.f-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.foot-base {
  max-width: 1180px;
  margin: 26px auto 0;
  padding-top: 14px;
  border-top: var(--line) solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.copy {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-top: 20px;
  }

  .side {
    position: static;
  }

  .side hr {
    margin-bottom: 8px;
  }

  .prose > section {
    scroll-margin-top: 132px;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

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

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

  .brand {
    font-size: 1.15rem;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bar-in {
    padding: 9px 10px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
}

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