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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --gray: #6b6b6b;
  --band: #f3f3f3;
  --hair: #d4d4d4;
  --pad: clamp(1.05rem, 4vw, 3.2rem);
  --ffd: "Fredoka", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --ffb: "Nunito", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ffb);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

@media (min-width: 900px) {
  body { font-size: 18px; }
}

menu { margin: 0; padding: 0; list-style: none; }

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

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.foot a:focus-visible { outline-color: var(--paper); }

img { max-width: 100%; }

:where(.masthead, .hero, .ledger, .foot > article) {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* 报头 */
.masthead {
  border-bottom: 3px solid var(--ink);
  padding-top: 1rem;
  background: var(--paper);
}

@media (min-width: 900px) {
  .masthead {
    position: sticky;
    top: 0;
    z-index: 60;
    padding-top: 1.1rem;
  }
}

.brandrow {
  display: flex;
  align-items: center;
  padding-bottom: 0.75rem;
}

.wordmark {
  font-family: var(--ffd);
  font-weight: 700;
  font-size: clamp(1.45rem, 4.4vw, 2.2rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.navrow { border-top: 1px solid var(--ink); }

.navdet > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0.6rem 0.1rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--ffd);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.18em;
}

.navdet > summary::-webkit-details-marker { display: none; }

.sumchev {
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translate(-2px, 2px);
  transition: transform 0.22s ease;
}

.navdet[open] .sumchev { transform: rotate(-135deg) translate(-2px, 2px); }

.navmenu {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hair);
}

.navmenu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 0.15rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
  border-bottom: 1px solid var(--hair);
}

.navmenu a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

@media (min-width: 900px) {
  .navdet {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .navdet > summary {
    min-height: 0;
    padding: 0.5rem 1rem 0.5rem 0.1rem;
  }
  .navmenu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.1rem;
    border-top: 0;
    padding-bottom: 0.15rem;
  }
  .navmenu a {
    min-height: 44px;
    padding: 0.5rem 0.8rem;
    border-bottom: 2px solid transparent;
  }
  .navmenu a:hover { border-bottom-color: var(--ink); text-decoration: none; }
  .navmenu a.is-now { border-bottom-color: var(--ink); }
}

/* 首屏 */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 70vh;
  padding-top: clamp(1.5rem, 5vw, 2.6rem);
  padding-bottom: 0;
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}

.badge {
  position: absolute;
  top: clamp(1.1rem, 4vw, 2.2rem);
  left: var(--pad);
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--ffd);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  padding: 0.45rem 0.9rem;
  transform: rotate(-4deg);
}

.heroin {
  margin-left: auto;
  text-align: right;
  max-width: min(100%, 44ch);
}

.hero h1 {
  margin: 0 0 0.8rem;
  padding-top: clamp(2.2rem, 7vw, 3rem);
  font-family: var(--ffd);
  font-weight: 700;
  font-size: clamp(2.3rem, 8.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lede {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--ink);
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.72;
  color: #1a1a1a;
  text-align: right;
}

.herofig {
  position: relative;
  margin: 0;
  height: clamp(190px, 33vh, 400px);
  overflow: hidden;
  background: var(--band);
}

.herofig img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  will-change: transform;
}

.herofig figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  background: var(--paper);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  padding: 0.35rem 0.7rem;
}

/* 侧栏与正文 */
.ledger {
  display: grid;
  grid-template-columns: 1fr;
  padding-block: clamp(1.8rem, 5vw, 3.2rem);
}

@media (min-width: 900px) {
  .ledger {
    grid-template-columns: minmax(158px, 208px) minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4.5rem);
    align-items: start;
  }
}

.rail {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 1.3rem;
  margin-bottom: 1.8rem;
}

@media (min-width: 900px) {
  .rail {
    position: sticky;
    top: 7.6rem;
    margin-bottom: 0;
    padding: 0 0 0 0.95rem;
    border-bottom: 0;
    border-left: 3px solid var(--ink);
  }
}

.rail h2 {
  margin: 0 0 0.5rem;
  font-family: var(--ffd);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
}

.rail hr {
  border: 0;
  border-top: 3px solid var(--ink);
  width: 34px;
  margin: 0 0 0.9rem;
}

.raillist { counter-reset: rail; }

.raillist li {
  counter-increment: rail;
  border-bottom: 1px solid var(--hair);
}

.raillist a {
  display: block;
  padding: 0.72rem 0;
  font-size: 0.94rem;
  line-height: 1.5;
  text-decoration: none;
}

.raillist a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: var(--ffd);
  font-size: 0.72rem;
  color: var(--gray);
  margin-right: 0.5rem;
}

.raillist a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.raillist a.is-now { font-weight: 700; }

.prose {
  max-width: 70ch;
  counter-reset: sec;
}

.prose > article {
  counter-increment: sec;
  padding-block: clamp(1.7rem, 4vw, 2.7rem);
  border-top: 2px solid var(--ink);
  scroll-margin-top: 1.2rem;
}

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

@media (min-width: 900px) {
  .prose > article { scroll-margin-top: 8rem; }
}

.prose h2 {
  position: relative;
  margin: 0 0 0.55rem;
  padding-left: 2.4rem;
  font-family: var(--ffd);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.6vw, 2.1rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
}

.prose h2::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.28em;
  width: 1.7rem;
  padding-top: 0.28rem;
  border-top: 2px solid var(--ink);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--gray);
}

.prose hr {
  border: 0;
  border-top: 3px solid var(--ink);
  width: 62px;
  margin: 0.15rem 0 1.25rem;
}

.prose h3 {
  margin: 1.55rem 0 0.5rem;
  font-family: var(--ffd);
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.35;
}

.prose p {
  margin: 0 0 1.1em;
  line-height: 1.85;
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.25rem;
}

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

.prose > article:first-child > p:first-of-type::first-letter {
  float: left;
  font-family: var(--ffd);
  font-weight: 700;
  font-size: 3.4em;
  line-height: 0.84;
  padding: 0.06em 0.12em 0 0;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 0.1em 0 0.1em 1rem;
  border-left: 5px solid var(--ink);
  font-family: var(--ffd);
  font-size: 1.1em;
  line-height: 1.55;
}

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

.prose figure { margin: 1.5em 0; }

.prose img {
  display: block;
  height: auto;
  filter: grayscale(1);
}

.prose figcaption {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hair);
  font-size: 0.82rem;
  color: var(--gray);
}

.prose aside {
  margin: 1.5em 0;
  padding: 0.9rem 1rem;
  border: 2px solid var(--ink);
  font-size: 0.95rem;
  background: var(--band);
}

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

.prose th,
.prose td {
  padding: 0.6rem 0.45rem;
  border-bottom: 1px solid var(--hair);
  text-align: left;
}

/* 页脚 */
.foot {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: clamp(2rem, 6vw, 4rem);
  background: var(--ink);
  color: var(--paper);
}

@media (min-width: 760px) {
  .foot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.fta {
  grid-column: 1 / -1;
  padding-block: clamp(2.2rem, 7vw, 4.4rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.ftatext {
  margin: 0 0 1.3rem;
  font-family: var(--ffd);
  font-weight: 700;
  font-size: clamp(2.1rem, 8.6vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.ftabtn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--paper);
  color: var(--paper);
  font-family: var(--ffd);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.ftabtn:hover {
  background: var(--paper);
  color: var(--ink);
}

.fcol {
  padding-block: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

@media (min-width: 760px) {
  .fcol {
    padding-block: 2rem;
    border-bottom: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
  }
  .foot > article:nth-of-type(5) { border-right: 0; }
}

.fcolmark { display: flex; align-items: flex-start; }

.fmark {
  margin: 0;
  font-family: var(--ffd);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.fhead {
  margin: 0 0 0.5rem;
  font-family: var(--ffd);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.2em;
}

.fcol hr {
  border: 0;
  border-top: 3px solid var(--paper);
  width: 30px;
  margin: 0 0 0.85rem;
}

.fcol a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 0;
  color: var(--paper);
  font-size: 0.94rem;
  text-decoration: none;
}

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

.legal {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  padding-block: 1.1rem;
}

.legal p {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.78);
}

/* 动效 */
.anim .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.anim .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim .reveal { opacity: 1; transform: none; transition: none; }
  .herofig img { transform: none !important; }
  .sumchev { transition: none; }
}

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