@charset "UTF-8";

:root {
  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-soft: #edf0e9;
  --ink: #14211b;
  --ink-soft: #526159;
  --muted: #7c8881;
  --line: #dce2da;
  --line-strong: #c9d1c7;
  --green: #20c875;
  --green-dark: #0b7d48;
  --green-soft: #ddf8e9;
  --night: #10251c;
  --night-deep: #091810;
  --danger: #bc453e;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 8px 24px rgba(24, 45, 33, .05);
  --shadow-lg: 0 24px 70px rgba(24, 45, 33, .12);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font-sans: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { display: flex; flex-direction: column; margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--bg); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
::selection { color: var(--night-deep); background: #9cf0c2; }
:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; z-index: 600; top: 12px; left: 12px; padding: 10px 16px; border-radius: 8px; color: white; background: var(--night); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.page-texture { position: fixed; z-index: -1; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(20, 33, 27, .022) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 33, 27, .022) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 72%); }

.site-header { position: sticky; z-index: 200; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 72px; padding: 12px clamp(24px, 4vw, 64px); border-bottom: 1px solid rgba(201, 209, 199, .75); background: rgba(244, 246, 241, .88); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; width: max-content; }
.brand-logo { display: block; width: auto; height: auto; }
.main-nav { display: flex; flex-shrink: 0; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.68); }
.nav-link { position: relative; display: flex; flex-shrink: 0; align-items: center; gap: 7px; min-height: 40px; padding: 0 18px; border-radius: 10px; color: var(--ink-soft); font-size: 14px; font-weight: 550; white-space: nowrap; transition: color 150ms, background 150ms, transform 150ms; }
.nav-link svg { width: 16px; height: 16px; }
.nav-link:hover { color: var(--ink); background: var(--surface-soft); }
.nav-link:active { transform: scale(.98); }
.nav-link.is-active { color: #f4fff8; background: var(--night); box-shadow: 0 4px 12px rgba(9,24,16,.14); }
.nav-link.is-active svg { color: var(--green); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.live-label i, .composer-meta i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(32,200,117,.12); }
.new-chat-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: 13px; font-weight: 650; transition: transform 180ms var(--ease-out), border-color 180ms, box-shadow 180ms; }
.new-chat-button svg { width: 17px; height: 17px; }
.new-chat-button:hover { border-color: var(--green-dark); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.new-chat-button:active { transform: translateY(0); }

main { width: min(1408px, calc(100% - clamp(32px, 7vw, 112px))); margin: 0 auto 24px; }
.view { padding: clamp(40px, 5vw, 72px) 0 48px; animation: view-enter 480ms var(--ease-out) both; }
@keyframes view-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.welcome-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); align-items: center; gap: clamp(48px, 7vw, 108px); min-height: 410px; }
.hero-copy { padding: 16px 0; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--green-dark); font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 1.6px; }
.eyebrow i { width: 42px; height: 1px; background: var(--line-strong); }
.eyebrow span:last-child { color: var(--muted); font-weight: 500; letter-spacing: .8px; }
h1, h2, h3, p { margin-top: 0; }
.hero-copy h1 { max-width: 760px; margin: 25px 0 24px; font-size: clamp(42px, 4.6vw, 68px); font-weight: 760; line-height: 1.13; letter-spacing: -3.6px; }
.hero-copy h1 span { position: relative; z-index: 0; color: var(--green-dark); }
.hero-copy h1 span::after { position: absolute; z-index: -1; right: 0; bottom: 2px; left: 0; height: 12px; content: ""; background: rgba(32,200,117,.17); transform: rotate(-1deg); }
.hero-description { max-width: 650px; margin-bottom: 28px; color: var(--ink-soft); font-size: 16px; line-height: 1.9; }
.domain-row { display: flex; flex-wrap: wrap; gap: 8px; }
.domain-row button { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: rgba(255,255,255,.55); font-family: var(--font-mono); font-size: 12px; transition: color 150ms, border-color 150ms, background 150ms, transform 150ms; }
.domain-row button:hover { color: var(--night); border-color: var(--green); background: var(--green-soft); transform: translateY(-2px); }

.ai-visual { position: relative; min-height: 408px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); color: #e9fff2; background-color: var(--night); background-image: linear-gradient(rgba(128,255,181,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(128,255,181,.045) 1px, transparent 1px); background-size: 28px 28px; box-shadow: 0 28px 70px rgba(16,37,28,.18); }
.ai-visual::after { position: absolute; top: -100px; right: -80px; width: 280px; height: 280px; border-radius: 50%; content: ""; background: rgba(32,200,117,.17); filter: blur(60px); pointer-events: none; }
.visual-topline { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid rgba(210,255,229,.12); color: #a5b9ae; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; }
.live-label { display: inline-flex; align-items: center; gap: 7px; color: var(--green); }
.orbit-scene { position: relative; height: 266px; }
.orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(156,240,194,.18); border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-outer { width: 252px; height: 252px; animation: orbit-spin 24s linear infinite; }
.orbit-inner { width: 168px; height: 168px; border-style: dashed; animation: orbit-spin-reverse 18s linear infinite; }
@keyframes orbit-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes orbit-spin-reverse { to { transform: translate(-50%, -50%) rotate(-360deg); } }
.orbit-node { position: absolute; width: 7px; height: 7px; border: 1px solid #a5f7c8; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px var(--green); }
.node-one { top: 26px; left: 35px; }
.node-two { right: -4px; top: 50%; }
.node-three { bottom: 12px; left: 30px; }
.core { position: absolute; z-index: 2; top: 50%; left: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 124px; height: 124px; border: 1px solid rgba(156,240,194,.35); border-radius: 50%; background: #143a29; box-shadow: 0 0 0 12px rgba(32,200,117,.035), 0 0 50px rgba(32,200,117,.13); transform: translate(-50%, -50%); }
.core svg { width: 24px; height: 24px; margin-bottom: 7px; color: var(--green); }
.core strong { font-size: 19px; letter-spacing: .5px; }
.core span { margin-top: 4px; color: #8aa596; font-family: var(--font-mono); font-size: 8px; letter-spacing: 1.4px; }
.orbit-label { position: absolute; z-index: 3; padding: 5px 9px; border: 1px solid rgba(156,240,194,.18); border-radius: 6px; color: #c0d5c8; background: rgba(9,24,16,.85); font-family: var(--font-mono); font-size: 10px; box-shadow: 0 5px 15px rgba(0,0,0,.12); }
.label-mysql { top: 34px; left: 34px; }
.label-oracle { top: 48px; right: 28px; }
.label-redis { right: 42px; bottom: 28px; }
.label-linux { bottom: 34px; left: 28px; }
.reasoning-flow { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-top: 1px solid rgba(210,255,229,.12); background: rgba(4,17,10,.25); }
.reasoning-flow > div { display: flex; align-items: center; gap: 8px; }
.reasoning-flow > div > span { color: var(--green); font-family: var(--font-mono); font-size: 9px; }
.reasoning-flow p { margin: 0; color: #e1efe6; font-size: 11px; }
.reasoning-flow small { display: block; margin-top: 3px; color: #718c7c; font-size: 9px; }
.reasoning-flow > i { width: 14px; height: 1px; background: rgba(156,240,194,.2); }

.composer-wrap { width: min(1080px, 100%); margin: clamp(36px, 5vw, 64px) auto 0; }
.prompt-suggestions { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.prompt-suggestions > span { flex: 0 0 auto; padding-top: 9px; color: var(--muted); font-size: 12px; }
.prompt-suggestions > div { display: flex; flex-wrap: wrap; gap: 8px; }
.prompt-suggestions button { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 12px; text-align: left; transition: color 150ms, background 150ms, border-color 150ms; }
.prompt-suggestions button svg { width: 13px; height: 13px; color: var(--muted); transform: rotate(45deg); transition: transform 180ms var(--ease-out); }
.prompt-suggestions button:hover { color: var(--green-dark); border-color: var(--line); background: rgba(255,255,255,.7); }
.prompt-suggestions button:hover svg { color: var(--green-dark); transform: rotate(45deg) translateY(-2px); }
.composer { position: relative; padding: 20px 22px 16px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); box-shadow: 0 16px 48px rgba(24,45,33,.08), 0 2px 0 rgba(255,255,255,.9) inset; transition: border-color 200ms, box-shadow 200ms; }
.composer:focus-within { border-color: rgba(11,125,72,.6); box-shadow: 0 18px 54px rgba(24,45,33,.1), 0 0 0 3px rgba(32,200,117,.09); }
.composer > label { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--green-dark); font-size: 12px; font-weight: 700; }
.composer > label svg { width: 15px; height: 15px; }
.composer textarea { display: block; width: 100%; min-height: 66px; max-height: 180px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 16px; line-height: 1.7; }
.composer textarea::placeholder { color: #99a39d; }
.composer-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.composer-meta { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 10px; }
.send-controls { display: flex; align-items: center; gap: 16px; }
.send-controls > span { color: var(--muted); font-size: 10px; }
kbd { padding: 2px 4px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); background: var(--surface-soft); font-family: var(--font-mono); font-size: 9px; box-shadow: 0 1px 0 var(--line-strong); }
.send-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 0 17px; border-radius: 11px; color: #f4fff8; background: var(--night); font-size: 13px; font-weight: 650; transition: background 150ms, transform 150ms, box-shadow 150ms; }
.send-button { min-height: 36px; padding: 0 12px; }
.send-button svg, .primary-button svg { width: 17px; height: 17px; color: var(--green); }
.send-button:hover, .primary-button:hover { background: #193c2b; box-shadow: 0 8px 20px rgba(16,37,28,.16); transform: translateY(-2px); }
.send-button:active, .primary-button:active { transform: translateY(0); }
.send-button:disabled { cursor: wait; opacity: .55; transform: none; }
.send-button .send-icon { display: block; width: auto; height: 14px; }
.send-button .send-label { font-size: 13px; }
.ai-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; }
.ai-note svg { flex: 0 0 auto; width: 13px; height: 13px; }

.conversation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; min-height: 380px; }
.conversation-main { min-width: 0; }
.conversation-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.conversation-kicker { color: var(--green-dark); font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.4px; }
.conversation-heading h2 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.6px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 8px; color: var(--muted); background: transparent; font-size: 12px; transition: color 150ms, background 150ms; }
.text-button svg { width: 15px; height: 15px; }
.text-button:hover { color: var(--ink); background: var(--surface-soft); }
.message-list { display: flex; flex-direction: column; gap: 24px; }
.message { animation: message-enter 360ms var(--ease-out) both; }
@keyframes message-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.user-message { display: flex; justify-content: flex-end; }
.user-bubble { max-width: 82%; padding: 13px 17px; border-radius: 16px 16px 4px 16px; color: #f4fff8; background: var(--green-dark); font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 8px 20px rgba(11,125,72,.12); }
.assistant-message { padding: 0 0 6px; }
.assistant-identity { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.assistant-avatar { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--night); background: var(--green); }
.assistant-avatar svg { width: 18px; height: 18px; }
.assistant-identity strong { display: block; font-size: 13px; }
.assistant-identity span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.answer-content { padding-left: 44px; color: #283a30; font-size: 14px; line-height: 1.85; }
.answer-content > p { margin-bottom: 18px; }
.answer-content h3 { margin: 0 0 14px; color: var(--ink); font-size: 20px; line-height: 1.45; letter-spacing: -.4px; }
.answer-steps { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; padding: 0; list-style: none; counter-reset: answer-step; }
.answer-steps li { position: relative; padding-left: 35px; counter-increment: answer-step; }
.answer-steps li::before { position: absolute; top: 2px; left: 0; display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid #b9d9c5; border-radius: 7px; content: counter(answer-step, decimal-leading-zero); color: var(--green-dark); background: var(--green-soft); font-family: var(--font-mono); font-size: 9px; font-weight: 700; }
.answer-steps strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 14px; }
.answer-steps p { margin: 0; color: var(--ink-soft); }
.code-block { margin: 20px 0; overflow: hidden; border: 1px solid #263d31; border-radius: 13px; background: var(--night-deep); }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px 8px 16px; border-bottom: 1px solid rgba(220,255,233,.1); color: #91a99a; font-family: var(--font-mono); font-size: 10px; }
.code-header button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 7px; border-radius: 6px; color: #b4c9bb; background: transparent; font-size: 10px; }
.code-header button:hover { color: var(--green); background: rgba(255,255,255,.06); }
.code-header svg { width: 13px; height: 13px; }
.code-block pre { margin: 0; overflow-x: auto; padding: 18px; color: #c8eed7; font: 12px/1.75 var(--font-mono); tab-size: 2; }
.answer-note { display: flex; gap: 9px; margin: 18px 0; padding: 12px 14px; border-left: 2px solid var(--green); border-radius: 0 9px 9px 0; color: var(--ink-soft); background: #eaf4ec; font-size: 12px; }
.answer-note svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; color: var(--green-dark); }
.answer-actions { display: flex; align-items: center; gap: 6px; margin: 16px 0 0 44px; }
.answer-actions button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; font-size: 11px; }
.answer-actions button:hover, .answer-actions button.is-selected { color: var(--green-dark); border-color: #b9d9c5; background: var(--green-soft); }
.answer-actions svg { width: 13px; height: 13px; }
.answer-reference-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.reference-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink-soft); background: var(--surface); font-size: 10px; }
.reference-chip:hover { color: var(--green-dark); border-color: var(--green); }
.reference-chip svg { width: 12px; height: 12px; }
.thinking { padding-left: 44px; }
.thinking-status { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 13px; }
.thinking-dots { display: inline-flex; gap: 4px; }
.thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--green-dark); animation: thinking 900ms ease-in-out infinite alternate; }
.thinking-dots i:nth-child(2) { animation-delay: 150ms; }
.thinking-dots i:nth-child(3) { animation-delay: 300ms; }
@keyframes thinking { to { opacity: .25; transform: translateY(-3px); } }
.thinking-line { width: min(360px, 80%); height: 8px; margin-top: 15px; overflow: hidden; border-radius: 4px; background: var(--surface-soft); }
.thinking-line::after { display: block; width: 40%; height: 100%; content: ""; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(32,200,117,.4), transparent); animation: skeleton-slide 1.2s ease-in-out infinite; }
@keyframes skeleton-slide { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
.source-sidebar { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.62); }
.source-sidebar-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.source-sidebar-heading > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; color: var(--green-dark); background: var(--green-soft); }
.source-sidebar-heading svg { width: 17px; height: 17px; }
.source-sidebar-heading h2 { margin: 0; font-size: 14px; }
.source-sidebar-heading p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.source-empty { padding: 32px 8px; color: var(--muted); text-align: center; }
.source-empty svg { width: 24px; height: 24px; margin-bottom: 8px; opacity: .65; }
.source-empty p { margin: 0; font-size: 11px; line-height: 1.7; }
.source-item { display: block; width: 100%; padding: 16px 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.source-item:last-child { border-bottom: 0; }
.source-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.source-item-top span { color: var(--green-dark); font-family: var(--font-mono); font-size: 9px; letter-spacing: .6px; }
.source-item-top svg { width: 13px; height: 13px; color: var(--muted); transition: transform 150ms; }
.source-item strong { display: block; font-size: 12px; line-height: 1.6; }
.source-item small { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; }
.source-item:hover strong { color: var(--green-dark); }
.source-item:hover .source-item-top svg { transform: translateX(3px); }
.source-principle { display: flex; gap: 8px; margin-top: 16px; padding: 12px; border-radius: 10px; color: #5d6e63; background: var(--surface-soft); }
.source-principle svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 2px; }
.source-principle p { margin: 0; font-size: 10px; line-height: 1.7; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 42px; }
.section-heading h2 { margin: 17px 0 10px; font-size: clamp(36px, 4vw, 54px); line-height: 1.15; letter-spacing: -2.2px; }
.section-heading p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.section-stat { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 5px; }
.section-stat strong { color: var(--green-dark); font-family: var(--font-mono); font-size: 42px; line-height: 1; }
.section-stat span { padding-bottom: 3px; color: var(--muted); font-size: 11px; }
.knowledge-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.search-field { display: flex; flex: 1; align-items: center; gap: 11px; max-width: 620px; min-height: 54px; padding: 0 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); transition: border-color 150ms, box-shadow 150ms; }
.search-field:focus-within { border-color: var(--green-dark); box-shadow: 0 0 0 3px rgba(32,200,117,.08); }
.search-field svg { width: 18px; height: 18px; color: var(--green-dark); }
.search-field > span { flex: 0 0 auto; padding-right: 12px; border-right: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-field input::placeholder { color: #98a39c; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 32px; }
.filter-button { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 11px; transition: all 150ms; }
.filter-button:hover { border-color: var(--green); color: var(--green-dark); }
.filter-button.is-active { border-color: var(--night); color: #f4fff8; background: var(--night); }
.knowledge-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
.results-meta { margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.knowledge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.knowledge-card { position: relative; display: flex; min-height: 218px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.7); transition: border-color 200ms, transform 200ms var(--ease-out), box-shadow 200ms; }
.knowledge-card::before { position: absolute; top: 0; left: 0; width: 3px; height: 100%; content: ""; background: var(--green); opacity: 0; transition: opacity 200ms; }
.knowledge-card:hover { border-color: #b7c8ba; box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.knowledge-card:hover::before { opacity: 1; }
.knowledge-card > button, .knowledge-card > a { display: flex; flex: 1; flex-direction: column; width: 100%; padding: 22px; color: inherit; background: transparent; text-align: left; text-decoration: none; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.category-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-family: var(--font-mono); font-size: 10px; font-weight: 700; }
.category-tag::before { width: 5px; height: 5px; border-radius: 50%; content: ""; background: var(--green); }
.card-number { color: #a6afa9; font-family: var(--font-mono); font-size: 10px; }
.knowledge-card h2 { margin: 0 0 10px; font-size: 16px; line-height: 1.55; letter-spacing: -.2px; }
.knowledge-card p { display: -webkit-box; margin: 0 0 18px; overflow: hidden; color: var(--ink-soft); font-size: 12px; line-height: 1.75; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.card-keywords { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.card-arrow { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); transition: color 150ms, background 150ms; }
.card-arrow svg { width: 14px; height: 14px; }
.knowledge-card:hover .card-arrow { color: var(--night); background: var(--green); border-color: var(--green); }
.knowledge-skeleton { height: 218px; border-radius: 16px; background: linear-gradient(100deg, #e7ebe4 20%, #f2f4f0 40%, #e7ebe4 60%); background-size: 250% 100%; animation: skeleton-bg 1.4s ease infinite; }
@keyframes skeleton-bg { to { background-position-x: -250%; } }
.empty-results { grid-column: 1 / -1; padding: 64px 24px; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--muted); text-align: center; }
.empty-results svg { width: 30px; height: 30px; margin-bottom: 12px; }
.empty-results h2 { margin-bottom: 8px; color: var(--ink); font-size: 17px; }
.empty-results p { margin: 0; font-size: 12px; }
.knowledge-aside { align-self: start; }
.aside-heading { padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.aside-heading span { color: var(--green-dark); font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.2px; }
.aside-heading h2 { margin: 6px 0 0; font-size: 16px; }
.database-index { max-height: 610px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.index-group { padding-top: 16px; }
.index-group:first-child { padding-top: 0; }
.index-group-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 34px; padding: 0; color: var(--ink); background: transparent; font-size: 11px; font-weight: 700; text-align: left; }
.index-group-title span { color: var(--muted); font-family: var(--font-mono); font-size: 9px; font-weight: 500; }
.index-group-title:hover { color: var(--green-dark); }
.index-list button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 36px; padding: 0 4px; border-bottom: 1px solid var(--line); color: var(--ink-soft); background: transparent; font-size: 11.5px; text-align: left; transition: color 150ms, padding 150ms, background 150ms; }
.index-list button strong { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.index-list button span { flex: 0 0 auto; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.index-list button:hover, .index-list button.is-active { padding-left: 9px; color: var(--green-dark); }
.database-index::-webkit-scrollbar { width: 5px; }
.database-index::-webkit-scrollbar-thumb { border-radius: 3px; background: var(--line-strong); }
.knowledge-tip { margin-top: 28px; padding: 20px; border-radius: 15px; color: #e9fff2; background: var(--night); }
.knowledge-tip > svg { width: 22px; height: 22px; margin-bottom: 20px; color: var(--green); }
.knowledge-tip h3 { margin-bottom: 8px; font-size: 14px; }
.knowledge-tip p { margin-bottom: 18px; color: #a5b9ae; font-size: 11px; line-height: 1.75; }
.knowledge-tip button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 38px; padding: 0; color: var(--green); background: transparent; font-size: 12px; }
.knowledge-tip button svg { width: 16px; height: 16px; transition: transform 150ms; }
.knowledge-tip button:hover svg { transform: translateX(4px); }

.history-content { min-height: 330px; }
.history-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 340px; padding: 48px 20px; border: 1px dashed var(--line-strong); border-radius: 20px; text-align: center; background: rgba(255,255,255,.38); }
.empty-icon { position: relative; display: grid; width: 72px; height: 72px; margin-bottom: 22px; place-items: center; border: 1px solid #c9ddce; border-radius: 22px; color: var(--green-dark); background: var(--green-soft); transform: rotate(-5deg); }
.empty-icon svg { width: 30px; height: 30px; }
.history-empty h2 { margin-bottom: 9px; font-size: 20px; }
.history-empty p { max-width: 400px; margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.history-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }
.history-item { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-height: 88px; padding: 14px 6px; border-bottom: 1px solid var(--line); transition: background 150ms, padding 150ms; }
.history-item:hover { padding-right: 12px; padding-left: 12px; background: rgba(255,255,255,.55); }
.history-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--green-dark); background: var(--surface); }
.history-icon svg { width: 17px; height: 17px; }
.history-open { min-width: 0; padding: 8px 0; background: transparent; text-align: left; }
.history-open strong { display: block; overflow: hidden; margin-bottom: 6px; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.history-open span { color: var(--muted); font-size: 11px; }
.history-count { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; color: var(--muted); background: transparent; transition: color 150ms, background 150ms; }
.icon-button svg { width: 17px; height: 17px; }
.icon-button:hover { color: var(--danger); background: #f8e9e7; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(1408px, calc(100% - clamp(32px, 7vw, 112px))); min-height: 76px; margin: auto auto 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.footer-motto { letter-spacing: 1px; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.site-footer a:hover { color: var(--green-dark); }
.site-footer svg { width: 12px; height: 12px; }

.article-dialog { width: min(720px, calc(100% - 32px)); max-height: min(820px, calc(100vh - 48px)); padding: 0; overflow: hidden auto; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-lg); }
.article-dialog::backdrop { background: rgba(6,20,12,.5); backdrop-filter: blur(5px); }
.article-dialog[open] { animation: dialog-enter 300ms var(--ease-out) both; }
@keyframes dialog-enter { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog-topbar { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.dialog-label { color: var(--green-dark); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.dialog-content { padding: 30px; }
.dialog-content h2 { margin: 12px 0 14px; font-size: 27px; line-height: 1.4; letter-spacing: -.7px; }
.dialog-content > p { color: var(--ink-soft); font-size: 14px; line-height: 1.85; }
.dialog-content .answer-steps { margin-top: 26px; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 24px; border-top: 1px solid var(--line); background: var(--bg); }
.dialog-footer p { margin: 0; color: var(--muted); font-size: 10px; }
.toast { position: fixed; z-index: 500; bottom: 28px; left: 50%; max-width: calc(100% - 32px); padding: 11px 17px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; color: #f4fff8; background: var(--night); box-shadow: var(--shadow-lg); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity 200ms, transform 200ms var(--ease-out); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 24px; }
  .main-nav { justify-self: center; }
  .welcome-layout { grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 44px; }
  .hero-copy h1 { font-size: clamp(42px, 5vw, 58px); }
  .reasoning-flow { padding: 16px 14px; }
  .reasoning-flow small { display: none; }
  .knowledge-layout { gap: 28px; }
}

@media (max-width: 920px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "nav nav"; align-items: center; gap: 8px 12px; min-height: 0; padding: 10px 20px 8px; }
  .brand { grid-area: brand; }
  .header-actions { grid-area: actions; }
  .main-nav { grid-area: nav; position: static; width: 100%; max-width: 100%; justify-content: flex-start; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: 1 1 auto; justify-content: center; padding: 0 8px; font-size: 13px; }
  .welcome-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-copy { max-width: 760px; }
  .hero-copy h1 { font-size: clamp(44px, 8vw, 64px); }
  .ai-visual { min-height: 360px; }
  .orbit-scene { height: 240px; }
  .composer-wrap { margin-top: 36px; }
  .conversation-layout { grid-template-columns: 1fr; }
  .source-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-height: none; overflow: visible; }
  .source-sidebar-heading { align-self: start; }
  .source-list { grid-row: span 2; }
  .source-principle { margin-top: 0; }
  .knowledge-layout { grid-template-columns: 1fr; }
  .knowledge-aside { display: block; }
  .database-index { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; max-height: none; margin-top: 16px; padding-right: 0; }
  .knowledge-tip { margin-top: 28px; }
  .site-footer { margin-bottom: 0; }
}

@media (max-width: 680px) {
  main, .site-footer { width: calc(100% - 32px); }
  .site-header { padding: 8px 16px 6px; }
  .new-chat-button { min-height: 38px; padding: 0 12px; }
  .view { padding-top: 34px; }
  .hero-copy h1 { margin-top: 20px; font-size: clamp(37px, 11vw, 50px); letter-spacing: -2.3px; }
  .hero-description { font-size: 14px; line-height: 1.8; }
  .eyebrow { font-size: 9px; gap: 9px; }
  .eyebrow i { width: 24px; }
  .ai-visual { min-height: 348px; border-radius: 19px; }
  .visual-topline { padding: 17px; }
  .orbit-scene { height: 240px; transform: scale(.92); }
  .reasoning-flow { padding: 15px 12px; }
  .reasoning-flow > div { gap: 5px; }
  .reasoning-flow p { font-size: 10px; }
  .composer { padding: 17px 16px 14px; border-radius: 16px; }
  .composer textarea { font-size: 15px; }
  .composer-bottom { align-items: center; }
  .send-controls > span { display: none; }
  .prompt-suggestions { display: block; overflow: hidden; }
  .prompt-suggestions > span { display: block; margin-bottom: 7px; padding-top: 0; }
  .prompt-suggestions > div { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .prompt-suggestions button { flex: 0 0 auto; border-color: var(--line); background: rgba(255,255,255,.55); }
  .ai-note { align-items: flex-start; text-align: left; }
  .section-heading { align-items: flex-start; margin-bottom: 30px; }
  .section-heading h2 { font-size: 38px; }
  .section-heading p { font-size: 12px; }
  .section-stat { display: none; }
  .knowledge-toolbar { align-items: stretch; }
  .search-field { min-height: 50px; }
  .search-field > span { display: none; }
  .knowledge-toolbar > .text-button { flex: 0 0 auto; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .filter-button { flex: 0 0 auto; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .knowledge-card { min-height: 200px; }
  .knowledge-aside { display: block; }
  .database-index { grid-template-columns: 1fr; max-height: 420px; }
  .knowledge-tip { margin-top: 28px; }
  .source-sidebar { position: static; display: block; max-height: none; overflow: visible; }
  .source-principle { margin-top: 16px; }
  .answer-content { padding-left: 0; }
  .answer-actions { margin-left: 0; }
  .thinking { padding-left: 0; }
  .user-bubble { max-width: 92%; }
  .history-item { grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; }
  .history-count { display: none; }
  .history-open strong { font-size: 13px; }
  .history-view .section-heading { display: block; }
  .history-view .section-heading .new-chat-button { margin-top: 20px; }
  .site-footer { flex-wrap: wrap; justify-content: center; gap: 12px 24px; padding: 22px 0; }
  .footer-motto { display: none; }
  .dialog-content { padding: 24px 20px; }
  .dialog-content h2 { font-size: 22px; }
  .dialog-footer { align-items: flex-start; flex-direction: column; }
  .dialog-footer .primary-button { width: 100%; }
}

@media (max-width: 420px) {
  .new-chat-button span { display: none; }
  .header-actions .new-chat-button { width: 38px; padding: 0; }
  .nav-link { gap: 0; padding: 0 6px; font-size: 12px; }
  .nav-link svg { display: none; }
  .hero-copy h1 { font-size: 36px; }
  .domain-row button { padding: 0 10px; }
  .orbit-label { font-size: 9px; }
  .send-button { padding: 0 10px; }
  .send-button span { font-size: 12px; }
}

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

/* 知识库内容模式与官方文档目录 */
.knowledge-modes { display: flex; flex-wrap: wrap; gap: 6px; margin: -10px 0 22px; padding: 5px; width: fit-content; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.55); }
.knowledge-modes button { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 13px; border-radius: 8px; color: var(--ink-soft); background: transparent; font-size: 11.5px; transition: all 160ms; }
.knowledge-modes button span { color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.knowledge-modes button:hover { color: var(--green-dark); }
.knowledge-modes button.is-active { color: #f4fff8; background: var(--night); }
.knowledge-modes button.is-active span { color: var(--green); }

.doc-card > button { padding-bottom: 18px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: -8px 0 12px; color: var(--muted); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1px; }
.doc-meta span + span::before { margin-right: 10px; color: var(--line-strong); content: "/"; }
.doc-section-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.doc-section-chips span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); background: rgba(237,240,233,.7); font-size: 10px; }
.doc-card:hover .doc-section-chips span { border-color: #cfe3d5; }
.section-card .category-tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.knowledge-divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 26px 0 2px; padding-top: 22px; border-top: 1px solid var(--line); }
.knowledge-divider span { color: var(--green-dark); font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; }
.knowledge-divider strong { color: var(--ink); font-size: 15px; font-weight: 600; }

.doc-dialog-head h2 { margin-bottom: 10px; }
.doc-dialog-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 16px 0; }
.doc-dialog-meta > div { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(237,240,233,.5); }
.doc-dialog-meta span { color: var(--muted); font-size: 9.5px; }
.doc-dialog-meta strong { color: var(--ink); font-size: 11.5px; font-weight: 600; }
.doc-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.doc-external-link { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--green-dark); font-size: 11px; font-weight: 600; transition: all 160ms; }
.doc-external-link:hover { border-color: var(--green); background: var(--green-soft); }
.doc-external-link svg { width: 12px; height: 12px; }
.doc-dialog-sections-title { margin: 0 0 12px; font-size: 13px; }
.doc-dialog-sections { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.doc-dialog-sections li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.55); }
.doc-dialog-sections li.is-highlight { border-color: var(--green); background: var(--green-soft); }
.doc-dialog-sections li > div { min-width: 0; }
.doc-dialog-sections strong { display: block; margin-bottom: 3px; font-size: 12px; }
.doc-dialog-sections p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.doc-section-index { color: var(--muted); font-family: var(--font-mono); font-size: 9px; }

@media (max-width: 720px) {
  .knowledge-modes { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .knowledge-modes button { flex: 0 0 auto; }
  .doc-dialog-sections li { grid-template-columns: 24px minmax(0, 1fr); }
  .doc-dialog-sections li > .doc-external-link { grid-column: 2; width: fit-content; }
}

.answer-sections { display: grid; gap: 10px; margin: 14px 0; }
.answer-section { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-soft); }
.answer-section strong { display: block; margin-bottom: 6px; font-size: 14px; }
.answer-section p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.guidance-label { margin: 16px 0 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.guidance-label + .answer-reference-row { margin-top: 8px; }
.guidance-chip { min-height: 34px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 550; }
.guidance-chip:hover { color: var(--green-dark); border-color: var(--green); background: var(--green-soft); }
