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

:root {
  --blue: #3bb1ff;
  --red: #ff5252;
  --ink: #000000;
  --paper: #ffffff;
  --mist: #e9f3fa;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Outfit', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  padding-bottom: 112px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

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

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

/* ---------- 底部固定条 ---------- */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ink);
  border-top: 3px solid var(--ink);
}

.mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  background: var(--blue);
  color: var(--ink);
  font-weight: 900;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--red);
  transition: transform 0.12s linear, box-shadow 0.12s linear;
}

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

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

.bar nav p {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.bar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  text-decoration: none;
  border: 3px solid #fff;
  transition: background 0.12s linear, color 0.12s linear, border-color 0.12s linear;
}

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

.sw { flex: 0 0 auto; margin: 0; }

.sw input {
  width: 150px;
  height: 46px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 16px;
  color: #fff;
  background: var(--ink);
  border: 3px solid #fff;
  border-radius: 0;
  appearance: none;
}

.sw input::placeholder { color: #9e9e9e; }
.sw input:focus { background: #111; }

/* ---------- 主区网格 ---------- */
main {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 0 32px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 18px 0;
}

/* ---------- 首屏 ---------- */
.hero {
  grid-column: 1 / -1;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: right;
  padding: 20px 0 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 6.2vw, 62px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.lede {
  margin: 14px 0 20px auto;
  max-width: 54ch;
  font-size: 1rem;
  line-height: 1.65;
  color: #141414;
}

.hero-art {
  margin: 0;
  height: clamp(150px, 30vh, 260px);
  overflow: hidden;
  background: var(--blue);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
}

.hero-art img,
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform;
}

/* ---------- 侧栏 ---------- */
.side {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 34px 0 0;
}

.panel {
  background: var(--mist);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 14px 16px 16px;
}

.side h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.3;
}

.side h2 span {
  display: inline-block;
  background: var(--blue);
  padding: 1px 8px;
  box-shadow: 4px 4px 0 var(--ink);
}

.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

.side a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  background: var(--paper);
  border-left: 6px solid var(--blue);
  transition: background 0.12s linear, border-color 0.12s linear, transform 0.12s linear;
}

.side a:hover,
.side a:focus-visible {
  background: var(--blue);
  border-left-color: var(--ink);
  transform: translateX(3px);
}

/* ---------- 正文 ---------- */
.body {
  max-width: 76ch;
  padding: 34px 0 10px;
}

.body article {
  padding: 28px 0;
  border-top: 3px solid var(--ink);
  scroll-margin-top: 20px;
  scroll-margin-bottom: 130px;
}

.body article:first-child { border-top: 0; padding-top: 0; }

.body h2 {
  margin: 0 0 16px;
  font-size: clamp(21px, 3vw, 31px);
  line-height: 1.22;
  font-weight: 900;
}

.body h2 span {
  display: inline-block;
  background: var(--blue);
  padding: 2px 8px;
  box-shadow: 5px 5px 0 var(--ink);
}

.body h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.14rem;
  line-height: 1.4;
  font-weight: 900;
}

.body h3 span {
  display: inline-block;
  background: var(--red);
  padding: 1px 6px;
  box-shadow: 4px 4px 0 var(--ink);
}

.body p { margin: 0 0 1.05em; }

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

.body li { margin: 0.35em 0; }

.body a {
  color: #0a5f97;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--blue);
}

.body a:hover { color: var(--ink); text-decoration-color: var(--red); }

.body blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  background: var(--mist);
  border-left: 8px solid var(--red);
}

.body img {
  margin: 1.1em 0;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.body table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 0.97rem; }
.body th,
.body td { border: 3px solid var(--ink); padding: 8px 10px; text-align: left; }
.body th { background: var(--blue); font-weight: 900; }

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

/* ---------- 页脚 ---------- */
footer {
  margin-top: 52px;
  padding: 26px 18px 30px;
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  justify-content: space-between;
  align-items: flex-start;
}

footer article { flex: 1 1 220px; }

footer h2 {
  margin: 0 0 8px;
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--blue);
}

footer h2 span { display: inline; background: none; box-shadow: none; padding: 0; }

footer p { margin: 0; }

.fl { display: flex; flex-wrap: wrap; gap: 4px 16px; }

.fl a,
.top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 3px solid var(--red);
}

.fl a:hover,
.fl a:focus-visible,
.top:hover,
.top:focus-visible { color: var(--blue); border-bottom-color: var(--blue); }

.copy {
  flex: 1 1 100%;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 3px solid #fff;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- 断点 ---------- */
@media (max-width: 880px) {
  body { padding-bottom: 104px; }
  main { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 18px 16px 0; }
  .hero { min-height: 45vh; }
  .side { position: static; padding: 22px 0 6px; }
  .side ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .body { padding-top: 18px; }
  .body article { scroll-margin-bottom: 120px; }
  .sw input { width: 92px; }
  .bar { gap: 8px; padding: 9px 10px; }
  .mark { min-height: 44px; padding: 0 10px; }
}

@media (max-width: 420px) {
  .sw input { width: 74px; padding: 0 6px; }
  .side ul { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(28px, 9vw, 40px); }
  .hero-art { box-shadow: 6px 6px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .hero-art img,
  .hero-img { transform: none; }
}

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