:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --surface: #fff;
  --surface-soft: #f7f9fc;
  --line: #dce2ec;
  --text: #172033;
  --muted: #667085;
  --primary: #3157d5;
  --primary-dark: #2444af;
  --primary-soft: #eef2ff;
  --danger: #b42318;
  --success: #15865b;
  --shadow: 0 18px 46px rgba(29, 42, 73, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.topbar { height: 74px; padding: 0 44px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #3157d5, #7659df); font-weight: 850; box-shadow: 0 8px 20px rgba(49,87,213,.22); }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); margin-top: 2px; }
.status-pill { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 99px; padding: 8px 12px; color: var(--muted); font-size: 13px; }
.status-pill.ok { color: var(--success); border-color: #cde8db; background: #f2fbf7; }
.status-pill.bad { color: var(--danger); border-color: #f1c8c4; background: #fff6f5; }
.layout { width: min(1160px, calc(100% - 48px)); margin: auto; padding: 46px 0 34px; }
.hero { max-width: 850px; margin-bottom: 28px; }
.eyebrow, .section-label { color: var(--primary); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 850; }
.hero h1 { margin: 8px 0 0; max-width: 840px; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.04; letter-spacing: -.047em; }
.hero > p:last-child { max-width: 760px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
.search-panel, .side-panel, .answer-card, .result-card, .notice { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.search-panel, .side-panel { border-radius: 20px; padding: 23px; }
label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 760; }
small { color: var(--muted); }
.query-label { margin-top: 20px; }
.inline-control { display: flex; gap: 9px; }
input, textarea { width: 100%; border: 1px solid #cfd7e4; border-radius: 12px; background: var(--surface-soft); color: var(--text); padding: 12px 13px; outline: none; }
textarea { resize: vertical; min-height: 118px; line-height: 1.55; }
input:focus, textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(49,87,213,.1); }
.button { min-height: 43px; border: 1px solid transparent; border-radius: 11px; padding: 10px 14px; font-weight: 760; }
.button.primary { min-width: 185px; color: #fff; background: var(--primary); box-shadow: 0 9px 22px rgba(49,87,213,.22); }
.button.primary:hover { background: var(--primary-dark); }
.button:disabled { opacity: .62; cursor: wait; }
.button.ghost { white-space: nowrap; background: #fff; border-color: #cfd7e4; color: #354052; }
.actions-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: #eef1f6; }
.segment { border: 0; border-radius: 9px; padding: 9px 13px; background: transparent; color: #626c7d; font-weight: 720; }
.segment.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(29,42,73,.10); }
.side-panel h2 { margin: 0 0 13px; font-size: 15px; }
.side-panel ol { margin: 0; padding-left: 21px; color: #4f5b6d; line-height: 1.55; font-size: 13px; }
.side-panel li + li { margin-top: 8px; }
.limit-card { display: grid; gap: 6px; margin-top: 20px; padding: 14px; border-radius: 14px; border: 1px solid #dbe2ff; background: var(--primary-soft); font-size: 13px; }
.limit-card span { color: #66719a; }
.notice { margin-top: 18px; padding: 14px 16px; border-radius: 14px; color: #4f5b6d; box-shadow: none; }
.notice.error { color: var(--danger); border-color: #efc9c5; background: #fff7f6; }
.answer-card { margin-top: 18px; padding: 22px 24px; border-radius: 20px; border-left: 4px solid var(--primary); }
.answer-card p { margin: 8px 0 12px; line-height: 1.65; white-space: pre-wrap; }
.results-section { margin-top: 28px; }
.results-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.results-head h2 { margin: 4px 0 0; font-size: 23px; }
.sort-note { color: var(--muted); font-size: 12px; }
.results-list { display: grid; gap: 11px; }
.result-card { border-radius: 16px; padding: 18px 20px; box-shadow: 0 8px 24px rgba(29,42,73,.055); }
.result-topline, .result-footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.source-badge { padding: 5px 8px; border-radius: 7px; color: #2249bd; background: #edf1ff; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.score { color: var(--success); font-size: 12px; font-weight: 760; }
.result-card h3 { margin: 11px 0 7px; font-size: 17px; line-height: 1.35; }
.result-card p { margin: 0; color: #4f5b6d; font-size: 14px; line-height: 1.58; }
.result-footer { margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf0f5; color: var(--muted); font-size: 12px; }
.result-footer a { color: var(--primary); text-decoration: none; font-weight: 740; }
.empty { margin: 0; padding: 24px; text-align: center; border: 1px dashed #cfd7e4; border-radius: 14px; color: var(--muted); }
footer { width: min(1160px, calc(100% - 48px)); margin: auto; padding: 0 0 28px; display: flex; justify-content: space-between; gap: 12px; color: #8790a0; font-size: 11px; }
@media (max-width: 850px) { .topbar { padding: 0 22px; } .layout { width: min(100% - 28px, 720px); padding-top: 32px; } .workspace { grid-template-columns: 1fr; } .hero h1 { font-size: 38px; } }
@media (max-width: 560px) { .topbar { height: 66px; padding: 0 14px; } .brand small, .status-pill { display: none; } .layout { width: calc(100% - 20px); padding-top: 24px; } .hero h1 { font-size: 31px; } .hero > p:last-child { font-size: 15px; } .search-panel, .side-panel { padding: 17px; border-radius: 16px; } .inline-control, .actions-row, .result-footer { flex-direction: column; align-items: stretch; } .button.primary { width: 100%; } .segmented { display: flex; } .segment { flex: 1; } .results-head { align-items: start; } .sort-note { max-width: 120px; text-align: right; } footer { width: calc(100% - 24px); flex-direction: column; } }

.demo-notice{background:#fff0c4;padding:16px;border-left:3px solid #c69a1d;font-size:13px;line-height:1.6;margin-bottom:18px}.demo-notice p{margin:8px 0 0}.demo-examples{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.demo-examples button,.demo-index button{padding:9px 12px;border:1px solid #cbd4e4;background:white;border-radius:6px;cursor:pointer;color:#273652}.demo-index{background:#f3f6fb;border:1px solid #dbe3ef;border-radius:12px;padding:24px;margin:24px 0}.demo-index p{font-size:13px}.demo-index pre{white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.8 monospace}.demo-index output{display:block;margin-top:16px;font-size:13px}@media(max-width:650px){.demo-index{padding:16px}.demo-examples button{font-size:12px}}
