:root {
  color-scheme: light;
  --green-900: #0b4f2d;
  --green-700: #0b6b3a;
  --green-100: #eaf2e8;
  --paper: #fffdf7;
  --white: #ffffff;
  --ink: #172019;
  --muted: #566159;
  --border: #c8d8cc;
  --amber: #a85f00;
  --amber-pale: #fff4dc;
  --shadow: 0 8px 24px rgba(11, 79, 45, 0.08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: 700 14px/1 var(--font); }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 10px 16px; background: var(--green-900); color: var(--white); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #172019; outline-offset: 4px; border-radius: 4px; box-shadow: 0 0 0 7px #ffffff; }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid #dfe9e1; background: rgba(255, 255, 255, 0.96); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--green-900); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--green-900); border-radius: 10px; font-size: 18px; font-weight: 900; }
.brand strong { display: block; font-size: 17px; line-height: 1.2; letter-spacing: .01em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.site-header nav { display: flex; align-items: center; gap: 26px; }
.site-header nav a { color: #273329; font-size: 14px; font-weight: 650; text-decoration: none; }
.site-header nav a:hover { color: var(--green-700); }
.github-link { padding-left: 24px; border-left: 1px solid var(--border); }

.hero { padding: 68px 0 34px; background: var(--paper); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 64px; min-height: 410px; }
.project-label, .section-heading > p, .section-heading > div > p, .author-copy > p:first-child { margin: 0 0 10px; color: var(--green-700); font-size: 13px; font-weight: 800; letter-spacing: .14em; }
.hero h1 { margin: 0; max-width: 680px; color: var(--green-900); font-size: clamp(42px, 5vw, 62px); line-height: 1.16; letter-spacing: -.04em; }
.hero-lead { max-width: 620px; margin: 24px 0 0; font-size: 18px; line-height: 1.75; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid var(--green-700); border-radius: 10px; font-weight: 750; text-decoration: none; }
.button-primary { background: var(--green-700); color: var(--white); }
.button-primary:hover { background: var(--green-900); }
.button-secondary { background: var(--white); color: var(--green-900); }
.hero-note { margin: 20px 0 0; color: var(--muted); font-size: 14px; }
.hero-art { position: relative; height: 340px; }
.paper-stack { position: absolute; border: 2px solid var(--green-900); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.paper-back { inset: 48px 26px 42px 100px; transform: rotate(4deg); background: var(--green-100); }
.paper-front { inset: 36px 82px 48px 30px; padding: 64px 42px 32px; transform: rotate(-2deg); }
.paper-front::before { content: "事实 · 证据 · 选择"; position: absolute; top: 24px; left: 38px; color: var(--green-900); font-size: 17px; font-weight: 800; }
.paper-line { display: block; width: 72%; height: 2px; margin: 22px 0; background: #8daf9a; }
.line-long { width: 92%; }
.line-short { width: 56%; }
.folder-shape { position: absolute; top: 12px; right: 8px; width: 158px; height: 112px; border: 2px solid var(--green-900); border-radius: 8px; background: #dce9d8; transform: rotate(5deg); }
.folder-shape::before { content: ""; position: absolute; top: -20px; left: 12px; width: 72px; height: 24px; border: 2px solid var(--green-900); border-bottom: 0; border-radius: 7px 7px 0 0; background: #dce9d8; }
.pen-shape { position: absolute; z-index: 3; right: 80px; bottom: 54px; width: 18px; height: 150px; border: 2px solid var(--green-900); border-radius: 9px 9px 3px 3px; background: var(--green-700); transform: rotate(28deg); box-shadow: 5px 7px 0 rgba(11, 79, 45, .12); }
.sticky-note { position: absolute; z-index: 4; right: 2px; bottom: 28px; width: 92px; min-height: 78px; display: grid; place-items: center; padding: 10px; border: 1px solid #cf991d; background: #fff1be; color: #634100; text-align: center; font-weight: 800; transform: rotate(5deg); box-shadow: var(--shadow); }
.boundary { display: flex; gap: 18px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--border); }
.boundary strong { flex: 0 0 auto; color: var(--green-900); }
.boundary p { margin: 0; color: var(--muted); }

.urgent-strip { border-bottom: 1px solid #e4b86e; background: var(--amber-pale); color: #583a0d; }
.urgent-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.urgent-grid article { position: relative; padding: 22px 30px 22px 46px; }
.urgent-grid article + article { border-left: 1px solid #e4b86e; }
.urgent-grid article::before { content: "!"; position: absolute; left: 16px; top: 21px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--amber); color: var(--white); font-size: 13px; font-weight: 900; }
.urgent-grid strong { color: #854e05; }
.urgent-grid p { margin: 3px 0 0; font-size: 14px; line-height: 1.55; }

.section { padding: 80px 0; }
.section-heading { margin-bottom: 36px; }
.section-heading h2, .author h2 { margin: 0; color: var(--green-900); font-size: clamp(30px, 3.4vw, 44px); line-height: 1.2; letter-spacing: -.025em; }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 48px; }
.split-heading > p { max-width: 420px; margin: 0 0 4px; color: var(--muted); }
.step-rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; margin: 0; padding: 0; list-style: none; }
.step-rail::before { content: ""; position: absolute; top: 20px; right: 9%; left: 9%; border-top: 1px dashed #8eaf98; }
.step-rail li { position: relative; display: flex; gap: 16px; align-items: flex-start; }
.step-number { position: relative; z-index: 1; flex: 0 0 40px; height: 40px; display: grid; place-items: center; border: 5px solid var(--white); border-radius: 50%; background: var(--green-900); color: var(--white); font-weight: 800; }
.step-rail h3 { margin: 5px 0 6px; color: var(--green-900); font-size: 18px; }
.step-rail p { margin: 0; color: var(--muted); font-size: 14px; }

.scenarios { background: #f7faf7; border-block: 1px solid #e1eae3; }
.scenario-list { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--border); border-radius: 14px; background: var(--white); overflow: hidden; box-shadow: var(--shadow); }
.scenario-list article { min-height: 226px; padding: 24px 20px; }
.scenario-list article + article { border-left: 1px solid var(--border); }
.scenario-list span { color: #72917c; font-size: 13px; font-weight: 800; }
.scenario-list h3 { margin: 30px 0 10px; color: var(--green-900); font-size: 18px; }
.scenario-list p { margin: 0; color: var(--muted); font-size: 14px; }

.example { background: var(--paper); }
.example-layout { display: grid; grid-template-columns: .85fr 2.15fr; gap: 24px; }
.sample-prompt { padding: 28px; border: 1px solid var(--green-900); border-radius: 14px; background: var(--green-900); color: var(--white); }
.sample-prompt span { font-size: 13px; font-weight: 800; letter-spacing: .1em; }
.sample-prompt p { margin: 24px 0 38px; font-size: 17px; }
.sample-prompt small { color: #d8e8dd; }
.answer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.answer-grid article { position: relative; padding: 24px 24px 24px 62px; border: 1px solid var(--border); border-radius: 12px; background: var(--white); }
.answer-grid b { position: absolute; top: 24px; left: 22px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--green-100); color: var(--green-900); }
.answer-grid h3 { margin: 0 0 8px; color: var(--green-900); font-size: 17px; }
.answer-grid p { margin: 0; color: var(--muted); font-size: 14px; }

.trust { background: var(--green-900); color: var(--white); }
.light-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; }
.light-heading > p { grid-column: 1 / -1; color: #b9d5c1; }
.light-heading h2 { color: var(--white); }
.light-heading span { max-width: 340px; color: #d9e8dc; }
.host-privacy-note { max-width: 820px; margin: -14px 0 28px; color: #d9e8dc; }
.trust-rail { display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid #46775a; }
.trust-rail article { padding: 30px 22px; }
.trust-rail article + article { border-left: 1px solid #46775a; }
.trust-rail article > span { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #7daa89; border-radius: 50%; color: #eaf4ec; font-size: 20px; }
.trust-rail h3 { margin: 20px 0 8px; font-size: 17px; }
.trust-rail p { margin: 0; color: #c8ddce; font-size: 14px; }

.install-layout { display: grid; grid-template-columns: 1.45fr .75fr; gap: 24px; }
.codex-card, .adapter-panel { padding: 30px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.codex-card > div:first-child { display: flex; align-items: center; gap: 16px; }
.host-logo { flex: 0 0 52px; height: 52px; display: grid; place-items: center; border: 2px solid var(--green-900); border-radius: 14px; color: var(--green-900); font-size: 24px; font-weight: 900; }
.codex-card h3, .adapter-panel h3 { margin: 0; color: var(--green-900); font-size: 21px; }
.codex-card > div:first-child p, .adapter-panel > p { margin: 4px 0 0; color: var(--muted); }
.command-row { display: flex; align-items: stretch; margin: 24px 0; border: 1px solid #abc3b1; border-radius: 10px; overflow: hidden; background: #f3f8f3; }
.command-row code { min-width: 0; flex: 1; padding: 16px; overflow-wrap: anywhere; color: #123b23; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; }
.command-row button { min-width: 104px; border: 0; border-left: 1px solid #abc3b1; background: var(--green-700); color: var(--white); cursor: pointer; }
.command-row button:hover { background: var(--green-900); }
.codex-card ol { padding-left: 22px; color: #354039; }
.codex-card li + li { margin-top: 8px; }
.install-warning { margin: 22px 0 0; padding: 14px 16px; border-left: 3px solid var(--amber); background: var(--amber-pale); color: #614313; font-size: 14px; }
.adapter-panel ul { margin: 24px 0; padding: 0; border-block: 1px solid var(--border); list-style: none; }
.adapter-panel li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; }
.adapter-panel li + li { border-top: 1px solid #e3ebe5; }
.adapter-panel li span { color: var(--muted); font-size: 13px; }
.adapter-panel a { color: var(--green-700); font-weight: 750; }

.docs { padding-top: 16px; }
.doc-links { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--border); }
.doc-links a { display: flex; flex-direction: column; padding: 24px 22px; text-decoration: none; }
.doc-links a:nth-child(-n + 3) { border-bottom: 1px solid var(--border); }
.doc-links a:not(:nth-child(3n + 1)) { border-left: 1px solid var(--border); }
.doc-links a:hover { background: var(--green-100); }
.doc-links strong { color: var(--green-900); }
.doc-links span { margin-top: 4px; color: var(--muted); font-size: 14px; }

.author { background: var(--green-100); }
.author-layout { display: grid; grid-template-columns: 1fr 380px; align-items: center; gap: 80px; }
.location { display: inline-block; margin: 12px 0 20px; color: var(--green-700); font-weight: 750; }
.author-copy > p:not(:first-child) { max-width: 620px; color: #354139; font-size: 17px; }
.author-copy dl { margin: 26px 0 0; }
.author-copy dl div { display: grid; grid-template-columns: 92px 1fr; padding: 11px 0; border-top: 1px solid #b9ccbd; }
.author-copy dt { color: var(--muted); }
.author-copy dd { margin: 0; font-weight: 700; }
.author-contact { margin: 0; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
.author-image { width: 100%; max-height: 470px; object-fit: contain; background: var(--white); }
.author-contact figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }

.closing-boundary { border-block: 1px solid #e4b86e; background: var(--amber-pale); }
.closing-boundary .shell { display: flex; gap: 24px; padding-block: 24px; }
.closing-boundary strong { flex: 0 0 auto; color: #794802; }
.closing-boundary p { margin: 0; color: #5b421d; }
.site-footer { background: #102218; color: #dce8df; }
.footer-top { display: flex; justify-content: space-between; gap: 48px; padding-block: 40px; }
.footer-top strong { color: var(--white); font-size: 18px; }
.footer-top p { margin: 4px 0 0; color: #aebeb2; font-size: 14px; }
.footer-top nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 22px; max-width: 580px; }
.footer-top nav a { color: #dce8df; font-size: 14px; }
.footer-bottom { display: flex; justify-content: space-between; padding-block: 18px; border-top: 1px solid #34463a; color: #9eb0a3; font-size: 13px; }

@media (max-width: 1024px) {
  .site-header nav { gap: 16px; }
  .hero-grid { gap: 24px; }
  .hero-art { transform: scale(.88); transform-origin: center; }
  .step-rail { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .step-rail::before { display: none; }
  .scenario-list { grid-template-columns: repeat(2, 1fr); }
  .scenario-list article { min-height: 180px; border-bottom: 1px solid var(--border); }
  .scenario-list article + article { border-left: 0; }
  .scenario-list article:nth-child(even) { border-left: 1px solid var(--border); }
  .scenario-list article:last-child { grid-column: 1 / -1; border-bottom: 0; }
  .trust-rail { grid-template-columns: repeat(3, 1fr); }
  .trust-rail article + article { border-left: 0; }
  .trust-rail article:not(:nth-child(3n + 1)) { border-left: 1px solid #46775a; }
  .trust-rail article:nth-child(-n + 3) { border-bottom: 1px solid #46775a; }
  .install-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .shell { width: min(100% - 40px, 1120px); }
  .site-header { position: static; }
  .header-inner { display: block; padding-block: 14px; }
  .brand { width: max-content; }
  .site-header nav { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e3ebe5; gap: 10px 18px; flex-wrap: wrap; }
  .site-header nav a { font-size: 13px; }
  .github-link { padding-left: 0; border-left: 0; }
  .hero { padding-top: 46px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(39px, 12vw, 52px); }
  .hero-lead { font-size: 17px; }
  .hero-actions { flex-direction: column; }
  .button { width: 100%; }
  .hero-art { height: 300px; transform: none; }
  .paper-back { inset: 45px 20px 36px 70px; }
  .paper-front { inset: 35px 60px 44px 4px; padding-inline: 28px; }
  .folder-shape { width: 130px; height: 96px; }
  .pen-shape { right: 60px; }
  .sticky-note { right: -5px; bottom: 20px; }
  .boundary { display: block; margin-top: 20px; }
  .boundary p { margin-top: 6px; }
  .urgent-grid { grid-template-columns: 1fr; }
  .urgent-grid article + article { border-top: 1px solid #e4b86e; border-left: 0; }
  .section { padding: 60px 0; }
  .split-heading, .light-heading { display: block; }
  .split-heading > p, .light-heading span { display: block; margin-top: 16px; }
  .step-rail { grid-template-columns: 1fr; }
  .scenario-list { grid-template-columns: 1fr; }
  .scenario-list article, .scenario-list article:nth-child(even) { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); border-left: 0; }
  .scenario-list article:last-child { grid-column: auto; }
  .scenario-list h3 { margin-top: 16px; }
  .example-layout, .answer-grid { grid-template-columns: 1fr; }
  .trust-rail { grid-template-columns: 1fr; }
  .trust-rail article, .trust-rail article:not(:nth-child(3n + 1)) { border-right: 0; border-bottom: 1px solid #46775a; border-left: 0; }
  .trust-rail article:last-child { border-bottom: 0; }
  .codex-card, .adapter-panel { padding: 22px; }
  .command-row { display: block; }
  .command-row code { display: block; }
  .command-row button { width: 100%; min-height: 46px; border-top: 1px solid #abc3b1; border-left: 0; }
  .doc-links { grid-template-columns: 1fr; }
  .doc-links a, .doc-links a:nth-child(-n + 3), .doc-links a:not(:nth-child(3n + 1)) { border-right: 0; border-bottom: 1px solid var(--border); border-left: 0; }
  .doc-links a:last-child { border-bottom: 0; }
  .author-layout { grid-template-columns: 1fr; gap: 36px; }
  .author-contact { width: 100%; max-width: 420px; margin-inline: auto; }
  .author-image { max-height: none; }
  .closing-boundary .shell, .footer-top, .footer-bottom { display: block; }
  .closing-boundary p { margin-top: 6px; }
  .footer-top nav { justify-content: flex-start; margin-top: 24px; }
  .footer-bottom span { display: block; }
  .footer-bottom span + span { margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
