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

:root {
  --green: #00ff80;
  --blue: #0000ff;
  --ink: #000000;
  --paper: #ffffff;
  --hd-h: 142px;
  --edge: 3px solid var(--ink);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Rubik', 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(0, 0, 0, .17) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
}

img {
  max-width: 100%;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* 顶部两行：品牌独占一行 + 药丸菜单 */
.hd {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--green);
  border-bottom: 4px solid var(--green);
  padding: 10px 16px 12px;
}

.hd-bar {
  display: flex;
  align-items: center;
  padding: 0 0 10px;
  border-bottom: 2px dashed rgba(0, 255, 128, .5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 0;
  color: var(--green);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.2;
  text-decoration: none;
}

.brand-name {
  border-bottom: 3px solid var(--green);
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 2px solid var(--green);
  border-radius: 18px;
  background: var(--green);
}

.hd-nav {
  display: flex;
  gap: 8px;
  padding: 9px 0 2px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 2px solid var(--green);
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--blue);
}

.pill:hover,
.pill:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 3px 3px 0 var(--green);
  transform: translate(-1px, -1px);
}

/* 版心 */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 34px;
  align-items: start;
}

.doc {
  min-width: 0;
}

/* 首屏 */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 30px;
  padding: 34px 0 0;
  border-bottom: 4px solid var(--ink);
  text-align: right;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 62px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 30ch;
  padding: 10px 16px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--green);
  border: var(--edge);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
}

.hero-art {
  border-top: var(--edge);
  background: var(--green);
}

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

/* 正文 */
.content {
  padding: 34px 0 0;
}

.content section {
  padding: 26px 0 30px;
  border-top: var(--edge);
  scroll-margin-top: calc(var(--hd-h) + 10px);
}

.content section:first-child {
  border-top: 0;
  padding-top: 4px;
}

.content h2 {
  margin: 0 0 18px;
  padding: 10px 16px;
  font-size: clamp(23px, 3.6vw, 33px);
  font-weight: 700;
  line-height: 1.2;
  background: var(--green);
  border: var(--edge);
  border-radius: 18px;
  box-shadow: 5px 5px 0 var(--ink);
}

.content h3 {
  margin: 26px 0 12px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  border-left: 8px solid var(--blue);
  padding-left: 12px;
}

.content h4 {
  margin: 20px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.content p {
  margin: 0 0 16px;
  max-width: 68ch;
}

.content ul,
.content ol {
  margin: 0 0 16px;
  padding-left: 1.35em;
  max-width: 66ch;
}

.content li {
  margin: 0 0 6px;
}

.content a {
  color: var(--blue);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.content blockquote {
  margin: 22px 0;
  padding: 12px 18px;
  border-left: 8px solid var(--blue);
  background: rgba(0, 0, 255, .05);
}

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

.content img {
  display: block;
  height: auto;
  border: var(--edge);
  border-radius: 18px;
  margin: 12px 0 18px;
}

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

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

.content th {
  background: var(--green);
}

.content hr {
  border: 0;
  border-top: 3px dashed var(--ink);
  margin: 26px 0;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: var(--hd-h);
  padding-top: 34px;
  align-self: start;
}

.rail-box {
  padding: 14px 16px 20px;
  background: var(--blue);
  color: #fff;
  border: var(--edge);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--green);
}

.rail-box h2 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .22em;
  color: #fff;
}

.h2t {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.h2dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--green);
}

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

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px dotted rgba(255, 255, 255, .45);
}

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

.rail-nav a:hover {
  color: var(--green);
}

/* 页脚 */
.ft {
  background-color: var(--ink);
  background-image: radial-gradient(rgba(0, 255, 128, .38) 1px, transparent 1px);
  background-size: 18px 18px;
  color: #fff;
  border-top: 6px solid var(--green);
  padding: 42px 16px 78px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 26px;
  align-items: start;
}

.ft > section {
  padding: 18px 18px 22px;
  background: rgba(0, 0, 0, .62);
  border: 3px solid var(--green);
  border-radius: 18px;
}

.ft h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--green);
}

.ft-desc {
  margin: 0 0 18px;
  color: #e6e6e6;
  font-size: 17px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 12px 22px;
  background: var(--green);
  border: 3px solid var(--green);
  border-radius: 999px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.cta::after {
  content: "→";
  font-weight: 700;
}

.cta:hover,
.cta:focus-visible {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.ft-links nav dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
}

.ft-links dt {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .1em;
}

.ft-links dd {
  margin: 0;
  min-width: 0;
}

.ft-links dd a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 0;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px dotted rgba(0, 255, 128, .5);
}

.ft-links dd a:hover,
.ft-links dd a:focus-visible {
  color: var(--green);
}

.copy {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 14px;
  border-top: 2px solid rgba(0, 255, 128, .45);
  color: #b9b9b9;
  font-size: 16px;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: none;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--blue);
  cursor: pointer;
}

.to-top.on {
  display: inline-flex;
}

.to-top:hover {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* 进场 */
.js .js-reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js .js-reveal.in {
  opacity: 1;
  transform: none;
}

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

  .js .js-reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 920px) {
  :root {
    --hd-h: 132px;
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-bottom: 40px;
  }

  .hero {
    min-height: 56vh;
    padding-top: 26px;
  }

  .rail {
    position: static;
    top: auto;
    padding-top: 30px;
  }

  .content {
    padding-top: 28px;
  }

  .ft {
    grid-template-columns: 1fr;
    padding-bottom: 82px;
  }

  .copy {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 19px;
  }

  .hd-nav {
    gap: 6px;
  }

  .pill {
    padding: 8px 13px;
  }

  .lede {
    font-size: 17px;
    max-width: 26ch;
  }

  .content h2 {
    padding: 9px 13px;
  }

  .hero h1 {
    font-size: clamp(30px, 9vw, 40px);
  }
}

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