@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:wght@400;600;700&family=EB+Garamond:wght@400;500;600;700;800&display=swap');

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

:root {
  --mint: #b4fde1;
  --blue: #add8e6;
  --ink: #172620;
  --paper: #f6fdfa;
  --line: rgba(180, 253, 225, .28);
  --serif: "EB Garamond", "Crimson Text", "Songti SC", Georgia, serif;
  --body: "Crimson Text", "Songti SC", Georgia, serif;
  --rail: 248px;
}

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

body {
  margin: 0;
  padding: 40px 0 0 var(--rail);
  color: #e8f7f1;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.75;
  background:
    radial-gradient(1100px 620px at 84% -12%, #21403a 0%, rgba(33, 64, 58, 0) 62%),
    radial-gradient(900px 520px at -12% 104%, #12332b 0%, rgba(18, 51, 43, 0) 58%),
    var(--ink);
  min-height: 100vh;
}

img { max-width: 100%; }
p { margin: 0 0 1em; }
a { color: var(--mint); }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: .88em;
}

small {
  display: block;
  font-family: var(--body);
  font-size: .74rem;
  letter-spacing: .26em;
  color: #9fe8cd;
}

small + h2 { margin-top: .16em; }
small + h3 { margin-top: .16em; }

/* 顶部细条 */
.ticker {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: .7em;
  height: 40px;
  padding: 0 16px;
  background: linear-gradient(90deg, var(--mint), var(--blue));
  color: var(--ink);
  font-size: .82rem;
  letter-spacing: .16em;
  border-bottom: 3px solid var(--ink);
}
.ticker b { font-weight: 700; }
.ticker code {
  background: rgba(23, 38, 32, .14);
  border-radius: 999px;
  padding: 1px 9px;
  letter-spacing: .08em;
}

/* 左侧固定竖排 */
.rail {
  position: fixed;
  left: 0;
  top: 40px;
  bottom: 0;
  width: var(--rail);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 14px 26px;
  overflow-y: auto;
  background: linear-gradient(180deg, #1d332c, #142420);
  border-right: 3px solid var(--line);
  box-shadow: inset -6px 0 18px rgba(0, 0, 0, .35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  min-height: 46px;
  color: var(--mint);
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  border-radius: 18px;
  transition: background .2s ease-out;
}
.brand:hover { background: rgba(180, 253, 225, .1); }
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 3px solid rgba(180, 253, 225, .45);
  object-fit: cover;
}

.mainnav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mainnav a {
  display: block;
  padding: 11px 13px;
  min-height: 44px;
  color: #dff7ee;
  font-size: .98rem;
  text-decoration: none;
  border: 3px solid rgba(180, 253, 225, .18);
  border-radius: 16px;
  background: rgba(180, 253, 225, .06);
  box-shadow: inset -2px -2px 6px rgba(0, 0, 0, .38), 2px 2px 0 rgba(0, 0, 0, .22);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .2s ease-out, color .2s ease-out, box-shadow .2s ease-out, border-color .2s ease-out;
}
.mainnav a:hover,
.mainnav a:focus-visible,
.mainnav a.on {
  background: var(--mint);
  color: var(--ink);
  border-color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--blue), inset -2px -2px 6px rgba(23, 38, 32, .18);
}

/* 主体 */
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 26px 0;
}

.wrap { min-width: 0; }

/* 左侧目录 */
.side {
  position: sticky;
  top: 66px;
  padding: 18px 16px;
  border: 3px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .05);
  box-shadow: inset -2px -2px 10px rgba(0, 0, 0, .42), 3px 3px 0 rgba(0, 0, 0, .26);
}
.side h2 {
  margin: 0 0 .7em;
  font-family: var(--serif);
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: .04em;
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 11px;
  color: #cfeae1;
  font-size: .92rem;
  text-decoration: none;
  border-left: 3px solid rgba(180, 253, 225, .24);
  border-radius: 0 12px 12px 0;
  transition: background .18s ease-out, color .18s ease-out, border-color .18s ease-out;
}
.toc a:hover,
.toc a:focus-visible {
  background: rgba(180, 253, 225, .15);
  border-left-color: var(--mint);
  color: #ffffff;
}

/* 大块面 */
.stage {
  padding: 18px;
  border: 3px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .04);
  box-shadow: inset -3px -3px 14px rgba(0, 0, 0, .38), 7px 7px 0 rgba(0, 0, 0, .24);
}

.prose { display: block; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px;
  align-items: center;
  min-height: 70vh;
  padding: 10px 8px 22px;
  animation: rise .7s cubic-bezier(.34, 1.56, .64, 1) both;
}
.hero.solo { grid-template-columns: 1fr; }

.badge { margin: 0 0 14px; }
.badge code {
  display: inline-block;
  padding: 4px 13px;
  color: var(--ink);
  background: var(--blue);
  border: 3px solid rgba(23, 38, 32, .55);
  border-radius: 999px;
  font-size: .8rem;
  letter-spacing: .12em;
  box-shadow: inset -2px -2px 5px rgba(0, 0, 0, .18);
}

.hero h1 {
  margin: 0 0 .35em;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.05rem, 4.4vw, 3.4rem);
  line-height: 1.14;
  letter-spacing: -.01em;
  color: #f4fffb;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .32);
}

.lede {
  max-width: 32em;
  margin: 0;
  color: #c7e5da;
  font-size: 1.06rem;
  line-height: 1.7;
}

.collage {
  position: relative;
  min-height: 350px;
}
.shot {
  position: absolute;
  object-fit: cover;
  border: 4px solid #f2fffa;
  border-radius: 24px;
  box-shadow: 9px 9px 0 rgba(0, 0, 0, .34), inset 0 0 0 2px rgba(23, 38, 32, .16);
}
.s1 {
  width: 71%;
  height: 72%;
  top: 0;
  left: 0;
  transform: rotate(-2.4deg);
  animation: floatA 8s ease-in-out infinite;
}
.s2 {
  width: 63%;
  height: 62%;
  right: 0;
  bottom: 0;
  transform: rotate(2.6deg);
  animation: floatB 9s ease-in-out infinite;
}
.pin {
  position: absolute;
  top: 45%;
  left: 33%;
  z-index: 3;
  padding: 7px 15px;
  color: var(--ink);
  background: var(--mint);
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  transform: rotate(-6deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .4);
}

/* 正文区块：直角 + 底部强调线 */
.prose > section {
  margin: 0 0 22px;
  padding: 26px 24px;
  color: #12241d;
  background: var(--paper);
  border-radius: 0;
  border-bottom: 5px solid var(--mint);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .22);
  animation: rise .6s cubic-bezier(.34, 1.56, .64, 1) both;
}
.prose > section:last-child { margin-bottom: 0; }
.prose > section:nth-of-type(2) { animation-delay: .04s; }
.prose > section:nth-of-type(3) { animation-delay: .08s; }
.prose > section:nth-of-type(4) { animation-delay: .12s; }
.prose > section:nth-of-type(5) { animation-delay: .16s; }
.prose > section:nth-of-type(6) { animation-delay: .2s; }
.prose > section:nth-of-type(7) { animation-delay: .24s; }

.prose section[id] { scroll-margin-top: 64px; }

.prose small {
  display: block;
  margin-bottom: 2px;
  color: #0d7a58;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .26em;
}

.prose h2 {
  margin: 0 0 .55em;
  font-family: var(--serif);
  font-size: clamp(1.42rem, 2.6vw, 1.9rem);
  line-height: 1.24;
  letter-spacing: -.005em;
  color: #0d241c;
}
.prose h3 {
  margin: 1.3em 0 .4em;
  font-family: var(--serif);
  font-size: 1.24rem;
  line-height: 1.3;
  color: #123328;
}
.prose p { margin: 0 0 .95em; font-size: 1rem; }
.prose ul,
.prose ol { margin: 0 0 1em; padding-left: 1.25em; }
.prose li { margin: .38em 0; }
.prose a {
  color: #0b5f46;
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background .18s ease-out;
}
.prose a:hover { background: rgba(180, 253, 225, .7); }

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 4px solid #ffffff;
  border-radius: 20px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .22);
}

.prose blockquote {
  margin: 16px 0;
  padding: 10px 18px;
  background: rgba(180, 253, 225, .3);
  border-left: 6px solid var(--mint);
  border-radius: 0 16px 16px 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose pre {
  margin: 16px 0;
  padding: 14px 16px;
  overflow-x: auto;
  color: #cdf7e5;
  background: #102019;
  border: 3px solid rgba(180, 253, 225, .26);
  border-radius: 16px;
  line-height: 1.6;
}
.prose pre code { font-size: .85rem; }

.prose table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: .95rem;
}
.prose th,
.prose td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 2px solid rgba(23, 38, 32, .16);
}
.prose th { background: rgba(173, 216, 230, .34); }

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  max-width: 1180px;
  margin: 42px auto 0;
  padding: 26px 26px 34px;
  border-top: 3px solid var(--line);
}

.cta {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: linear-gradient(120deg, rgba(180, 253, 225, .17), rgba(173, 216, 230, .12));
  border: 3px solid rgba(180, 253, 225, .55);
  border-radius: 26px;
  box-shadow: inset -3px -3px 14px rgba(0, 0, 0, .42);
}
.cta h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #eafff7;
  letter-spacing: .02em;
}
.cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 24px;
  color: var(--ink);
  background: var(--mint);
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .38), inset -2px -2px 6px rgba(23, 38, 32, .16);
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease-out;
}
.cta a:hover,
.cta a:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--blue);
}

.foot-brand a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--mint);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}
.foot-brand img {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 2px solid rgba(180, 253, 225, .5);
  object-fit: cover;
}

.foot-nav ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
}
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 4px 10px;
  color: #cfe9df;
  font-size: .86rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .18s ease-out, border-color .18s ease-out;
}
.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

.foot-meta {
  flex: 1 1 auto;
  text-align: center;
}
.foot-meta p {
  margin: 0;
  color: #9dbcb1;
  font-size: .84rem;
  letter-spacing: .06em;
}

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

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes floatA {
  0%, 100% { transform: rotate(-2.4deg) translateY(0); }
  50% { transform: rotate(-1.2deg) translateY(-8px); }
}
@keyframes floatB {
  0%, 100% { transform: rotate(2.6deg) translateY(0); }
  50% { transform: rotate(1.4deg) translateY(7px); }
}

@media (max-width: 1060px) {
  .shell {
    grid-template-columns: 1fr;
    padding: 18px 18px 0;
    gap: 18px;
  }
  .side { position: static; }
  .toc { flex-direction: row; flex-wrap: wrap; }
  .toc a {
    min-height: 40px;
    border-left: 0;
    border: 3px solid rgba(180, 253, 225, .18);
    border-radius: 14px;
    padding: 6px 12px;
  }
}

@media (max-width: 860px) {
  body { padding: 40px 0 0; }

  .rail {
    position: static;
    width: auto;
    height: auto;
    top: auto;
    bottom: auto;
    overflow: visible;
    padding: 12px 14px 14px;
    gap: 10px;
    border-right: 0;
    border-bottom: 3px solid var(--line);
    box-shadow: inset 0 -6px 16px rgba(0, 0, 0, .3);
  }
  .mainnav ol {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }
  .mainnav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    white-space: nowrap;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 8px 2px 16px;
    gap: 18px;
  }
  .collage { min-height: 300px; }

  .stage { padding: 14px; border-radius: 22px; }
  .prose > section { padding: 20px 16px; }

  .foot {
    flex-direction: column;
    text-align: center;
    padding: 22px 16px 30px;
  }
  .foot-nav ol { justify-content: center; }
  .cta {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .s1 { transform: rotate(-2.4deg); }
  .s2 { transform: rotate(2.6deg); }
}

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