:root {
  --ink: #19231f;
  --muted: #68736e;
  --paper: #f5f6f1;
  --surface: #ffffff;
  --line: #dfe4dd;
  --accent: #0b7957;
  --accent-dark: #075d43;
  --accent-soft: #dff2e9;
  --code: #15231e;
  --shadow: 0 24px 60px rgba(31, 47, 39, 0.1);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.shell { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -60px; left: 20px; z-index: 99; padding: 10px 16px; color: white; background: var(--accent); border-radius: 10px; }
.skip-link:focus { top: 20px; }

.site-header {
  width: min(1280px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .04em; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: white; background: var(--accent); border-radius: 13px; font-family: ui-monospace, monospace; font-size: 14px; box-shadow: 0 8px 18px rgba(11, 121, 87, .22); }
.site-nav { display: flex; gap: 34px; font-size: 14px; color: var(--muted); }
.site-nav a { position: relative; padding: 28px 0 25px; }
.site-nav a:hover, .site-nav a.active { color: var(--ink); }
.site-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }

.hero { min-height: 650px; padding: 92px 0 86px; display: grid; grid-template-columns: 1.04fr .96fr; gap: 88px; align-items: center; }
.eyebrow { margin: 0 0 18px; display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { width: 28px; height: 2px; background: currentColor; }
.hero h1 { max-width: 660px; margin: 0; font-size: clamp(44px, 5.4vw, 74px); line-height: 1.13; letter-spacing: -.055em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-intro { max-width: 590px; margin: 28px 0 0; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid transparent; border-radius: 14px; font-size: 14px; font-weight: 700; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--accent); box-shadow: 0 12px 28px rgba(11, 121, 87, .22); }
.button.primary:hover { background: var(--accent-dark); }
.button.ghost { border-color: var(--line); background: rgba(255,255,255,.58); }

.code-card { overflow: hidden; color: #d9e8e0; background: var(--code); border: 1px solid rgba(255,255,255,.08); border-radius: 26px; box-shadow: var(--shadow); transform: rotate(1deg); }
.code-toolbar { height: 58px; padding: 0 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: #92a79c; border-bottom: 1px solid rgba(255,255,255,.08); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 8px; height: 8px; background: #56655e; border-radius: 50%; }
.code-status { justify-self: end; color: #81d7b3; }
.code-card pre { margin: 0; padding: 30px 25px 26px; overflow-x: auto; font: 14px/1.9 ui-monospace, SFMono-Regular, Consolas, monospace; }
.line { display: block; white-space: pre; }
.line b { display: inline-block; width: 34px; color: #53655c; font-weight: 400; user-select: none; }
.kw { color: #cb9cff; }
.type { color: #76d5ff; }
.str { color: #a9db93; }
.code-result { padding: 15px 24px; color: #aac0b5; background: rgba(0,0,0,.14); border-top: 1px solid rgba(255,255,255,.07); font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-result span { margin-right: 8px; color: #62d9a7; }

.section { padding: 90px 0; }
.section-heading { margin-bottom: 36px; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading h2, .about-section h2 { margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.2; letter-spacing: -.04em; }
.section-heading.compact > p { max-width: 390px; margin: 0 0 4px; color: var(--muted); }
.search-box { width: min(280px, 100%); height: 46px; padding: 0 15px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box span { color: var(--muted); font-size: 20px; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #9ba49f; }

.note-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.note-card { min-height: 286px; padding: 30px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.note-card:hover { transform: translateY(-5px); border-color: #c5d7cd; box-shadow: 0 18px 42px rgba(34, 57, 46, .08); }
.note-card.featured { background: linear-gradient(135deg, #fbfffd 0%, #e9f6ef 100%); border-color: #cbe3d7; }
.note-meta { display: flex; align-items: center; justify-content: space-between; color: #919b96; font-size: 12px; }
.tag { padding: 5px 10px; border-radius: 999px; font-weight: 800; }
.tag.indigo { color: #5748a6; background: #ece9ff; }
.tag.green { color: #08704f; background: #dcf4e9; }
.tag.amber { color: #8a5b0a; background: #fff0ce; }
.tag.rose { color: #a44655; background: #ffe7eb; }
.note-card h3 { max-width: 510px; margin: 23px 0 12px; font-size: 24px; line-height: 1.4; letter-spacing: -.025em; }
.note-card p { margin: 0; color: var(--muted); font-size: 14px; }
.note-link { margin-top: auto; padding-top: 24px; color: var(--accent); font-size: 13px; font-weight: 800; }
.note-link span { display: inline-block; margin-left: 5px; transition: transform .2s ease; }
.note-card:hover .note-link span { transform: translateX(5px); }
.empty-state { padding: 42px; color: var(--muted); text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

.roadmap { margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; list-style: none; }
.roadmap li { min-height: 240px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; background: rgba(255,255,255,.52); border-right: 1px solid var(--line); }
.roadmap li:last-child { border-right: 0; }
.roadmap li > span { color: var(--accent); font: 700 12px ui-monospace, monospace; }
.roadmap h3 { margin: 0 0 8px; font-size: 18px; }
.roadmap p { margin: 0; color: var(--muted); font-size: 13px; }

.about-section { margin-top: 60px; padding: 96px 0; color: white; background: var(--ink); }
.about-inner { max-width: 820px; margin-inline: auto; text-align: center; }
.eyebrow.light { justify-content: center; color: #7ed5ae; }
.about-section p:last-child { max-width: 680px; margin: 24px auto 0; color: #b9c5bf; }
.site-footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }
.icp-link { text-decoration: underline; text-decoration-color: #aeb8b2; text-underline-offset: 4px; }
.icp-link:hover { color: var(--accent); text-decoration-color: currentColor; }

.article-header { padding: 76px 0 44px; border-bottom: 1px solid var(--line); }
.article-header .tag { display: inline-block; }
.article-header h1 { max-width: 850px; margin: 22px 0 18px; font-size: clamp(38px, 5.5vw, 64px); line-height: 1.18; letter-spacing: -.05em; }
.article-lead { max-width: 720px; margin: 0; color: var(--muted); font-size: 18px; }
.article-meta { margin-top: 24px; color: #8b9590; font-size: 13px; }
.article-layout { padding: 64px 0 100px; display: grid; grid-template-columns: minmax(0, 760px) 230px; gap: 90px; justify-content: space-between; }
.article-content h2 { margin: 54px 0 16px; font-size: 30px; letter-spacing: -.03em; }
.article-content h2:first-child { margin-top: 0; }
.article-content h3 { margin: 34px 0 12px; font-size: 20px; }
.article-content p, .article-content li { color: #4f5d56; }
.article-content ul { padding-left: 22px; }
.article-content code { padding: 2px 6px; color: #176348; background: #e4f1ea; border-radius: 6px; font: .9em ui-monospace, monospace; }
.article-content pre { margin: 24px 0; padding: 22px; overflow-x: auto; color: #d9e8e0; background: var(--code); border-radius: 18px; font: 13px/1.8 ui-monospace, monospace; }
.callout { margin: 28px 0; padding: 20px 22px; background: #e8f4ed; border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; }
.callout strong { display: block; margin-bottom: 4px; }
.callout p { margin: 0; }
.article-nav { position: sticky; top: 24px; align-self: start; padding: 20px; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 16px; }
.article-nav strong { display: block; margin-bottom: 10px; font-size: 13px; }
.article-nav a { display: block; padding: 6px 0; color: var(--muted); font-size: 13px; }
.article-nav a:hover { color: var(--accent); }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; font-weight: 800; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 55px; padding-top: 70px; }
  .code-card { max-width: 620px; transform: none; }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .roadmap li:nth-child(2) { border-right: 0; }
  .roadmap li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-nav { display: none; }
}

@media (max-width: 640px) {
  .shell, .site-header { width: min(100% - 32px, 1160px); }
  .site-header { min-height: 70px; }
  .site-nav { gap: 16px; }
  .site-nav a { padding: 23px 0 20px; font-size: 12px; }
  .site-nav a:last-child { display: none; }
  .brand span:last-child { font-size: 14px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { min-height: 0; padding: 64px 0; }
  .hero h1 { font-size: 43px; }
  .hero-intro { font-size: 15px; }
  .code-card pre { padding: 22px 16px; font-size: 12px; }
  .section { padding: 66px 0; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search-box { width: 100%; }
  .note-grid { grid-template-columns: 1fr; }
  .note-card { min-height: 260px; padding: 24px; }
  .roadmap { grid-template-columns: 1fr; }
  .roadmap li { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--line); }
  .roadmap li:last-child { border-bottom: 0; }
  .about-section { margin-top: 20px; padding: 72px 0; }
  .site-footer { padding: 25px 0; align-items: flex-start; flex-direction: column; justify-content: center; }
  .article-header { padding-top: 56px; }
  .article-layout { padding-top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
