:root {
  --bg: #0b1015;
  --bg-soft: #111820;
  --panel: #151e27;
  --panel-raised: #1b2731;
  --line: #2a3945;
  --line-strong: #3c5361;
  --ink: #eef5f1;
  --muted: #9aaeb7;
  --accent: #8ce6ac;
  --accent-strong: #2fd16f;
  --accent-ink: #0a2417;
  --warm: #f6c97c;
  --shadow: 0 24px 70px rgba(0, 0, 0, .24);
  --radius: 10px;
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: var(--shell); margin: 0 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: 10px; left: 10px; z-index: 50;
  transform: translateY(-150%); padding: 10px 14px; background: var(--accent);
  color: var(--accent-ink); border-radius: 6px; font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky; top: 0; z-index: 30; background: rgba(11, 16, 21, .92);
  border-bottom: 1px solid rgba(60, 83, 97, .55); backdrop-filter: blur(18px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; font-size: 13px; }
.brand-dot { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 14px; }
.site-nav a { transition: color .2s ease; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-help { color: var(--accent); }
.menu-toggle { display: none; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); padding: 8px 12px; border-radius: 6px; cursor: pointer; }

.hero-section { padding: 92px 0 76px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(370px, .98fr); align-items: center; gap: 76px; }
.eyebrow {
  margin: 0 0 18px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.status-led { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 0 4px rgba(47, 209, 111, .12); vertical-align: 1px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
h1 { max-width: 700px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(38px, 6.2vw, 74px); line-height: 1.08; font-weight: 600; }
h1 span { color: var(--accent); }
.hero-lede { max-width: 600px; margin: 26px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 18px; border-radius: 7px; font-weight: 700; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: #b0f2c4; }
.button-quiet { border: 1px solid var(--line-strong); color: var(--ink); }
.button-quiet:hover { border-color: var(--accent); color: var(--accent); }
.button-dark { background: var(--bg); color: var(--accent); }
.hero-note { margin: 24px 0 0; color: var(--muted); font-size: 13px; }
.hero-note strong { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; }

.terminal-card { background: #111a21; border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); transform: rotate(1.2deg); }
.terminal-topbar { display: flex; justify-content: space-between; gap: 16px; padding: 14px 17px; border-bottom: 1px solid var(--line); color: var(--muted); font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.terminal-state { color: var(--accent); }
.terminal-body { padding: 27px 24px 25px; }
.terminal-comment { margin: 0 0 8px; color: #6f8c91; font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.command-line { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 52px; padding: 0 0 0 13px; border-left: 2px solid var(--accent-strong); background: rgba(47, 209, 111, .045); }
.command-line code { overflow-x: auto; color: #f1f7f3; font: 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
.copy-button { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.copy-button:hover, .copy-button.is-copied { border-color: var(--accent); color: var(--accent); }
.command-line-last { margin-bottom: 22px; }
.terminal-output { margin: 0; color: var(--muted); font-size: 13px; }
.terminal-output span { color: var(--accent); }

.screenshot-section { background: #10181f; }
.screenshot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.screenshot-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #0b1116; }
.screenshot-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 979; object-fit: cover; }
.screenshot-card-wide { grid-column: 1 / -1; }
.screenshot-card-wide img { aspect-ratio: 1898 / 1190; object-fit: contain; background: #0b1116; }
.screenshot-card figcaption { display: flex; justify-content: space-between; gap: 18px; padding: 14px 16px 15px; color: var(--muted); font-size: 13px; }
.screenshot-card figcaption strong { color: var(--ink); font-weight: 600; }
.screenshot-source { margin: 22px 0 0; color: var(--muted); font-size: 13px; }
.screenshot-source a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(140, 230, 172, .4); text-underline-offset: 3px; }

.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0e151b; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 20px 24px; border-right: 1px solid var(--line); }
.trust-grid > div:first-child { padding-left: 0; }
.trust-grid > div:last-child { border-right: 0; }
.trust-label { color: #6e858d; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .1em; }
.trust-grid strong { font-weight: 500; color: var(--ink); }

.section { padding: 106px 0; }
.workflow-section { background: #0d141a; }
.section-heading { margin-bottom: 42px; }
.split-heading { display: grid; grid-template-columns: minmax(0, .8fr) minmax(240px, .4fr); align-items: end; gap: 40px; }
.section-heading h2 { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(28px, 4vw, 48px); line-height: 1.12; font-weight: 600; }
.section-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.8; }
.path-layout { display: grid; grid-template-columns: 1.2fr .9fr .9fr; gap: 14px; }
.path-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 250px; padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.path-card:hover { border-color: var(--accent); background: var(--panel-raised); transform: translateY(-3px); }
.path-card-featured { min-height: 300px; background: #14271e; border-color: #37684b; }
.path-index { color: var(--accent); font: 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.path-card h3 { margin: 28px 0 12px; font-size: 23px; }
.path-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.text-link, .article-arrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; color: var(--accent); font-size: 13px; font-weight: 700; }

.guides-section { background: var(--bg); }
.guide-search { position: relative; width: min(430px, 100%); margin-top: 24px; }
.guide-search input { width: 100%; height: 48px; padding: 0 42px 0 16px; border: 1px solid var(--line-strong); border-radius: 7px; background: #101820; color: var(--ink); outline: none; }
.guide-search input::placeholder { color: #71848d; }
.guide-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140, 230, 172, .14); }
.search-key { position: absolute; top: 10px; right: 12px; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.article-card { display: flex; flex-direction: column; min-height: 280px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #111920; transition: border-color .2s ease, transform .2s ease; }
.article-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.article-card-large { grid-column: span 2; background: #162a22; border-color: #315742; }
.article-meta { display: flex; justify-content: space-between; gap: 16px; color: #789199; font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; }
.article-card h3 { margin-top: 40px; font-size: 23px; line-height: 1.28; }
.article-card h3 a:hover { color: var(--accent); }
.article-card p { margin: 12px 0 0; color: var(--muted); line-height: 1.65; }
.article-arrow { margin-top: auto; }
.empty-search { color: var(--muted); }

.faq-section { background: #0d141a; }
.faq-grid { display: grid; grid-template-columns: .72fr 1fr; gap: 72px; align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; color: var(--ink); font-weight: 600; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font: 20px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
details[open] summary::after { content: "−"; }
details p { max-width: 650px; margin: -5px 0 23px; color: var(--muted); }

.help-section { padding: 74px 0; background: var(--accent); color: var(--accent-ink); }
.help-inner { display: flex; align-items: center; justify-content: space-between; gap: 44px; }
.help-inner .eyebrow { color: #15572f; }
.help-inner h2 { max-width: 680px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(27px, 4vw, 45px); line-height: 1.15; }
.help-inner p:last-child { max-width: 690px; margin-bottom: 0; color: #245a3c; }
.help-inner strong { color: #0c3920; }

.site-footer { padding: 46px 0; border-top: 1px solid var(--line); background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.2fr .9fr .7fr; gap: 40px; }
.footer-brand { margin-bottom: 14px; }
.footer-grid p, .footer-note { margin: 0; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--accent); }
.footer-note { display: flex; flex-direction: column; gap: 6px; text-align: right; }

/* Article pages */
.article-shell { width: min(980px, calc(100% - 40px)); margin: 0 auto; }
.article-header { padding: 80px 0 44px; border-bottom: 1px solid var(--line); }
.article-header h1 { max-width: 850px; font-size: clamp(36px, 6vw, 64px); }
.article-summary { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: 18px; line-height: 1.8; }
.article-meta-line { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; color: #789199; font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 235px; gap: 60px; padding: 54px 0 100px; }
.article-content { min-width: 0; }
.article-content h2 { margin: 48px 0 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 28px; line-height: 1.3; }
.article-content h3 { margin: 30px 0 10px; font-size: 20px; }
.article-content p { margin: 0 0 18px; color: #c2d0d2; line-height: 1.9; }
.article-content ul, .article-content ol { margin: 0 0 22px; padding-left: 22px; color: #c2d0d2; }
.article-content li { margin: 8px 0; padding-left: 5px; }
.article-content strong { color: var(--ink); }
.article-content a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(140, 230, 172, .4); text-underline-offset: 3px; }
.article-content code { padding: 3px 6px; border-radius: 4px; background: #18242b; color: var(--accent); font: .88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-block { position: relative; margin: 22px 0 26px; padding: 21px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #0b1116; }
.code-block code { display: block; padding: 0; background: transparent; color: #e5f0e9; font: 14px/1.85 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.article-callout { margin: 28px 0; padding: 21px 22px; border-left: 3px solid var(--accent); background: #14221c; color: #cce7d4; }
.article-callout p { margin: 0; color: inherit; }
.article-aside { position: sticky; top: 100px; align-self: start; padding-top: 5px; }
.aside-label { margin: 0 0 14px; color: var(--accent); font: 11px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .1em; }
.article-aside nav { display: flex; flex-direction: column; gap: 9px; border-left: 1px solid var(--line); padding-left: 16px; }
.article-aside nav a { color: var(--muted); font-size: 13px; }
.article-aside nav a:hover { color: var(--accent); }
.source-list { margin-top: 52px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.source-list h2 { margin-top: 0; font-size: 18px; }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .terminal-card { max-width: 680px; transform: none; }
  .path-layout { grid-template-columns: 1fr 1fr; }
  .path-card-featured { grid-column: span 2; min-height: 250px; }
  .article-grid { grid-template-columns: 1fr 1fr; }
  .article-card-large { grid-column: span 2; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; order: -1; }
  .article-aside nav { flex-direction: row; flex-wrap: wrap; border-left: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; }
}

@media (max-width: 680px) {
  :root { --shell: min(100% - 28px, 1180px); }
  .header-inner { min-height: 64px; }
  .menu-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 64px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 14px 16px; background: #0b1015; border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 0; }
  .hero-section { padding: 62px 0 58px; }
  .hero-lede { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid > div, .trust-grid > div:first-child { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-grid > div:last-child { border-bottom: 0; }
  .section { padding: 74px 0; }
  .split-heading { display: block; }
  .split-heading > p:last-child { margin-top: 22px; }
  .path-layout, .article-grid { grid-template-columns: 1fr; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .screenshot-card-wide { grid-column: auto; }
  .screenshot-card figcaption { align-items: flex-start; flex-direction: column; gap: 2px; }
  .path-card, .path-card-featured, .article-card { grid-column: auto; min-height: 230px; }
  .article-card-large { grid-column: auto; }
  .article-card h3 { margin-top: 30px; }
  .help-inner { align-items: stretch; flex-direction: column; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-note { text-align: left; }
  .article-header { padding: 56px 0 34px; }
  .article-summary { font-size: 16px; }
  .article-layout { padding: 38px 0 70px; }
  .article-content h2 { margin-top: 38px; font-size: 24px; }
  .code-block { padding: 16px; }
}

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