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

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #fffdf6;
  --line: 3px solid #000000;
  --shadow: 6px 6px 0 #000000;
  --shadow-s: 4px 4px 0 #000000;
  --r: 18px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 108px;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Quicksand', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.72;
  overflow-x: hidden;
}

body.lock {
  overflow: hidden;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: #0a63a8;
}

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

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  text-align: right;
  padding: clamp(18px, 4vw, 40px) clamp(16px, 5vw, 64px) clamp(22px, 4vw, 44px);
  background: var(--blue);
  border-bottom: var(--line);
}

.hero-big {
  position: absolute;
  right: -0.06em;
  top: 34%;
  transform: translateY(-50%);
  font-family: 'Caveat', 'Quicksand', 'PingFang SC', sans-serif;
  font-size: clamp(74px, 19vw, 228px);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.42);
  -webkit-text-stroke: 3px #000;
  pointer-events: none;
  user-select: none;
}

.hero-in {
  position: relative;
  z-index: 1;
  max-width: min(760px, 100%);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 7.4vw, 4.2rem);
  line-height: 1.06;
}

.hero-txt {
  display: inline-block;
  margin: 16px 0 0;
  max-width: 34ch;
  padding: 10px 15px;
  background: #ffffff;
  border: var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-s);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.6;
  text-align: right;
}

/* ---------- 主体布局 ---------- */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 46px) clamp(14px, 4vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 246px;
  gap: clamp(20px, 3vw, 36px);
  align-items: start;
}

.col {
  min-width: 0;
}

.prose {
  display: block;
}

.prose section {
  position: relative;
  margin: 0 0 clamp(22px, 3vw, 34px);
  padding: clamp(18px, 3vw, 30px);
  background: #ffffff;
  border: var(--line);
  border-bottom-width: 9px;
  border-bottom-color: var(--red);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}

.prose section:nth-child(even) {
  border-bottom-color: var(--blue);
}

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

.prose h2 {
  margin: 0 0 0.55em;
  font-size: clamp(1.35rem, 3.4vw, 1.9rem);
  line-height: 1.24;
}

.prose h2::before {
  content: "";
  display: block;
  width: 46px;
  height: 8px;
  margin: 0 0 12px;
  border-radius: 4px;
  background: var(--red);
}

.prose section:nth-child(even) h2::before {
  background: var(--blue);
}

.prose h3 {
  margin: 1.3em 0 0.5em;
  font-size: 1.16rem;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 1em;
}

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

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

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

.prose li::marker {
  color: var(--red);
  font-weight: 700;
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose strong {
  background: #d9efff;
  padding: 0 3px;
  box-shadow: 2px 2px 0 #000;
}

.prose blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  background: #fff4f4;
  border: var(--line);
  border-left-width: 8px;
  border-radius: 0 14px 14px 0;
}

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

.prose img {
  max-width: 100%;
  border: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-s);
}

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

.prose th,
.prose td {
  border: 2px solid #000;
  padding: 8px 10px;
  text-align: left;
}

.prose th {
  background: #eaf6ff;
}

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 24px;
  padding: 16px 16px 18px;
  background: #ffffff;
  border: var(--line);
  border-bottom-width: 9px;
  border-bottom-color: var(--blue);
  border-radius: var(--r);
  box-shadow: 5px 5px 0 #000;
}

.rail-h {
  margin: 0;
  font-family: 'Caveat', 'Quicksand', 'PingFang SC', sans-serif;
  font-size: 1.5rem;
  line-height: 1.15;
}

.rail .subtitle {
  margin: 2px 0 12px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  color: #444;
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rail;
}

.rail-list li {
  counter-increment: rail;
  border-top: 2px dashed #d6d6cd;
}

.rail-list li:first-child {
  border-top: 0;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 4px;
  color: #000;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 0.72rem;
  color: #888;
  font-variant-numeric: tabular-nums;
}

.rail-list a:hover {
  background: #eaf6ff;
  text-decoration: underline;
}

/* ---------- 页脚 ---------- */
footer {
  border-top: var(--line);
  background: #000;
  color: #fff;
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: 14px clamp(16px, 3vw, 34px);
  align-items: start;
  padding: 22px clamp(14px, 4vw, 32px) 26px;
}

.f-brand a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  color: #fff;
  font-family: 'Caveat', 'Quicksand', 'PingFang SC', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #fff;
  border-radius: 12px;
}

.f-brand a:hover {
  background: var(--blue);
  color: #000;
  border-color: var(--blue);
}

.f-brand img {
  border-radius: 6px;
}

footer nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
}

footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

footer nav a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.f-legal {
  align-self: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #b9b9b9;
  text-align: right;
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: #ffffff;
  border-top: var(--line);
  padding: 8px clamp(10px, 3vw, 24px) calc(8px + env(safe-area-inset-bottom, 0px));
}

.dock-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.dock-nav--l {
  justify-self: end;
}

.dock-r {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.dock-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  color: #000;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
}

.dock-nav a:hover {
  background: #e6f6ff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.dock-brand {
  padding: 3px 12px;
  color: #000;
  font-family: 'Caveat', 'Quicksand', 'PingFang SC', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  background: var(--blue);
  border: 3px solid #000;
  border-radius: 14px;
  box-shadow: 3px 3px 0 #000;
}

.dock-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: var(--red);
  border: 3px solid #000;
  border-radius: 14px;
  box-shadow: 3px 3px 0 #000;
}

.dock-cta:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 13px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: #000;
  border: 3px solid #000;
  border-radius: 14px;
  cursor: pointer;
}

.burger[aria-expanded="true"] {
  background: var(--blue);
  color: #000;
}

/* ---------- 全屏菜单 ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px clamp(14px, 5vw, 32px) 30px;
  background: #000;
  color: #fff;
  overflow-y: auto;
}

.veil[hidden] {
  display: none;
}

.veil-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.veil-brand {
  font-family: 'Caveat', 'Quicksand', 'PingFang SC', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--blue);
}

.veil-close {
  min-height: 44px;
  padding: 0 16px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  background: var(--red);
  border: 3px solid #fff;
  border-radius: 12px;
  cursor: pointer;
}

.veil-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 620px;
  counter-reset: veil;
}

.veil-nav li {
  counter-increment: veil;
}

.veil-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 6px 16px;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 700;
  text-decoration: none;
  border: 3px solid #fff;
  border-radius: 14px;
}

.veil-nav a::after {
  content: counter(veil, decimal-leading-zero);
  font-size: 0.8rem;
  font-weight: 600;
  color: #8d8d8d;
  font-variant-numeric: tabular-nums;
}

.veil-nav a:hover {
  background: var(--blue);
  color: #000;
  border-color: var(--blue);
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .prose section {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
  }

  html.js .prose section.in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 断点 ---------- */
@media (max-width: 1024px) {
  .dock-nav a {
    padding: 0 7px;
    font-size: 0.83rem;
  }
}

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

  .rail {
    position: static;
  }

  .rail-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 14px;
  }
}

@media (max-width: 880px) {
  .dock-nav {
    display: none;
  }

  .dock-r {
    justify-self: end;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16.5px;
  }

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

  .f-legal {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 6px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }
}

@media (max-width: 420px) {
  .rail-list {
    grid-template-columns: 1fr;
  }

  .hero-txt {
    font-size: 0.92rem;
  }

  .dock-brand {
    font-size: 1.3rem;
    padding: 3px 10px;
  }

  .dock-cta {
    padding: 0 12px;
  }
}

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