
:root{
  color-scheme:dark;
  --bg:#07131f;--card:#0d2235;--card2:#0a1b2b;--line:#244661;
  --text:#edf6ff;--muted:#a9c0d1;--accent:#5bc4ea;--green:#4dd69c;
  --warn:#e4a94a;--danger:#ff9f9f
}
*{box-sizing:border-box}
body{margin:0;background:radial-gradient(circle at top,#0c2637 0,#07131f 42%,#06101a 100%);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,sans-serif;min-height:100vh}
.shell{width:min(760px,100%);margin:auto;padding:24px 18px 48px}
.hero{padding:18px 4px 8px}.eyebrow{color:#67e2b4;font-size:13px}.hero h1{font-size:36px;margin:8px 0 8px}.hero p{color:var(--muted);line-height:1.9;margin:0 0 12px}
.card{background:rgba(13,34,53,.96);border:1px solid var(--line);border-radius:22px;padding:20px;margin:16px 0;box-shadow:0 18px 48px #0003}
.card.compact{padding:17px 18px}.subtle{background:rgba(10,27,43,.82)}
.row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.row.center{align-items:center}
.card h2{margin:0 0 6px}.card h3{margin:0}.card p{color:var(--muted);line-height:1.8;margin:6px 0}
.dot{width:13px;height:13px;border-radius:50%;background:var(--warn);box-shadow:0 0 0 5px #e4a94a1f;flex:0 0 auto}.dot.connected{background:var(--green);box-shadow:0 0 0 5px #4dd69c1f}
.badge{display:inline-block;border:1px solid #31556f;border-radius:999px;padding:6px 10px;color:#c5e3f2;font-size:12px;white-space:nowrap}
.section-label{display:block;color:#b7d1e0;font-size:14px;margin-bottom:8px;font-weight:700}
textarea{width:100%;resize:vertical;border:1px solid #426985;background:#06131f;color:white;border-radius:16px;padding:16px;font:inherit;font-size:18px;line-height:1.9;outline:none;margin:8px 0 14px}
textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #5bc4ea20}
button{border:0;border-radius:15px;padding:14px 15px;font:inherit;font-weight:800;font-size:16px;cursor:pointer}
.primary{width:100%;background:var(--accent);color:#031019}.primary.big{font-size:19px;padding:16px}.secondary{width:100%;margin-top:10px;background:#223c50;color:#edf6ff}
.primary:disabled,.toolbtn:disabled{opacity:.55;cursor:not-allowed}
.micro{font-size:12px;color:#8eaabd;margin-top:10px}
.hidden{display:none!important}
.answer{white-space:pre-wrap;line-height:2;background:#081a2a;border-radius:16px;padding:16px;font-size:16px;border:1px solid #183a53}
.actions-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0 20px}
.toolbtn{background:#17334a;color:#eef8ff;border:1px solid #2a4b64}.toolbtn:active{transform:translateY(1px)}
.danger-lite{color:#ffd6d6}
.warning{background:#3a2b14;border:1px solid #6b5127;color:#ffe0a0;border-radius:14px;padding:12px;margin:10px 0}
.sources-head{display:flex;align-items:center;justify-content:space-between;margin-top:8px}
.sources{display:grid;gap:10px;margin-top:12px}
.source-card{background:#081a2a;border:1px solid #183a53;border-radius:16px;padding:14px}
.source-title{font-weight:800;line-height:1.7;margin-bottom:8px;word-break:break-word}
.source-meta{font-size:13px;color:#9fbbcd;line-height:1.7}
.source-actions{display:flex;gap:8px;margin-top:10px}.source-actions button{flex:1;padding:10px 12px;font-size:14px;background:#17334a;color:#e9f6ff;border:1px solid #2a4b64}
.source-actions a{display:block;text-decoration:none;color:inherit}
footer{text-align:center;color:#7290a5;font-size:12px;margin-top:28px}
@media(max-width:480px){
  .shell{padding:18px 14px 36px}.hero h1{font-size:32px}.card{padding:18px 16px;border-radius:20px}
  .actions-grid{grid-template-columns:1fr 1fr}.badge{white-space:normal;text-align:center}
}
