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

:root {
  --ink: #172623;
  --sand: #d4c4a8;
  --mint: #5cc6b0;
  --clay: #c67b5c;
  --paper: #efe7d8;
  --paper-2: #e5dac6;
  --line: rgba(23, 38, 35, 0.18);
  --glass: rgba(255, 252, 244, 0.55);
  --shadow: 0 20px 44px -28px rgba(23, 38, 35, 0.5);
  --r: 4px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  font-family: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.ticker {
  background: var(--ink);
  color: var(--sand);
  font-size: 13px;
  letter-spacing: 0.44em;
  text-align: center;
  padding: 8px 14px 9px;
  text-indent: 0.44em;
  text-transform: uppercase;
}

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px clamp(14px, 3vw, 34px);
  background: rgba(239, 231, 216, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.pillnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pillnav.right {
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
  transition: background 0.25s ease-out, color 0.25s ease-out, transform 0.25s ease-out;
}

.pill:hover,
.pill:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 6px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.18em;
}

.logo {
  border-radius: var(--r);
  display: block;
}

.logo-mark {
  font-size: 18px;
  line-height: 1;
}

main [id] {
  scroll-margin-top: 96px;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 64px) clamp(76px, 12vw, 128px);
  color: #f5efe2;
  background:
    radial-gradient(120% 90% at 82% 12%, rgba(92, 198, 176, 0.4), transparent 62%),
    linear-gradient(155deg, #2b453e 0%, #172623 58%, #33544a 100%);
  clip-path: polygon(0 0, 100% 0, 100% 89%, 0 100%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 46px;
  width: 34%;
  min-width: 90px;
  height: 7px;
  background: var(--mint);
  transform: skewY(-2.4deg);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  filter: saturate(0.85);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 38, 35, 0.15) 0%, rgba(23, 38, 35, 0.8) 82%);
}

.hero-in {
  position: relative;
  z-index: 2;
  max-width: 1000px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 8.4vw, 5.1rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 24px;
  padding: 9px 24px;
  border-radius: var(--r);
  background: var(--mint);
  color: #0d1f1b;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: transform 0.25s ease-out, background 0.25s ease-out;
}

.hero-cta:hover {
  transform: translateY(-2px);
  background: #74d8c4;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 248px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 78px) clamp(18px, 4vw, 40px);
}

.side {
  position: sticky;
  top: 86px;
  align-self: start;
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.side-h {
  margin: 0 0 6px;
  font-size: 1.08rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #4f635c;
}

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

.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 5px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s ease-out, padding-left 0.2s ease-out;
}

.toc a:hover {
  color: #1f7d6c;
  padding-left: 5px;
}

.num {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #6d8078;
  font-variant-numeric: tabular-nums;
}

.body {
  min-width: 0;
}

.prose {
  max-width: 70ch;
  font-size: 17.5px;
}

.prose article {
  scroll-margin-top: 96px;
}

.prose article + article {
  margin-top: 2.7em;
  padding-top: 2.5em;
  border-top: 1px solid var(--line);
}

.prose h2 {
  margin: 0 0 0.62em;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  line-height: 1.24;
  letter-spacing: -0.015em;
}

.prose h3 {
  margin: 1.7em 0 0.5em;
  font-size: 1.18rem;
  line-height: 1.4;
}

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

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

.prose li {
  margin: 0.45em 0;
}

.prose a {
  color: #1f7d6c;
  text-underline-offset: 3px;
}

.prose strong {
  font-weight: 600;
}

.prose img {
  display: block;
  margin: 1.3em 0;
  border-radius: var(--r);
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--mint);
  border-radius: var(--r);
  background: var(--glass);
  color: #2c403a;
}

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

.prose table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 9px 11px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose th {
  background: rgba(212, 196, 168, 0.55);
  font-weight: 600;
}

.foot {
  margin-top: clamp(48px, 8vw, 92px);
  padding: clamp(34px, 6vw, 62px) clamp(18px, 4vw, 40px) 26px;
  background: var(--ink);
  color: var(--sand);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 34px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(212, 196, 168, 0.26);
}

.cta-k {
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 2.9rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f2ece0;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--r);
  background: var(--mint);
  color: #0d1f1b;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: background 0.25s ease-out, transform 0.25s ease-out;
}

.cta-btn:hover {
  background: #74d8c4;
  transform: translateY(-2px);
}

.fnav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  max-width: 1180px;
  margin: 0 auto;
}

.fnav dl {
  margin: 0;
}

.fnav dt {
  margin-bottom: 8px;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: #93aaa3;
}

.fnav dd {
  margin: 0;
}

.fnav dd a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--sand);
  font-size: 16px;
  text-decoration: none;
}

.fnav dd a:hover {
  color: var(--mint);
}

.fmark {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #7f948d;
  font-size: 16px;
}

.copy {
  max-width: 1180px;
  margin: 26px auto 0;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: #8ba09a;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.25, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.25, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

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

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: static;
  }

  .toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }
}

@media (max-width: 820px) {
  .top {
    position: static;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px;
  }

  .brand {
    order: -1;
    margin-bottom: 2px;
  }

  .pillnav {
    justify-content: center;
  }

  .pillnav.right {
    justify-content: center;
  }

  main [id],
  .prose article {
    scroll-margin-top: 24px;
  }

  .hero {
    min-height: 64vh;
    padding-bottom: 92px;
  }

  .hero::after {
    bottom: 62px;
    height: 6px;
  }

  .fnav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 560px) {
  .toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .prose {
    font-size: 17px;
  }

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-btn {
    width: 100%;
    justify-content: center;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pill,
  .hero-cta,
  .cta-btn,
  .toc a {
    transition: none;
  }
}

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