@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: #070807;
  --card: rgba(255, 255, 255, 0.05);
  --edge: rgba(255, 255, 255, 0.11);
  --hair: rgba(255, 255, 255, 0.07);
  --accent: #358a3a;
  --accent-2: #5cbb64;
  --text: #e9eee8;
  --dim: #9ca89c;
  --r: 28px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
}

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

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

body {
  margin: 0;
  font-family: 'Nunito', 'Helvetica Neue', system-ui, -apple-system, 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text);
  background-color: var(--ink);
  background-image: radial-gradient(
      1100px 560px at 88% -8%,
      rgba(53, 138, 58, 0.22),
      transparent 62%
    ),
    radial-gradient(880px 520px at 2% 24%, rgba(53, 138, 58, 0.1), transparent 66%);
  background-repeat: no-repeat;
  letter-spacing: 0.01em;
}

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

a {
  color: var(--accent-2);
  text-underline-offset: 3px;
}

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

h1,
h2,
h3,
h4 {
  font-family: 'Fredoka', 'Nunito', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

div[id] {
  scroll-margin-top: clamp(130px, 24vh, 200px);
}

/* ---------- 顶部两行 ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px var(--gutter) 10px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--hair);
}

.mast-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
}

.brand-name {
  border-bottom: 2px solid rgba(53, 138, 58, 0.6);
  padding-bottom: 2px;
}

.mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--edge);
  background: rgba(53, 138, 58, 0.2);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(53, 138, 58, 0.55);
  background: rgba(53, 138, 58, 0.16);
  color: #d6f0d2;
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.08em;
}

.pill:hover,
.pill:focus-visible {
  background: rgba(53, 138, 58, 0.32);
  color: #fff;
}

.menu {
  max-width: var(--maxw);
  margin: 6px auto 0;
}

.menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
}

.menu a:hover,
.menu a:focus-visible {
  background: rgba(53, 138, 58, 0.2);
  border-color: rgba(53, 138, 58, 0.6);
  color: #fff;
}

/* ---------- 首屏 ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(22px, 4vw, 56px);
  max-width: var(--maxw);
  min-height: 70vh;
  margin: 0 auto;
  padding: clamp(26px, 6vh, 68px) var(--gutter) clamp(28px, 6vh, 60px);
}

.hero-fig {
  margin: 0;
  position: relative;
  will-change: transform;
}

.emblem {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  border-radius: var(--r);
  border: 1px solid var(--edge);
  background: linear-gradient(
    155deg,
    rgba(53, 138, 58, 0.42),
    rgba(255, 255, 255, 0.05) 54%,
    rgba(0, 0, 0, 0.68)
  );
  overflow: hidden;
}

.emblem::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: calc(var(--r) - 12px);
}

.seed {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.72);
  background: radial-gradient(circle at 32% 30%, #8fd995, var(--accent) 62%, #17571d);
  box-shadow: 0 18px 44px rgba(53, 138, 58, 0.45);
}

.hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r);
  border: 1px solid var(--edge);
}

.hero-fig figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  letter-spacing: 0.22em;
  color: var(--dim);
  text-transform: none;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  text-align: right;
}

.badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 999px;
  border: 1px solid rgba(53, 138, 58, 0.5);
  background: rgba(53, 138, 58, 0.18);
  color: #cff0c9;
  font-size: 0.86rem;
  letter-spacing: 0.18em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5.1vw, 3.8rem);
  font-weight: 700;
  text-wrap: balance;
  color: #fff;
}

.standfirst {
  margin: 0;
  max-width: 42ch;
  color: var(--dim);
  font-size: 1.02rem;
  line-height: 1.8;
}

/* ---------- 正文栅格：左栏目录 ---------- */

.grid-wrap {
  display: grid;
  grid-template-columns: minmax(170px, 232px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 52px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 5vw, 56px) var(--gutter) clamp(30px, 6vw, 70px);
  border-top: 1px solid var(--hair);
}

.rail {
  position: sticky;
  top: 138px;
  align-self: start;
  padding: 14px 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--edge);
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rail-h {
  margin: 0 0 10px;
  padding-left: 8px;
  font-size: 0.92rem;
  letter-spacing: 0.22em;
  color: var(--accent-2);
}

.rail-h > span {
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 3px;
}

.rail-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 14px;
  color: var(--dim);
  font-size: 1rem;
  line-height: 1.42;
  text-decoration: none;
}

.rail-nav a:hover,
.rail-nav a:focus-visible,
.rail-nav a[aria-current] {
  color: #fff;
  background: rgba(53, 138, 58, 0.18);
}

.rail-nav a[aria-current] {
  box-shadow: inset 3px 0 0 var(--accent-2);
}

/* ---------- 正文 ---------- */

.sheet {
  min-width: 0;
}

.sheet div {
  padding: 0 0 clamp(26px, 4vw, 44px);
}

.sheet div + div {
  border-top: 1px solid var(--hair);
  padding-top: clamp(24px, 4vw, 40px);
}

.sheet div:last-child {
  padding-bottom: 0;
}

.sheet h2 {
  margin: clamp(6px, 1.6vw, 16px) 0 14px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  color: #fff;
}

.sheet h2 > span {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--accent);
}

.sheet h3 {
  margin: 24px 0 8px;
  font-size: 1.2rem;
  color: #dcebda;
}

.sheet h3 > span {
  display: inline-block;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}

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

.sheet div > p:first-of-type::first-letter {
  float: left;
  margin: 0.06em 0.12em 0 0;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: 3.3em;
  font-weight: 700;
  line-height: 0.82;
  color: var(--accent-2);
}

.sheet ul,
.sheet ol {
  margin: 0 0 1.15em;
  padding-left: 1.35em;
}

.sheet li {
  margin: 0.34em 0;
}

.sheet blockquote {
  margin: 1.6em 0;
  padding: 16px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(53, 138, 58, 0.09);
  color: #e6f3e3;
  font-size: 1.1rem;
}

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

.sheet figure {
  margin: 1.6em 0;
}

.sheet img {
  border-radius: 20px;
}

.sheet figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--dim);
}

.sheet table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 1rem;
}

.sheet th,
.sheet td {
  padding: 10px 12px;
  border: 1px solid var(--edge);
  text-align: left;
  vertical-align: top;
}

.sheet th {
  background: rgba(53, 138, 58, 0.14);
  color: #fff;
}

.sheet code {
  padding: 0.1em 0.36em;
  border-radius: 6px;
  background: rgba(53, 138, 58, 0.16);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.94em;
}

.sheet pre {
  margin: 1.4em 0;
  padding: 14px 16px;
  overflow: auto;
  border: 1px solid var(--edge);
  border-radius: 16px;
  background: #0a0e0a;
}

.sheet pre code {
  background: none;
  padding: 0;
}

.sheet hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--hair);
}

/* ---------- 页脚 ---------- */

.foot {
  margin-top: clamp(34px, 6vw, 80px);
  padding: clamp(24px, 5vw, 52px) var(--gutter) 26px;
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(53, 138, 58, 0.1), transparent 70%);
}

.foot-word {
  max-width: var(--maxw);
  margin: 0 auto 20px;
}

.foot-word h2 {
  margin: 0;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: clamp(2.1rem, 10vw, 5.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: #fff;
}

.foot-word h2 > span {
  background: linear-gradient(100deg, #ffffff 24%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}

.foot-bar p {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 18px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  color: var(--text);
  text-decoration: none;
  font-size: 0.98rem;
}

.to-top:hover,
.to-top:focus-visible {
  border-color: rgba(53, 138, 58, 0.7);
  background: rgba(53, 138, 58, 0.18);
  color: #fff;
}

/* ---------- 动效 ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

.js .sheet div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 0.7, 0.3, 1);
}

.js .sheet div.in {
  opacity: 1;
  transform: none;
}

/* ---------- 宽屏正文分栏 ---------- */

@media (min-width: 1080px) {
  .sheet div {
    column-count: 2;
    column-gap: clamp(24px, 3vw, 44px);
    column-rule: 1px solid var(--hair);
  }

  .sheet h2,
  .sheet h3,
  .sheet blockquote,
  .sheet table,
  .sheet pre,
  .sheet figure {
    column-span: all;
  }

  .sheet figure,
  .sheet table,
  .sheet pre,
  .sheet blockquote {
    break-inside: avoid;
  }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-top: 22px;
  }

  .hero-copy {
    order: -1;
    align-items: flex-start;
    text-align: left;
    gap: 12px;
  }

  .standfirst {
    max-width: none;
  }

  .emblem,
  .hero-img {
    aspect-ratio: 16 / 11;
  }

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

  .sheet {
    order: 1;
  }

  .rail {
    order: 2;
    position: static;
    margin-top: 12px;
  }

  .rail-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .rail-nav a {
    padding: 6px 12px;
    border: 1px solid var(--hair);
    border-radius: 999px;
  }
}

@media (max-width: 430px) {
  .brand {
    font-size: 1rem;
  }

  .menu a {
    padding: 6px 10px;
    font-size: 0.97rem;
  }
}

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

  .js [data-reveal],
  .js .sheet div {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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