/* ==========================================================================
   NGFW One / ngfw.cn — 设计令牌与全站样式（零依赖）
   ========================================================================== */
:root {
  --navy-950: #061428;
  --navy-900: #0b1f3a;
  --navy-800: #12294a;
  --navy-700: #1c3a63;
  --navy-600: #2a4d7e;
  --accent: #19c7a6;
  --accent-600: #0fa88b;
  --accent-700: #0a7d67;
  --accent-50: #e7f9f5;
  --blue: #3b82f6;
  --warn: #f59e0b;
  --danger: #ef4444;
  --ink: #0f172a;
  --text: #334155;
  --muted: #5b6b80;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --logo-tile: #0b1f3a;

  --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px rgba(6, 20, 40, .18);
  --container: 1200px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--accent-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.02em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }
.muted { color: var(--muted); }
.icon { flex: none; vertical-align: middle; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; font-family: inherit; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--navy-950); }
.btn-primary:hover { background: #2ed8b7; }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.12); }
.btn-link { padding: 0; min-height: auto; color: var(--accent-700); background: none; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; height: var(--header-h); gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo.light { color: #fff; --logo-tile: #1b3a66; }
.logo svg { display: block; flex: none; }
.logo-word { height: 19px; width: auto; }
.main-nav { flex: 1; }
.main-nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: 8px; color: var(--text); font-size: 15px; font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit; }
.nav-link:hover, .has-menu.open > .nav-link { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.nav-link .icon { transition: transform .2s; }
.has-menu.open > .nav-link .icon { transform: rotate(180deg); }
.menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; }
.has-menu.open > .menu { opacity: 1; visibility: visible; transform: none; }
.menu a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.menu a:hover { background: var(--bg-soft); text-decoration: none; }
.menu a .icon { color: var(--accent-700); margin-top: 3px; }
.menu strong { display: block; font-weight: 600; font-size: 15px; }
.menu small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.menu .menu-more { color: var(--accent-700); font-size: 14px; align-items: center; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.menu.mega { width: min(1080px, 94vw); left: -260px; padding: 16px; }
.menu.menu-wide { width: min(600px, 92vw); padding: 12px; }
.menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-col { display: flex; flex-direction: column; min-width: 0; }
.menu-heading { margin: 4px 12px 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--accent-700); letter-spacing: .02em; }
.mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mega-col { display: flex; flex-direction: column; min-width: 0; }
.menu a.mega-group { gap: 8px; align-items: center; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; font-size: 13px; font-weight: 600; color: var(--accent-700); letter-spacing: .02em; }
.menu a.mega-group .icon { margin-top: 0; }
.menu a.mega-item { padding: 7px 10px; }
.menu a.mega-item strong { font-size: 14px; font-weight: 500; }
.group-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.group-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 14px; background: #fff; }
.group-chips a:hover { border-color: var(--accent); text-decoration: none; }
.group-chips .icon { color: var(--accent-700); }
.group-card ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.group-card li a { color: var(--text); }
.group-card li a:hover { color: var(--accent-700); }
.product-group-title { display: flex; align-items: center; gap: 8px; margin: 32px 0 16px; font-size: 18px; color: var(--ink); }
.product-group-title:first-of-type { margin-top: 0; }
.product-group-title .icon { color: var(--accent-700); }
.mega-foot { justify-content: center; align-items: center; margin-top: 6px; border-top: 1px solid var(--line); color: var(--accent-700) !important; font-size: 14px; }
.header-actions { display: flex; gap: 10px; }
.header-actions .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: 8px; }

@media (max-width: 1080px) {
  .header-actions .btn-ghost { display: none; }
}
@media (max-width: 960px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav-toggle { display: inline-flex; }
  .header-actions { display: none; }
  .main-nav { position: fixed; inset: var(--header-h) 0 0 0; background: #fff; overflow-y: auto; padding: 12px 16px 120px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; border-top: 1px solid var(--line); }
  body.nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }
  body.nav-open { overflow: hidden; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; height: 52px; justify-content: space-between; font-size: 16px; padding: 0 4px; }
  .nav-link:hover, .has-menu.open > .nav-link { background: none; }
  .menu, .menu.mega, .menu.menu-wide { position: static; width: auto; min-width: 0; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 12px; display: none; }
  .has-menu.open > .menu { display: block; }
  .mega-grid { grid-template-columns: 1fr; gap: 4px; }
  .menu-cols { grid-template-columns: 1fr; gap: 4px; }
  .menu-heading { border-bottom: 0; margin-top: 12px; }
  .menu a.mega-group { border-bottom: 0; margin-bottom: 0; padding-top: 12px; }
  .main-nav::after { content: ""; display: block; height: 1px; }
  .mobile-cta { display: grid !important; gap: 10px; margin-top: 20px; }
}
.mobile-cta { display: none; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section.soft { background: var(--bg-soft); }
.section.dark { background: var(--navy-900); color: #c7d3e6; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { font-size: 18px; color: var(--muted); margin: 0; }
.section.dark .section-head .lead { color: #9fb2cc; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-700); margin-bottom: 12px; }
.dark .eyebrow, .page-hero.dark .eyebrow, .hero .eyebrow { color: var(--accent); }
@media (max-width: 640px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 75% -10%, rgba(25,199,166,.18), transparent 60%), radial-gradient(900px 500px at 0% 110%, rgba(59,130,246,.16), transparent 60%), var(--navy-950); color: #c7d3e6; padding: 88px 0 96px; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 60% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 60% 30%, #000 30%, transparent 75%); pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(36px, 5.4vw, 60px); margin-bottom: 20px; }
.hero h1 .hl { background: linear-gradient(90deg, #19c7a6, #5ee7ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 19px; color: #a9bad3; max-width: 560px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; color: #8ea3c0; font-size: 14px; }
.hero-badges span { display: inline-flex; align-items: center; gap: 6px; }
.hero-badges .icon { color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #c7d3e6; font-size: 14px; margin-bottom: 24px; }
.pill b { background: var(--accent); color: var(--navy-950); border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.pill:hover { text-decoration: none; border-color: rgba(255,255,255,.3); }
@media (max-width: 960px) { .hero .container { grid-template-columns: 1fr; } .hero { padding: 56px 0 64px; } }
@media (max-width: 640px) { .hero .lead { font-size: 17px; } .hero .actions .btn { flex: 1 1 100%; } }

/* Console mockup */
.console { background: #0d1d36; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; box-shadow: 0 40px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(25,199,166,.06); overflow: hidden; font-size: 13px; color: #a9bad3; }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); background: #0b192f; }
.console-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3b57; }
.console-bar span { margin-left: 8px; color: #8193ad; font-size: 12px; }
.console-body { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; padding: 16px; }
.kpi { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 12px; }
.kpi small { display: block; color: #8193ad; font-size: 12px; }
.kpi b { display: block; color: #fff; font-size: 22px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 12px; color: var(--accent); }
.chart { grid-column: span 2; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 12px; }
.chart svg { display: block; width: 100%; height: 110px; }
.events { grid-column: span 1; grid-row: span 2; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 10px; padding: 12px; }
.events ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.events li { display: grid; grid-template-columns: 8px 1fr; gap: 8px; align-items: start; font-size: 12px; line-height: 1.5; }
.events li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; background: var(--warn); }
.events li.ok::before { background: var(--accent); }
.events li.bad::before { background: var(--danger); }
.loopbar { grid-column: span 2; display: flex; gap: 8px; align-items: center; background: rgba(25,199,166,.07); border: 1px solid rgba(25,199,166,.25); border-radius: 10px; padding: 10px 12px; color: #d6f7ef; font-size: 12px; }
.loopbar span { display: inline-flex; align-items: center; gap: 6px; }
.loopbar .icon { color: var(--accent); }
.loopbar .sep { color: #8193ad; }
@media (max-width: 640px) { .console-body { grid-template-columns: 1fr 1fr; } .events { grid-column: span 2; grid-row: auto; } .chart, .loopbar { grid-column: span 2; } .loopbar { flex-wrap: wrap; } }

/* ---------- Trust strip ---------- */
.trust { padding: 40px 0; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-item { display: flex; gap: 14px; align-items: center; }
.trust-item .num { font-size: 32px; font-weight: 700; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.trust-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
@media (max-width: 800px) { .trust-grid { grid-template-columns: 1fr 1fr; } .trust-item { flex-direction: column; align-items: flex-start; gap: 6px; } .trust-item .num { font-size: 28px; } }
.trust-item .num { white-space: nowrap; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid > *, .split > *, .hero .container > *, .hero-split > *, .docs-layout > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-5 .card { padding: 24px 20px; }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1240px) and (min-width: 961px) { .menu.mega { left: -200px; width: min(1000px, 92vw); } }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }
a.card { color: inherit; display: block; }
a.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 12px; background: var(--accent-50); color: var(--accent-700); margin-bottom: 18px; }
.card .more { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; color: var(--accent-700); font-weight: 600; font-size: 14px; }
.section.dark .card { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.1); }
.section.dark .card p { color: #9fb2cc; }
.section.dark .card-icon { background: rgba(25,199,166,.12); color: var(--accent); }

/* Product cards */
.product-card { display: flex; flex-direction: column; padding: 32px; }
.product-card .tag { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); margin-bottom: 16px; }
.product-card.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.product-card.featured .tag { background: var(--accent); color: var(--navy-950); }
.product-card h3 { font-size: 22px; }
.product-card .aud { font-size: 14px; color: var(--muted); margin: 4px 0 16px; }
.product-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; flex: 1; }
.product-card li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; }
.product-card li .icon { color: var(--accent-600); margin-top: 2px; }
.product-card .deliv { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--text); background: #fff; }
.chip .icon { color: var(--accent-700); }

/* ---------- Loop flow ---------- */
.loop-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 16px; align-items: stretch; }
.loop-step { position: relative; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); padding: 32px 28px; transition: border-color .4s, background .4s, box-shadow .4s; }
.loop-step .n { font-family: var(--font-mono); font-size: 13px; color: #8193ad; }
.loop-step h3 { color: #fff; margin: 12px 0 8px; display: flex; align-items: center; gap: 10px; }
.loop-step h3 .icon { color: var(--accent); }
.loop-step p { margin: 0; color: #9fb2cc; font-size: 15px; }
.loop-step ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: #c7d3e6; }
.loop-step li::before { content: "— "; color: var(--accent); }
.loop-step.active { border-color: rgba(25,199,166,.6); background: rgba(25,199,166,.07); box-shadow: 0 0 0 4px rgba(25,199,166,.06); }
.loop-arrow { display: flex; align-items: center; color: #8193ad; }
.loop-arrow .icon { width: 28px; height: 28px; }
.loop-return { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; color: #8ea3c0; font-size: 14px; }
.loop-return .icon { color: var(--accent); }
.loop-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.loop-sources div, .loop-actions div { border: 1px dashed rgba(255,255,255,.18); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: #c7d3e6; display: flex; gap: 10px; align-items: center; }
.loop-sources .icon, .loop-actions .icon { color: var(--accent); }
.loop-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.loop-label { font-size: 12px; letter-spacing: .08em; color: #8193ad; margin: 0 0 8px; text-transform: uppercase; }
@media (max-width: 960px) { .loop-flow { grid-template-columns: 1fr; } .loop-arrow { justify-content: center; transform: rotate(90deg); } .loop-sources, .loop-actions { grid-template-columns: 1fr; } }

/* ---------- AI chat demo ---------- */
.ai-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.chat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.chat-head .icon { color: var(--accent-700); }
.chat-body { padding: 20px; display: grid; gap: 14px; min-height: 340px; align-content: start; }
.msg { max-width: 88%; padding: 12px 14px; border-radius: 14px; font-size: 15px; line-height: 1.6; }
.msg.user { justify-self: end; background: var(--navy-900); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { background: var(--bg-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.bot table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.msg.bot td, .msg.bot th { border-bottom: 1px solid var(--line); padding: 4px 6px; text-align: left; }
.msg .act { display: flex; gap: 8px; margin-top: 10px; }
.msg .act span { font-size: 13px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-strong); background: #fff; }
.msg .act span.ok { background: var(--accent); border-color: var(--accent); color: var(--navy-950); font-weight: 600; }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--accent-700); }
@keyframes blink { 50% { opacity: 0; } }
.ai-tabs { display: grid; gap: 12px; }
.ai-tab { text-align: left; display: flex; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.ai-tab:hover { border-color: var(--line-strong); }
.ai-tab[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.ai-tab .icon { color: var(--accent-700); margin-top: 2px; }
.ai-tab strong { display: block; color: var(--ink); font-size: 16px; }
.ai-tab small { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 2px; }
@media (max-width: 960px) { .ai-demo { grid-template-columns: 1fr; } }

/* ---------- Delivery ---------- */
.delivery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.delivery .card { text-align: center; }
.delivery .card-icon { width: 64px; height: 64px; border-radius: 16px; }
@media (max-width: 800px) { .delivery { grid-template-columns: 1fr; } }

/* ---------- Page hero ---------- */
.page-hero { padding: 64px 0 72px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero.dark { background: radial-gradient(900px 400px at 85% -20%, rgba(25,199,166,.16), transparent 60%), var(--navy-950); color: #a9bad3; border-bottom: 0; }
.page-hero.dark h1 { color: #fff; }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 46px); max-width: 860px; }
.page-hero .lead { font-size: 18px; max-width: 720px; margin: 0; }
.hero-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.hero-side { justify-self: end; width: 100%; }
@media (max-width: 960px) { .hero-split { grid-template-columns: 1fr; } }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; margin-bottom: 20px; color: var(--muted); }
.breadcrumbs a { color: inherit; }
.page-hero.dark .breadcrumbs { color: #8193ad; }

/* ---------- Flow (how it works) ---------- */
.flow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; counter-reset: s; }
.flow li { list-style: none; counter-increment: s; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-weight: 500; color: var(--ink); }
.flow li::before { content: counter(s); display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-50); color: var(--accent-700); font-size: 13px; font-weight: 700; }
.flow li:not(:last-child)::after { content: "→"; margin-left: 14px; color: var(--line-strong); font-weight: 400; }
.flow { padding: 0; margin: 0; }
@media (max-width: 640px) { .flow { flex-direction: column; align-items: stretch; } .flow li:not(:last-child)::after { content: none; } }

/* ---------- Split / feature detail ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.top { align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; }
.checklist .icon { color: var(--accent-600); margin-top: 3px; }
.checklist strong { color: var(--ink); }
.ai-note { display: flex; gap: 16px; padding: 24px; border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-50), #eef5ff); border: 1px solid #cdeee6; }
.ai-note .icon { color: var(--accent-700); }
.ai-note h3 { font-size: 17px; margin-bottom: 4px; }
.ai-note p { margin: 0; }
.edition-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }
.badge.on { background: var(--accent-50); border-color: #bfeee3; color: var(--accent-700); }
.badge.off { color: var(--muted); text-decoration: line-through; }

/* ---------- Tables ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 640px; }
table.data th, table.data td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.data thead th { background: var(--bg-soft); color: var(--ink); font-weight: 650; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .grp td { background: #fafbfd; font-weight: 650; color: var(--ink); font-size: 14px; letter-spacing: .02em; }
table.data td:first-child, table.data th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; }
table.data thead th:first-child { background: var(--bg-soft); }
table.data .grp td:first-child { background: #fafbfd; }
table.data .yes { color: var(--accent-700); }
table.data .no { color: #8494a9; }
table.compare th.col-hl, table.compare td.col-hl { background: #f3fcfa; }
table.compare thead th { vertical-align: bottom; }
table.compare thead th small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
table.compare thead .btn { margin-top: 10px; min-height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- Code ---------- */
.code { position: relative; background: var(--navy-950); color: #d6e2f3; border-radius: var(--radius); padding: 18px 20px; font-size: 14px; line-height: 1.7; overflow-x: auto; }
.code pre { margin: 0; white-space: pre; }
.code .c { color: #8193ad; }
.copy-btn { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #c7d3e6; font-size: 12px; cursor: pointer; font-family: inherit; }
.copy-btn:hover { background: rgba(255,255,255,.12); }
.copy-btn.done { color: var(--accent); border-color: var(--accent); }

/* ---------- Tabs ---------- */
.tabs [role="tablist"] { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs [role="tab"] { display: inline-flex; gap: 8px; align-items: center; padding: 12px 18px; border: 0; background: none; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; min-height: 44px; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs [role="tabpanel"][hidden] { display: none; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field label .req { color: #b42318; margin-left: 2px; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-50); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.consent { display: flex; gap: 10px; font-size: 14px; color: var(--muted); align-items: flex-start; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent-600); }
.hp { position: absolute; left: -9999px; }
.form-msg { display: none; padding: 14px 16px; border-radius: 10px; font-size: 15px; }
.form-msg.ok { display: block; background: var(--accent-50); color: var(--accent-700); border: 1px solid #bfeee3; }
.form-msg.err { display: block; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
@media (max-width: 640px) { .form-card { padding: 24px 20px; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq .ans { padding: 0 22px 18px; color: var(--text); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #c7d3e6; padding: 64px 0; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0; color: #a9bad3; }
.cta-band .actions { margin-top: 0; }

/* ---------- Prose (docs / blog) ---------- */
.prose { color: var(--text); font-size: 16px; line-height: 1.85; max-width: 760px; }
.prose h2 { font-size: 26px; margin: 2em 0 .7em; padding-top: .2em; }
.prose h3 { font-size: 20px; margin: 1.6em 0 .6em; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose table, .prose pre, .prose blockquote, .prose .callout { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; }
.prose li > ul, .prose li > ol { margin: .3em 0; }
.prose code { font-size: .9em; background: #f1f5f9; color: #0f3b5c; padding: .15em .4em; border-radius: 5px; word-break: break-word; }
.prose pre { position: relative; background: var(--navy-950); color: #d6e2f3; padding: 18px 20px; border-radius: var(--radius); overflow-x: auto; font-size: 14px; line-height: 1.7; }
.prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; word-break: normal; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.prose table code { word-break: normal; white-space: nowrap; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 650; white-space: nowrap; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: var(--muted); margin-left: 0; }
.prose .callout { padding: 16px 18px; border-radius: 10px; background: var(--accent-50); border: 1px solid #bfeee3; color: #0d5e50; }
.prose .callout.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.prose .callout > :last-child { margin-bottom: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--radius); }

/* ---------- Docs layout ---------- */
.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px; gap: 48px; padding: 40px 0 96px; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; font-size: 15px; }
.docs-nav h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 20px 0 8px; }
.docs-nav h4:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; padding: 0; margin: 0; }
.docs-nav a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); }
.docs-nav a:hover { background: var(--bg-soft); text-decoration: none; }
.docs-nav a[aria-current="page"] { background: var(--accent-50); color: var(--accent-700); font-weight: 600; }
.docs-search { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; font-size: 14px; margin-bottom: 16px; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: 14px; }
.toc .toc-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 12px; color: var(--muted); margin-left: -1px; border-left: 2px solid transparent; }
.toc a.active { color: var(--accent-700); border-left-color: var(--accent); }
.doc-head h1 { font-size: clamp(28px, 3.6vw, 38px); }
.doc-head .lead { color: var(--muted); font-size: 17px; }
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; max-width: 760px; }
.doc-pager a { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); }
.doc-pager a:hover { border-color: var(--accent); text-decoration: none; }
.doc-pager small { display: block; color: var(--muted); }
.doc-pager .next { text-align: right; grid-column: 2; }
.doc-feedback { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; max-width: 760px; }
.docs-menu-btn { display: none; }
@media (max-width: 1100px) { .docs-layout { grid-template-columns: 220px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 800px) {
  .docs-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .docs-nav { position: static; max-height: none; display: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
  .docs-nav.open { display: block; }
  .docs-menu-btn { display: inline-flex; }
}

/* ---------- Blog ---------- */
.post-card { display: flex; flex-direction: column; }
.post-card .meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; margin-bottom: 10px; }
.post-card h3 { font-size: 19px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.tags span { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--bg-soft); color: var(--muted); }
.article { padding: 56px 0 96px; }
.article .prose { margin: 0 auto; }
.article-head { max-width: 760px; margin: 0 auto 40px; }
.article-head .meta { color: var(--muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Misc ---------- */
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 20px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }
.notice { padding: 14px 18px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 14px; }
.stat-list { display: grid; gap: 16px; }
.empty { text-align: center; padding: 48px 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); }
.logo-wall { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.logo-wall div { height: 72px; border: 1px dashed var(--line-strong); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 13px; }
@media (max-width: 800px) { .logo-wall { grid-template-columns: repeat(3, 1fr); } }
.not-found { text-align: center; padding: 120px 0; }
.not-found .code-404 { font-size: 96px; font-weight: 800; color: var(--accent); line-height: 1; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #8ea3c0; padding: 64px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; padding-bottom: 48px; }
.site-footer h3 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #8ea3c0; }
.site-footer a:hover { color: #fff; }
.footer-slogan { color: #fff; font-size: 16px; margin: 16px 0 2px; }
.footer-contact { margin-top: 20px !important; }
.footer-contact li { display: flex; gap: 8px; align-items: center; }
.qr { margin: 16px 0 0; }
.qr img { border-radius: 8px; background: #fff; padding: 4px; }
.qr figcaption { font-size: 12px; margin-top: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.beian { display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }
.flow.vertical { flex-direction: column; align-items: stretch; }
.flow.vertical li::after { content: none; }

/* ---------- API 在线调试 ---------- */
.ac-settings { display: grid; grid-template-columns: auto 1fr 1fr; gap: 16px 24px; align-items: end; margin-bottom: 24px; }
.ac-settings .field { margin: 0; }
.ac-mode { border: 0; margin: 0; padding: 0; display: flex; gap: 16px; }
.ac-mode legend { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding: 0; }
.ac-mode label { display: flex; gap: 6px; align-items: baseline; font-size: 15px; color: var(--ink); cursor: pointer; }
.ac-mode small { color: var(--muted); font-size: 12px; margin-left: 2px; }
.ac-privacy { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.ac-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.ac-main, .ac-settings > * { min-width: 0; }
.ac-line code { word-break: break-all; }
.ac-list { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; background: #fff; }
.ac-tag { margin: 12px 8px 4px; font-size: 12px; font-weight: 600; color: var(--accent-700); letter-spacing: .04em; }
.ac-tag:first-child { margin-top: 4px; }
.ac-op { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; padding: 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-family: inherit; }
.ac-op:hover, .ac-op[aria-current="true"] { background: var(--bg-soft); }
.ac-op-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-op-text code { font-size: 13px; color: var(--ink); word-break: break-all; background: none; padding: 0; }
.ac-op-text small { font-size: 12px; color: var(--muted); }
.ac-m { flex: none; display: inline-block; min-width: 52px; text-align: center; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ac-get { background: #e6f7f3; color: #0b7a64; }
.ac-post { background: #e8f0fe; color: #1d4ed8; }
.ac-put { background: #fff4e0; color: #a15c00; }
.ac-delete { background: #fdecec; color: #b42318; }
.ac-line { display: flex; gap: 10px; align-items: center; font-size: 16px; }
.ac-main h3 { display: flex; align-items: center; gap: 12px; font-size: 17px; margin: 28px 0 10px; }
.ac-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; }
.ac-params .field { margin: 0; }
#ac-body { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; padding: 12px; border: 1px solid var(--line); border-radius: 10px; resize: vertical; }
.ac-status { font-size: 14px; font-weight: 600; }
.ac-status.ok { color: #0b7a64; }
.ac-status.bad { color: #b42318; }
#ac-response { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 960px) {
  .ac-settings { grid-template-columns: 1fr; }
  .ac-mode { flex-direction: column; gap: 8px; }
  .ac-layout { grid-template-columns: minmax(0, 1fr); }
  .ac-mode label { flex-wrap: wrap; }
  .ac-list { position: static; max-height: 320px; }
}

/* 深色底上的弱化文字（页脚等）需满足 4.5:1 对比度 */
.site-footer .muted { color: #8a9bb3; }

/* 首页首屏以下的区块延迟渲染，降低首次布局开销（不支持的浏览器自动忽略） */
.cv { content-visibility: auto; contain-intrinsic-size: auto 900px; }

/* 首页「独立产品」条 */
.standalone-strip { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 12px; align-items: center; margin-top: 24px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.standalone-strip a { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 8px; color: var(--ink); }
.standalone-strip a:hover { background: #fff; text-decoration: none; }
.standalone-strip strong { font-size: 15px; }
.standalone-strip small { color: var(--muted); font-size: 13px; }
@media (max-width: 960px) { .standalone-strip { grid-template-columns: 1fr; } }

/* 规格表：表头不换行，首列为型号 */
table.data.spec { font-size: 14px; min-width: 960px; }
table.data.spec th, table.data.spec td { padding: 12px 14px; }
table.data.spec thead th { white-space: nowrap; }
table.data.spec tbody th { font-weight: 650; color: var(--ink); white-space: nowrap; background: #fff; }
.split table.data.spec { min-width: 0; }
