:root {
  color-scheme: light;
  --ink: #13221d;
  --muted: #6b7772;
  --paper: #eef1ec;
  --surface: rgba(255, 255, 252, .94);
  --line: #dfe5df;
  --green: #164d3a;
  --green-2: #207156;
  --green-soft: #e6f0e9;
  --lime: #cced77;
  --orange: #ee7049;
  --navy: #10261f;
  --shadow: 0 18px 55px rgba(21, 50, 39, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 78% 5%, rgba(204,237,119,.16), transparent 28%), var(--paper); font: 15px/1.6 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar { height: 82px; padding: 0 clamp(22px, 4.5vw, 68px); display: flex; align-items: center; justify-content: space-between; color: white; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand, .topbar-actions { display: flex; align-items: center; gap: 14px; }
.brand h1 { margin: 0; font-size: 23px; line-height: 1.1; letter-spacing: .02em; }
.eyebrow { margin-bottom: 4px; color: #8fb9a8; font-size: 9px; font-weight: 700; letter-spacing: .19em; }
.agent-logo { position: relative; width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(204,237,119,.42); border-radius: 14px; background: linear-gradient(145deg, rgba(204,237,119,.22), rgba(255,255,255,.04)); box-shadow: inset 0 0 16px rgba(204,237,119,.1); }
.agent-logo::before, .agent-logo span { content: ""; display: block; border-radius: 50%; }
.agent-logo::before { width: 19px; height: 19px; border: 1px solid var(--lime); box-shadow: 0 0 14px rgba(204,237,119,.55); }
.agent-logo span { position: absolute; width: 6px; height: 6px; background: white; }
.status-pills { display: flex; gap: 7px; }
.pill { padding: 6px 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 99px; color: #bed2ca; background: rgba(255,255,255,.04); font-size: 11px; }
.pill::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #f2ab58; }
.pill.live::before { background: var(--lime); box-shadow: 0 0 8px rgba(204,237,119,.65); }
.new-task-button { height: 38px; padding: 0 15px; border: 1px solid rgba(204,237,119,.3); border-radius: 10px; color: var(--lime); background: rgba(204,237,119,.08); font-weight: 700; }
.new-task-button:hover { background: rgba(204,237,119,.14); }

.layout { width: min(1480px, 100%); margin: 0 auto; padding: 26px clamp(18px, 3.6vw, 52px) 70px; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 24px; }
.panel, .hero-card, .quick-starts, .progress-card, .result { border: 1px solid var(--line); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow); }
.panel { padding: 24px; }
.sidebar, .workspace { min-width: 0; }
.sync-panel { position: sticky; top: 22px; overflow: hidden; }
.memory-status { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 19px; padding: 5px 9px; border-radius: 99px; color: #47705f; background: var(--green-soft); font-size: 10px; font-weight: 700; }
.pulse-dot, .agent-online span { width: 7px; height: 7px; border-radius: 50%; background: #36a475; box-shadow: 0 0 0 4px rgba(54,164,117,.12); }
.panel-heading, .result-header, .form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-heading h2, .result-header h2, .composer-heading h2 { margin: 3px 0 0; font: 700 20px/1.25 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.02em; }
.step { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.muted { color: var(--muted); font-size: 12px; }

.button { min-height: 40px; padding: 8px 15px; border-radius: 10px; border: 1px solid transparent; font-weight: 720; transition: .2s ease; }
.button:disabled { opacity: .55; cursor: wait; }
.button.ghost { min-height: 32px; padding: 6px 9px; border-color: var(--line); color: var(--green); background: transparent; font-size: 11px; }
.button.secondary { border-color: #bdd0c6; color: var(--green); background: #f7faf7; }
.button.primary { min-width: 210px; min-height: 48px; color: white; background: linear-gradient(135deg, var(--green-2), var(--green)); box-shadow: 0 10px 24px rgba(22,77,58,.2); }
.button.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(22,77,58,.24); }
.button.primary i { margin-left: 15px; font-style: normal; }

.case-count { margin: 20px 0 15px; padding: 16px; background: linear-gradient(135deg, #e6f0e9, #f0f5e6); border: 1px solid #dbe7dd; border-radius: 14px; }
.case-count div { display: flex; align-items: baseline; gap: 5px; }
.case-count strong { color: var(--green); font: 760 32px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.05em; }
.case-count span, .case-count p { color: #51705f; font-size: 11px; }
.case-count p { margin: 6px 0 0; }
.learning-card { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid #d9e6dc; border-radius: 13px; background: #f7faf6; }
.learning-icon { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--green); }
.learning-icon::before, .learning-icon span, .learning-icon i { content: ""; position: absolute; border-radius: 50%; }
.learning-icon::before { width: 18px; height: 18px; border: 1px solid var(--lime); }
.learning-icon span { width: 6px; height: 6px; background: var(--lime); }
.learning-icon i { width: 27px; height: 27px; border: 1px solid rgba(204,237,119,.25); animation: breathe 1.8s ease-in-out infinite; }
.learning-card strong { display: block; font-size: 11px; }
.learning-card p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.learning-card p b { color: var(--green); }
.learning-card > small { padding: 4px 6px; border-radius: 7px; color: #52705f; background: var(--green-soft); font-size: 8px; white-space: nowrap; }
.learning-card + .learning-card { margin-top: 9px; }
.web-learning-card { border-color: #d8e1ec; background: #f6f8fb; }
.web-learning-icon { color: #cfe2ff; background: #244b73; font-size: 18px; font-weight: 700; }
.web-learning-icon::before, .web-learning-icon span, .web-learning-icon i { display: none; }
.web-learning-card p b { color: #244b73; }
.web-learning-card > small { color: #4e6883; background: #e8eef5; }
.search-row { position: relative; display: flex; gap: 7px; }
.search-icon { position: absolute; left: 11px; top: 9px; z-index: 1; color: #87928d; font-size: 19px; }
input, textarea { width: 100%; border: 1px solid #d7ddd8; border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.9); outline: none; transition: .2s ease; }
input { height: 45px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
input:focus, textarea:focus { border-color: #6d9c86; box-shadow: 0 0 0 4px rgba(32,113,86,.09); background: white; }
.search-row input { padding-left: 36px; }
.icon-button { width: 45px; height: 45px; flex: 0 0 auto; border: 0; border-radius: 11px; color: white; background: var(--green); font-size: 18px; }
.case-list { margin-top: 12px; }
.case-item { position: relative; margin-top: 8px; padding: 12px 12px 12px 16px; border: 1px solid #e4e9e4; border-radius: 12px; background: #fbfcfa; }
.case-item::before { content: ""; position: absolute; left: 0; top: 15px; bottom: 15px; width: 3px; border-radius: 5px; background: #a7ca9d; }
.case-item a, .case-item strong { display: block; color: var(--ink); font-size: 12px; font-weight: 760; text-decoration: none; }
.case-item p { display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.case-cta { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e5eae5; }
.website-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; padding: 13px; color: #183f30; text-decoration: none; border: 1px solid #bed195; border-radius: 14px; background: linear-gradient(135deg, var(--lime), #e6f5ac); transition: .2s ease; }
.website-card + .website-card { margin-top: 10px; }
.website-card:hover { transform: translateY(-2px); border-color: #86a658; box-shadow: 0 10px 24px rgba(40,83,62,.12); }
.website-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--lime); border-radius: 12px; background: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.website-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.25; }
.website-copy small { margin-bottom: 3px; color: #5d775f; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.website-copy strong { font-size: 13px; }
.website-copy em { margin-top: 3px; overflow: hidden; color: #5d775f; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.website-card > i { font-size: 18px; font-style: normal; }
.ai-platform-card { color: #eaf4ef; border-color: #31584a; background: linear-gradient(135deg, #153f31, #082a23); }
.ai-platform-card .website-icon { color: #173d30; background: var(--lime); }
.ai-platform-card .website-copy small, .ai-platform-card .website-copy em { color: #a9c3b7; }
.ai-platform-card:hover { border-color: var(--lime); box-shadow: 0 10px 24px rgba(18,65,49,.2); }

.hero-card { min-height: 230px; padding: 32px 34px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 24px; overflow: hidden; color: white; background: radial-gradient(circle at 86% 12%, rgba(204,237,119,.18), transparent 30%), linear-gradient(135deg, #173b30, #0f2921); border-color: rgba(255,255,255,.05); }
.agent-avatar { position: relative; width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid rgba(204,237,119,.4); border-radius: 25px; background: linear-gradient(145deg, rgba(204,237,119,.24), rgba(255,255,255,.04)); box-shadow: 0 0 34px rgba(204,237,119,.12); }
.agent-avatar span { color: var(--lime); font-size: 20px; font-weight: 850; letter-spacing: .05em; }
.agent-avatar i { position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; border: 4px solid #15372c; border-radius: 50%; background: #50d08f; }
.hero-copy { max-width: 750px; }
.agent-online { display: flex; align-items: center; gap: 8px; color: #acd0c0; font-size: 11px; font-weight: 700; }
.agent-online span { background: var(--lime); }
.hero-copy h2 { margin: 9px 0; font-size: clamp(27px, 3vw, 41px); line-height: 1.15; letter-spacing: -.035em; }
.hero-copy p { max-width: 720px; margin: 0; color: #bfd0c9; font-size: 14px; }
.ability-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.ability-row span { padding: 5px 9px; border: 1px solid rgba(255,255,255,.11); border-radius: 7px; color: #c8d8d1; background: rgba(255,255,255,.04); font-size: 10px; }
.model-mark { min-width: 170px; padding: 20px; border: 1px solid rgba(204,237,119,.22); border-radius: 15px; background: rgba(255,255,255,.05); }
.model-mark span, .model-mark small { display: block; color: #8fb0a2; font-size: 9px; letter-spacing: .1em; }
.model-mark strong { display: block; margin: 7px 0; color: var(--lime); font-size: 18px; }
.model-mark small { letter-spacing: 0; }

.quick-starts { margin-top: 16px; padding: 15px; display: grid; grid-template-columns: minmax(170px,1.35fr) repeat(4,minmax(105px,1fr)); gap: 9px; align-items: center; box-shadow: none; }
.quick-starts > div { padding: 0 10px; }
.quick-starts > div strong { display: block; margin-top: 2px; font-size: 12px; }
.quick-prompt { height: 48px; border: 1px solid #e0e6e0; border-radius: 12px; color: #395248; background: #f8faf7; font-size: 12px; font-weight: 700; transition: .2s ease; }
.quick-prompt span { margin-right: 5px; }
.quick-prompt:hover { color: var(--green); border-color: #a8c5b6; background: var(--green-soft); transform: translateY(-1px); }

.brief-form { margin-top: 16px; scroll-margin-top: 22px; }
.brief-form:focus { outline: none; }
.composer-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 24px; padding-bottom: 19px; border-bottom: 1px solid #e8ece8; }
.composer-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.mini-agent { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; color: var(--lime); background: var(--green); font-size: 12px; font-weight: 850; box-shadow: 0 8px 18px rgba(22,77,58,.16); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid label { display: block; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid label > span { display: block; margin-bottom: 6px; color: #3e4e47; font-size: 11px; font-weight: 720; }
.form-footer { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e8ece8; }
.privacy-note { color: var(--muted); font-size: 11px; }
.privacy-note i { display: inline-grid; width: 18px; height: 18px; margin-right: 6px; place-items: center; border-radius: 50%; color: var(--green); background: var(--green-soft); font-style: normal; }

.progress-card { margin-top: 16px; padding: 25px 28px; display: flex; align-items: center; gap: 20px; overflow: hidden; }
.thinking-orb { position: relative; width: 51px; height: 51px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); }
.thinking-orb::before, .thinking-orb span { content: ""; border-radius: 50%; }
.thinking-orb::before { width: 25px; height: 25px; border: 2px solid var(--green); border-top-color: transparent; animation: spin .85s linear infinite; }
.thinking-orb span { position: absolute; width: 8px; height: 8px; background: var(--lime); }
.thinking-orb i { position: absolute; inset: -12px; border: 1px solid rgba(32,113,86,.12); border-radius: 50%; animation: breathe 1.6s ease-in-out infinite; }
.thinking-copy { width: 100%; }
.thinking-copy strong { font-size: 14px; }
.thinking-copy p { margin: 1px 0 10px; color: var(--muted); font-size: 11px; }
.thinking-steps { display: flex; gap: 7px; }
.thinking-steps span { padding: 4px 8px; border-radius: 7px; color: #8a948f; background: #f0f2ef; font-size: 9px; }
.thinking-steps span.active { color: white; background: var(--green); }
.thinking-steps span.done { color: #426c59; background: var(--green-soft); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.12); opacity: .35; } }

.result { margin-top: 16px; overflow: hidden; scroll-margin-top: 20px; }
.result-header { padding: 23px 28px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, #f7faf6, #edf4e7); }
.result-actions { display: flex; flex-shrink: 0; gap: 9px; }
.download-button { color: white; border-color: var(--green); background: var(--green); }
.download-button:hover { transform: translateY(-1px); background: #174735; box-shadow: 0 8px 20px rgba(24,80,59,.16); }
.result-ready { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 10px; font-weight: 800; }
.result-ready i { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; color: white; background: var(--green-2); font-style: normal; }
.plan-content { padding: 11px 28px 34px; }
.memory-used { margin: 16px 0 2px; padding: 13px 15px; display: flex; align-items: center; gap: 11px; color: #345c4c; border: 1px solid #d8e6dc; border-radius: 12px; background: #f2f8f3; }
.memory-used > span { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: var(--lime); background: var(--green); }
.memory-used strong { display: block; font-size: 11px; }
.memory-used p { margin: 2px 0 0; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.memory-used.fresh { color: #67521f; border-color: #e8deb9; background: #fffbee; }
.memory-used.fresh > span { color: #fff1b4; background: #8b6d21; }
.web-knowledge-used { margin: 10px 0 2px; padding: 14px 15px; color: #294e72; border: 1px solid #d6e1ec; border-radius: 12px; background: #f4f8fc; }
.web-knowledge-heading { display: flex; align-items: center; gap: 11px; }
.web-knowledge-heading > span, .web-knowledge-used.offline > span { display: grid; width: 31px; height: 31px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: #d8e9ff; background: #244b73; font-size: 16px; }
.web-knowledge-heading strong, .web-knowledge-used.offline strong { display: block; font-size: 11px; }
.web-knowledge-heading p, .web-knowledge-used.offline p { margin: 2px 0 0; color: #6c7d8d; font-size: 9px; }
.web-knowledge-feishu-link { display: inline-flex; margin-top: 9px; padding: 6px 9px; color: #245f4b; border: 1px solid #bcd9cf; border-radius: 8px; background: #f7fcfa; font-size: 9px; font-weight: 700; text-decoration: none; }
.web-knowledge-feishu-link:hover { border-color: #73aa97; background: #eef8f4; }
.web-source-list { margin-top: 11px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.web-source-list a { min-width: 0; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #345f84; text-decoration: none; border: 1px solid #dce6ef; border-radius: 8px; background: white; font-size: 9px; }
.web-source-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-source-list a i { font-style: normal; }
.web-source-list a:hover { border-color: #9ab2c7; background: #f9fcff; }
.web-knowledge-used.offline { display: flex; align-items: center; gap: 11px; color: #65716b; border-color: #e0e4e1; background: #f7f8f6; }
.web-knowledge-used.offline > span { color: #7b8b84; background: #e9eeeb; }
.plan-section { padding: 22px 0; border-bottom: 1px solid #e7ebe7; }
.plan-section:last-child { border-bottom: 0; }
.plan-section h3 { margin: 0 0 10px; color: var(--green); font-size: 17px; }
.plan-section p { margin: 0; white-space: pre-wrap; }
.plan-section ul { margin: 8px 0 0; padding-left: 20px; }
.plan-section li { margin: 6px 0; }
.channel-grid, .timeline-grid, .citation-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.mini-card { padding: 15px; border: 1px solid #dfe5df; border-radius: 12px; background: #fafcf8; }
.mini-card strong { display: block; margin-bottom: 5px; }
.mini-card span { color: var(--muted); font-size: 11px; }
.memory-feedback { margin: 0 28px 28px; padding: 18px; border: 1px solid #dce5de; border-radius: 15px; background: linear-gradient(135deg, #f8fbf7, #f0f6ed); transition: .2s ease; }
.feedback-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.feedback-orb { width: 39px; height: 39px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 12px; color: var(--lime); background: var(--green); font-size: 11px; font-weight: 800; }
.feedback-heading span { display: block; color: var(--orange); font-size: 8px; font-weight: 800; letter-spacing: .14em; }
.feedback-heading strong { display: block; font-size: 13px; }
.feedback-heading p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }
.memory-feedback input { height: 40px; font-size: 11px; }
.feedback-actions { margin-top: 10px; display: flex; align-items: center; gap: 8px; }
.feedback-button { min-height: 36px; padding: 7px 11px; border: 1px solid #cfddd3; border-radius: 9px; color: var(--green); background: white; font-size: 10px; font-weight: 750; }
.feedback-button:hover { border-color: #8db09e; background: var(--green-soft); }
.feedback-button.improve { color: #7a5b32; border-color: #e2d5c3; }
.feedback-button:disabled { opacity: .55; cursor: default; }
#feedbackStatus { margin-left: auto; color: var(--green); font-size: 10px; }
.memory-feedback.learned { border-color: #a9c8b7; box-shadow: inset 0 0 0 1px rgba(50,120,83,.06); }
.memory-feedback.learned input, .memory-feedback.learned .feedback-button { display: none; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 390px; padding: 13px 18px; border-radius: 11px; color: white; background: #173c30; box-shadow: 0 12px 38px rgba(0,0,0,.18); z-index: 20; }
.toast.error { background: #8f3b2e; }
.hidden { display: none !important; }

@media (max-width: 1040px) {
  .quick-starts { grid-template-columns: repeat(4,1fr); }
  .quick-starts > div { grid-column: 1 / -1; }
  .model-mark { display: none; }
  .hero-card { grid-template-columns: auto 1fr; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sync-panel { position: static; }
  .sidebar { order: 2; }
  .workspace { order: 1; }
  .status-pills { display: none; }
}
@media (max-width: 620px) {
  .topbar { height: 70px; padding: 0 15px; }
  .brand h1 { font-size: 19px; }
  .agent-logo { width: 38px; height: 38px; }
  .new-task-button { padding: 0 10px; font-size: 11px; }
  .layout { padding: 14px 12px 36px; }
  .hero-card { min-height: 0; padding: 24px 20px; grid-template-columns: 1fr; }
  .agent-avatar { width: 56px; height: 56px; border-radius: 18px; }
  .hero-copy h2 { font-size: 27px; }
  .quick-starts { grid-template-columns: repeat(2,1fr); }
  .quick-starts > div { grid-column: 1 / -1; }
  .panel { padding: 20px; }
  .form-grid, .channel-grid, .timeline-grid, .citation-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .form-footer, .result-header { align-items: stretch; flex-direction: column; }
  .result-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .web-source-list { grid-template-columns: 1fr; }
  .memory-feedback { margin: 0 20px 20px; }
  .feedback-actions { align-items: stretch; flex-direction: column; }
  .feedback-button { width: 100%; }
  #feedbackStatus { margin-left: 0; text-align: center; }
  .button.primary { width: 100%; }
  .thinking-steps { flex-wrap: wrap; }
}
