:root {
  --ink: #001e3c;
  --ink-deep: #00121f;
  --mint: #99ffcc;
  --lime: #00ff41;
  --paper: #f2fffa;
  --dim: rgba(242, 255, 250, 0.74);
  --faint: rgba(242, 255, 250, 0.55);
  --line: rgba(153, 255, 204, 0.22);
  --card: rgba(153, 255, 204, 0.07);
  --radius: 4px;
  --pad: clamp(16px, 5vw, 44px);
  --serif: 'EB Garamond', 'Crimson Text', "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background:
    radial-gradient(62vw 52vh at 10% -6%, rgba(153, 255, 204, 0.24), transparent 62%),
    radial-gradient(52vw 44vh at 94% 8%, rgba(0, 255, 65, 0.16), transparent 60%),
    linear-gradient(168deg, #00355f 0%, var(--ink) 44%, var(--ink-deep) 100%);
  background-attachment: fixed;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.72;
  color: var(--paper);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(62px);
  pointer-events: none;
  opacity: 0.6;
}

body::before {
  width: 46vmax;
  height: 46vmax;
  left: -16vmax;
  top: -12vmax;
  background: radial-gradient(circle at 42% 42%, rgba(153, 255, 204, 0.55), rgba(0, 255, 65, 0.14) 58%, transparent 72%);
  animation: breathe 15s ease-in-out infinite;
}

body::after {
  width: 38vmax;
  height: 38vmax;
  right: -14vmax;
  bottom: -16vmax;
  background: radial-gradient(circle at 58% 58%, rgba(0, 255, 65, 0.34), rgba(153, 255, 204, 0.12) 56%, transparent 70%);
  animation: breathe 21s ease-in-out infinite reverse;
}

@keyframes breathe {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.16) translateY(-2vh); }
}

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

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

/* 顶部细条 */
.ticker {
  background: linear-gradient(90deg, var(--mint) 0%, var(--lime) 58%, rgba(0, 255, 65, 0.25) 100%);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding: 5px 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker span {
  display: block;
  padding-left: var(--pad);
}

/* 页头 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px clamp(10px, 3vw, 26px);
  padding: 9px var(--pad);
  background: rgba(0, 18, 31, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  flex: 0 0 auto;
  color: var(--paper);
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--mint), var(--lime), var(--ink), var(--mint));
  filter: blur(0.4px);
}

.pills {
  display: flex;
  gap: 8px;
  margin-left: auto;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pills::-webkit-scrollbar {
  display: none;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(153, 255, 204, 0.1);
  color: var(--paper);
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

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

/* 主体网格 */
.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px) var(--pad) 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
}

.hero {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  text-align: left;
  padding-bottom: 6px;
}

.hero-title {
  margin: 0;
  font-size: clamp(32px, 6.2vw, 60px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(118deg, #ffffff 8%, var(--mint) 58%, var(--lime) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-figure {
  margin-top: 4px;
}

.hero-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(1.06) contrast(1.02);
  box-shadow: 0 26px 60px -34px rgba(0, 255, 65, 0.55);
}

/* 正文 */
.prose > section {
  scroll-margin-top: 124px;
  padding: clamp(26px, 4vw, 44px) 0;
  border-top: 1px solid var(--line);
}

.prose > section:first-child {
  border-top: 0;
}

.prose > section:target {
  background: rgba(153, 255, 204, 0.05);
  border-radius: var(--radius);
  box-shadow: 0 0 0 12px rgba(153, 255, 204, 0.05);
}

.prose h2,
.prose h3 {
  color: var(--mint);
  line-height: 1.28;
  font-weight: 700;
}

.prose h2 {
  margin: 0 0 0.55em;
  font-size: clamp(24px, 3.4vw, 34px);
}

.prose h3 {
  margin: 1.4em 0 0.45em;
  font-size: clamp(19px, 2.2vw, 24px);
}

.prose small {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--lime);
  margin-bottom: 0.55em;
}

.prose small + h2,
.prose small + h3 {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1.05em;
  color: rgba(242, 255, 250, 0.92);
}

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

.prose li {
  margin-bottom: 0.5em;
}

.prose li::marker {
  color: var(--lime);
}

.prose a {
  text-decoration: underline;
  text-decoration-color: rgba(153, 255, 204, 0.45);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: var(--lime);
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--mint);
  color: var(--dim);
  font-size: 19px;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 1.2em 0;
}

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

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

.prose th {
  color: var(--mint);
}

.prose code {
  font-size: 0.95em;
  background: rgba(153, 255, 204, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
}

/* 侧栏 */
.side {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
}

.side-kicker {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--lime);
}

.side-title {
  margin: 0.15em 0 0.7em;
  font-size: 24px;
  font-weight: 700;
  color: var(--mint);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 2px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(153, 255, 204, 0.13);
}

.side-list a:hover,
.side-list a:focus-visible {
  color: var(--mint);
}

.side-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: 16px;
  padding: 6px 15px;
  border-radius: 999px;
  background: rgba(0, 255, 65, 0.14);
  color: var(--mint);
  font-size: 16px;
  text-decoration: none;
}

.side-top:hover {
  background: var(--lime);
  color: var(--ink);
}

/* 页脚 */
.base {
  padding: clamp(28px, 5vw, 48px) var(--pad) 24px;
  background: linear-gradient(180deg, rgba(0, 18, 31, 0.35), rgba(0, 12, 22, 0.94));
  border-top: 1px solid var(--line);
}

.foot-nav {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 36px);
}

.foot-nav dt {
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--lime);
  margin-bottom: 6px;
}

.foot-nav dd {
  margin: 0;
}

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  color: var(--mint);
}

.copy {
  max-width: 1180px;
  margin: 26px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--faint);
}

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1);
}

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

@media (min-width: 1000px) {
  .shell {
    grid-template-columns: minmax(0, 1fr) 288px;
  }

  .side {
    position: sticky;
    top: 118px;
  }
}

@media (max-width: 720px) {
  .masthead {
    padding: 8px 12px;
  }

  .brand {
    font-size: 18px;
  }

  .pills {
    margin-left: 0;
    width: 100%;
    padding-bottom: 4px;
  }

  .pill {
    padding: 8px 13px;
  }

  .hero {
    min-height: 0;
  }

  .foot-nav {
    gap: 12px;
  }

  .prose table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

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

  body::before,
  body::after {
    animation: none;
  }

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

  .pill:hover,
  .pill:focus-visible {
    transform: none;
  }
}

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