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

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

:root {
  --p: #3bb1ff;
  --a: #ff5252;
  --ink: #000;
  --bg: #eaf5ff;
  --paper: #fff;
  --bd: 3px solid #000;
  --rad: 10px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
main { display: block; }

.shell { overflow-x: clip; }

/* ---------- 页头 ---------- */
.masthead {
  background: var(--paper);
  border-bottom: var(--bd);
}

.ticker {
  margin: 0;
  padding: 6px 16px;
  background: var(--a);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  border-bottom: var(--bd);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mast-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.brandrow { padding: 10px 0 8px; }

.brand {
  display: inline-block;
  background: var(--p);
  border: var(--bd);
  border-radius: 8px;
  box-shadow: 4px 4px 0 #000;
  padding: 1px 12px;
  font-size: clamp(20px, 4vw, 27px);
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.brand:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }

.navrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
}

.navrow > .menu,
.menu-list,
.menu-list li { display: contents; }

.menu > summary,
.menu-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: var(--bd);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 3px 3px 0 #000;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  list-style: none;
}

.menu > summary {
  background: var(--a);
  color: #fff;
}

.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::marker { content: ''; }

.menu-list a:hover,
.menu > summary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
  background: var(--p);
  color: var(--ink);
}

/* ---------- 主栅格 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 24px;
  align-items: start;
}

/* ---------- 首屏 ---------- */
.hero { grid-column: 1 / -1; margin: 22px 0 0; }

.hero-box {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 22px;
  align-items: center;
  min-height: min(70vh, 520px);
  padding: clamp(20px, 4vw, 44px);
  background: var(--p);
  border: var(--bd);
  border-radius: 12px;
  box-shadow: 8px 8px 0 #000;
}

.hero-ghost {
  position: absolute;
  right: -.05em;
  bottom: -.3em;
  font-size: clamp(120px, 26vw, 300px);
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.05em;
  color: #fff;
  opacity: .5;
  pointer-events: none;
}

.hero-txt { position: relative; z-index: 1; }

.hero-txt h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5.2vw, 54px);
  line-height: 1.18;
  letter-spacing: -.01em;
}

.hero-desc {
  margin: 0 0 20px;
  max-width: 44ch;
  font-size: 17px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 20px;
  background: var(--paper);
  border: var(--bd);
  border-radius: 8px;
  box-shadow: 4px 4px 0 #000;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  background: var(--a);
  color: #fff;
}

.hero-art { margin: 0; position: relative; z-index: 1; }

.hero-art .hero-img,
.hero-art img {
  width: 100%;
  border: var(--bd);
  border-radius: var(--rad);
  box-shadow: 6px 6px 0 #000;
  background: var(--paper);
}

/* ---------- 正文 ---------- */
.content { display: block; }

.content > section {
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: var(--bd);
  border-radius: var(--rad);
  box-shadow: 6px 6px 0 #000;
  padding: clamp(18px, 3vw, 32px);
  margin-bottom: 26px;
  overflow-wrap: break-word;
  scroll-margin-top: 132px;
}

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

.content h2 {
  margin: 0 0 14px;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.28;
}

.content h2 span {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 6px solid var(--a);
}

.content h3 {
  margin: 1.4em 0 .6em;
  font-size: clamp(19px, 2.4vw, 22px);
  line-height: 1.35;
}

.content h3 span { display: inline-block; background: #d8eeff; padding: 0 6px; }

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

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

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

.content ul,
.content ol { margin: 0 0 1em; padding-left: 1.25em; }
.content li { margin: .35em 0; }

.content img {
  margin: 1em 0;
  border: var(--bd);
  border-radius: var(--rad);
  box-shadow: 5px 5px 0 #000;
}

.content blockquote {
  margin: 1em 0;
  padding: 12px 16px;
  background: var(--paper);
  border: var(--bd);
  border-left: 10px solid var(--a);
  border-radius: 8px;
}

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

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: var(--paper);
}

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

.content code {
  background: #dff0ff;
  padding: 1px 5px;
  border: 2px solid #000;
  border-radius: 5px;
  font-size: 15px;
}

/* ---------- 侧栏 ---------- */
.side {
  background: var(--paper);
  border: var(--bd);
  border-radius: var(--rad);
  box-shadow: 6px 6px 0 #000;
  padding: 16px;
  position: sticky;
  top: 132px;
}

.side h2 { margin: 0 0 12px; font-size: 17px; line-height: 1.4; }

.side h2 span {
  display: inline-block;
  padding: 3px 9px;
  background: var(--p);
  border: 2px solid #000;
  border-radius: 6px;
}

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

.side-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 2px solid #000;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 3px 3px 0 #000;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.side-links a:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 #000;
  background: var(--p);
}

/* ---------- 页脚 ---------- */
.site-foot {
  margin-top: 44px;
  padding: 36px max(16px, calc((100% - 1180px) / 2)) 0;
  background: #000;
  color: #fff;
  border-top: 8px solid var(--p);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  overflow: hidden;
}

.foot-col h2 { margin: 0 0 12px; font-size: 17px; letter-spacing: .04em; }

.foot-col h2 span {
  display: inline-block;
  padding: 2px 10px;
  background: var(--a);
  border-radius: 6px;
}

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

.foot-links a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 2px;
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 2px solid #333;
}

.foot-links a:hover { color: var(--p); border-bottom-color: var(--p); }

.foot-brand-sm {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--p);
  overflow-wrap: break-word;
}

.foot-mark {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 3px dashed #555;
  font-size: clamp(46px, 13vw, 140px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--p);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foot-copy {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 0 22px;
  border-top: 2px solid #333;
  font-size: 14px;
  color: #c9c9c9;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 14px;
  background: var(--a);
  color: #fff;
  border: var(--bd);
  border-radius: 10px;
  box-shadow: 4px 4px 0 #000;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}

.to-top.is-on { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js-on .content > section,
  html.js-on .side,
  html.js-on .foot-col {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .45s ease, transform .45s ease;
  }

  html.js-on .content > section.in,
  html.js-on .side.in,
  html.js-on .foot-col.in {
    opacity: 1;
    transform: none;
  }
}

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

/* ---------- 断点 ---------- */
@media (min-width: 860px) {
  .masthead {
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .14);
  }
}

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

  .hero { margin-top: 16px; }

  .hero-box {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 16px;
    padding: 20px;
    box-shadow: 6px 6px 0 #000;
  }

  .hero-ghost { font-size: clamp(100px, 34vw, 190px); opacity: .4; }

  .hero-txt h1 { font-size: clamp(27px, 8vw, 38px); }

  .navrow {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: thin;
  }

  .menu > summary,
  .menu-list a { flex: 0 0 auto; }

  .side { position: static; }

  .content > section { scroll-margin-top: 14px; box-shadow: 5px 5px 0 #000; }

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

  .foot-mark { font-size: clamp(44px, 16vw, 90px); }
}

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