:root {
  --bg: #FFF3E6;
  --bg-2: #FFF8F0;
  --accent: #FF6B5A;
  --accent-d: #C94A37;
  --ink: #2B2B33;
  --muted: #6C6360;
  --line: #E7D2BE;
  --r: 10px;
  --font: 'Quicksand', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --hand: 'Caveat', var(--font);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { text-wrap: balance; }

hr {
  border: 0;
  height: 2px;
  width: 46px;
  background: var(--accent);
  margin: 14px 0 18px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 90;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
  transition: top .2s ease;
}
.skip:focus { top: 12px; }

/* 顶部品牌栏 */
.bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  min-height: 44px;
  text-decoration: none;
  letter-spacing: .02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  display: block;
  object-fit: cover;
}

.brand-name {
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .06em;
}

/* 粘性锚点条 */
.anchors {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 243, 230, .95);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ink);
}

.anchors-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 12px;
}

.anchors-ol {
  display: flex;
  align-items: stretch;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.anchors-ol::-webkit-scrollbar { display: none; }

.anchors-ol a {
  display: block;
  padding: 12px 10px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s ease, border-color .2s ease;
}
.anchors-ol a:hover,
.anchors-ol a.on { color: var(--accent-d); border-color: var(--accent); }

.bar-progress {
  display: block;
  height: 3px;
  background: transparent;
}
.bar-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .1s linear;
}

/* 主体 */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 42vh;
  padding: 26px 0 22px;
}

.hero-h1 {
  margin: 0;
  font-size: clamp(2rem, 6.6vw, 4.2rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -.015em;
}

.hero-h1 span {
  display: inline-block;
  animation: rise .62s cubic-bezier(.2, .72, .3, 1) backwards;
  animation-delay: calc(var(--i) * 26ms);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px) rotate(3deg); }
  to { opacity: 1; transform: none; }
}

.hero-rule { margin: 16px 0 12px; }

.lede {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.lede::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -.12em;
  background: var(--accent);
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.hero-side { min-width: 0; will-change: transform; }

.hero-art {
  width: 104px;
  max-width: 104px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--bg-2);
  padding: 8px;
}

/* 内容与侧栏 */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 258px;
  gap: 38px;
  align-items: start;
  padding: 4px 0 64px;
}

.prose {
  max-width: 70ch;
  counter-reset: sec;
  font-size: 17px;
  line-height: 1.85;
}

.prose > div {
  position: relative;
  counter-increment: sec;
  padding: 24px 0 30px;
  border-top: 1px dashed var(--line);
  scroll-margin-top: 84px;
}

.prose > div::before {
  content: counter(sec, decimal-leading-zero);
  display: block;
  font-family: var(--hand);
  font-size: 34px;
  line-height: 1;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(115deg, var(--accent), #F3A492 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.js .prose > div {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s ease, transform .65s ease;
}
.js .prose > div.in { opacity: 1; transform: none; }

.prose h2 {
  margin: 0 0 .6em;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  line-height: 1.34;
  letter-spacing: .005em;
}

.prose h3 {
  margin: 1.4em 0 .5em;
  font-size: 1.16rem;
  line-height: 1.5;
}

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

.prose a { color: var(--accent-d); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.prose ul,
.prose ol { padding-left: 1.25em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }

.prose img {
  border: 2px solid var(--ink);
  border-radius: var(--r);
  margin: 1.2em 0;
  background: var(--bg-2);
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 2px 0 2px 15px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.prose time {
  font-family: var(--hand);
  font-size: 1.1em;
  letter-spacing: .04em;
  color: var(--muted);
}

/* 侧栏 */
.rail-in {
  position: sticky;
  top: 86px;
  border: 2px solid var(--ink);
  border-radius: var(--r);
  background: var(--bg-2);
  padding: 16px 14px 12px;
}

.rail-t {
  margin: 0;
  font-size: 16px;
  letter-spacing: .22em;
  font-weight: 700;
}

.rail-in hr { margin: 10px 0 8px; width: 30px; }

.jump {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.jump a {
  display: block;
  padding: 10px 8px;
  font-size: 16px;
  text-decoration: none;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease;
}
.jump a:hover { background: #FFE3D3; color: var(--accent-d); }

.totop {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-d);
  text-decoration: none;
}

/* 页脚 */
.foot {
  border-top: 2px solid var(--ink);
  padding: 14px 20px 26px;
}

.foot-row {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
}

.foot-mark {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .06em;
  text-decoration: none;
  padding: 10px 0;
}

.foot-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-nav a {
  display: block;
  padding: 10px 7px;
  font-size: 16px;
  color: var(--muted);
  text-decoration: none;
}
.foot-nav a:hover { color: var(--accent-d); }

.copy {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .hero-art { width: 140px; max-width: 140px; }
}

@media (max-width: 880px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-bottom: 48px; }
  .rail-in { position: static; }
  .jump { grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .rail { order: 2; }
  .hero { min-height: 0; padding: 20px 0 18px; }
  .hero-art { width: 76px; max-width: 76px; padding: 6px; }
}

@media (max-width: 420px) {
  .bar { padding: 10px 16px; }
  .wrap { padding: 0 16px; }
  .foot { padding-left: 16px; padding-right: 16px; }
  .foot-row { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .prose > div { opacity: 1; transform: none; }
  .hero-side { transform: none !important; }
}

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