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

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

:root {
  --ink: #1f1f1f;
  --paper: #f5f5f5;
  --card: rgba(255, 255, 255, .74);
  --line: rgba(31, 31, 31, .1);
  --soft: rgba(31, 31, 31, .05);
  --shadow: 0 12px 32px rgba(31, 31, 31, .09);
  --head: Fredoka, Nunito, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --text: Nunito, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

body {
  margin: 0;
  padding: 0 0 108px;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(62vw 46vw at 92% -10%, rgba(31, 31, 31, .08), transparent 68%),
    radial-gradient(54vw 40vw at -12% 26%, rgba(31, 31, 31, .05), transparent 70%),
    var(--paper);
  background-attachment: fixed;
}

h1, h2, h3, .mark, .cta-mark, summary, button {
  font-family: var(--head);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 底部浮条 ---------- */
.dock {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(100% - 20px, 1000px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 16px 42px rgba(31, 31, 31, .16);
}

.dock .pill,
.cta-up {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 999px;
  border: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: var(--head);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}

.dock .pill:hover,
.dock .pill:focus-visible,
.cta-up:hover {
  background: var(--ink);
  color: #fff;
}

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

.mark {
  justify-self: center;
  padding: 8px 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- 抽屉菜单 ---------- */
.drawer {
  position: relative;
  justify-self: start;
}

.drawer > summary {
  list-style: none;
  -webkit-appearance: none;
}

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

.drawer[open] > summary { background: var(--ink); color: #fff; }

.drawer > menu {
  display: none;
  margin: 0;
  padding: 0;
}

.drawer[open] > menu {
  display: grid;
  position: absolute;
  left: 0;
  bottom: calc(100% + 14px);
  width: min(88vw, 440px);
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
  padding: 12px;
  list-style: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.drawer > menu li { margin: 0; }

.drawer > menu li > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  transition: background .2s ease;
}

.drawer > menu li > a:hover { background: rgba(31, 31, 31, .12); }

.tray-search { grid-column: 1 / -1; }

.tray-search form {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.tray-search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: var(--text);
  font-size: 16px;
  color: var(--ink);
}

.tray-search input:focus { outline: 2px solid rgba(31, 31, 31, .3); outline-offset: 1px; }

.tray-search button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

/* ---------- 版心 ---------- */
.sheet {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 20px 18px 56px;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

/* ---------- 首屏 ---------- */
.stage {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 18px;
  align-items: start;
  padding-bottom: 26px;
}

.stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--ink), rgba(31, 31, 31, .12));
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
}

.stage-copy {
  min-height: 64vh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 48px 6px 18px;
}

.stage-copy h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(34px, 7.4vw, 78px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.02em;
}

.stage-desc {
  margin: 20px 0 0;
  max-width: 44ch;
  font-size: 17px;
  color: rgba(31, 31, 31, .68);
}

/* ---------- 右侧索引 ---------- */
.index {
  position: sticky;
  top: 22px;
  margin-top: 46px;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.index small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  color: rgba(31, 31, 31, .42);
}

.index h2 {
  margin: 6px 0 12px;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
}

.index ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: idx;
  display: grid;
  gap: 3px;
}

.index li a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  transition: background .18s ease;
}

.index li a::before {
  counter-increment: idx;
  content: counter(idx, decimal-leading-zero);
  font-family: var(--head);
  font-size: 12px;
  font-weight: 600;
  color: rgba(31, 31, 31, .38);
}

.index li a:hover { background: var(--soft); }

/* ---------- 正文卡片 ---------- */
.sheet > article:not(.stage) {
  grid-column: 1 / span 8;
  padding: 30px 28px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--card);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  scroll-margin-top: 22px;
  transition: opacity .5s ease, transform .5s ease, box-shadow .25s ease, border-color .25s ease;
}

.sheet > article:not(.stage):nth-of-type(even) { grid-column: 5 / span 8; }

.sheet > article:not(.stage):hover {
  border-color: rgba(31, 31, 31, .2);
  box-shadow: 0 18px 40px rgba(31, 31, 31, .12);
}

.sheet > article:not(.stage) > small {
  display: block;
  margin-bottom: 8px;
  font-family: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  color: rgba(31, 31, 31, .42);
}

.sheet > article:not(.stage) h2 {
  margin: 0 0 .6em;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.sheet > article:not(.stage) h2 + small { margin-top: -.2em; }

.sheet > article:not(.stage) h3 {
  margin: 1.4em 0 .5em;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
}

.sheet > article:not(.stage) p { margin: 0 0 1em; }

.sheet > article:not(.stage) p:last-child { margin-bottom: 0; }

.sheet > article:not(.stage) ul,
.sheet > article:not(.stage) ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.sheet > article:not(.stage) li { margin-bottom: .4em; }

.sheet > article:not(.stage) a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.sheet > article:not(.stage) blockquote {
  margin: 0 0 1em;
  padding: 2px 0 2px 16px;
  border-left: 3px solid rgba(31, 31, 31, .22);
  color: rgba(31, 31, 31, .74);
}

.sheet > article:not(.stage) strong { font-weight: 700; }

.sheet > article:not(.stage) img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 18px 8px;
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 26px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
}

.cta-mark {
  margin: 0;
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
}

.cta-up {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  text-decoration: none;
}

.cta-up:hover { background: #fff; color: var(--ink); }

.foot-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 14px 18px;
  align-items: start;
  padding: 22px 4px 10px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.foot-logo {
  font-family: var(--head);
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.4;
}

.foot-nav {
  grid-column: 2 / span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 18px;
}

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

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  font-size: 16px;
  line-height: 1.3;
  color: rgba(31, 31, 31, .72);
  text-decoration: none;
}

.foot-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.foot-copy {
  grid-column: 4;
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(31, 31, 31, .55);
  white-space: nowrap;
}

/* ---------- 动效 ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .sheet > article:not(.stage) {
    opacity: 0;
    transform: translateY(16px);
  }

  html.js .sheet > article:not(.stage).in {
    opacity: 1;
    transform: none;
  }

  html.js .index li {
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .4s ease, transform .4s ease;
  }

  html.ready .index li {
    opacity: 1;
    transform: none;
  }
}

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

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-copy {
    min-height: 56vh;
    padding: 36px 4px 6px;
  }

  .index {
    position: static;
    margin-top: 4px;
  }

  .sheet { padding: 14px 16px 44px; }

  .sheet > article:not(.stage),
  .sheet > article:not(.stage):nth-of-type(even) {
    grid-column: 1 / -1;
    padding: 24px 20px;
  }

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

  .foot-nav {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }

  .foot-copy {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .dock {
    grid-template-columns: auto 1fr auto;
    gap: 4px;
    padding: 8px 9px;
  }

  .dock .pill { padding: 0 12px; }

  .mark { font-size: 17px; padding: 8px 6px; }

  .drawer[open] > menu { width: min(92vw, 380px); }

  .cta-mark { font-size: 26px; }

  .foot-cta { padding: 20px 18px; }
}

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