:root{--bg: #ffffff;--fg: #111111;--muted: #666666;--accent: #2563eb;--accent-hover: #1d4ed8;--border: #e5e7eb;--surface: #f9fafb;--todo: #fff3cd;--radius: 8px}@media (prefers-color-scheme: dark){:root{--bg: #0b0c0f;--fg: #f3f4f6;--muted: #9ca3af;--accent: #3b82f6;--accent-hover: #2563eb;--border: #374151;--surface: #111827;--todo: #665c00}}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--fg)}.landing{max-width:760px;margin:0 auto;padding:12vh 1rem 2rem;text-align:center}.landing h1{font-size:2.6rem;margin-bottom:2rem;font-weight:700}.landing input[type=url],.landing input[type=text],.landing input[type=email],.landing input[type=password]{display:block;width:100%;padding:1rem 1.25rem;font-size:1.1rem;border:1px solid var(--border);border-radius:999px;outline:none;background:var(--bg);color:var(--fg)}.landing input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #2563eb26}.landing .actions{margin-top:1.25rem}.landing button{padding:.75rem 1.5rem;font-size:1rem;border:none;border-radius:999px;background:var(--accent);color:#fff;cursor:pointer}.landing button:hover{background:var(--accent-hover)}.landing .secondary{display:block;margin-top:1rem;color:var(--muted);font-size:.9rem;cursor:pointer}.landing .secondary:hover{color:var(--fg)}.recent{margin-top:2.5rem;text-align:left}.recent h3{font-size:.95rem;color:var(--muted);margin-bottom:.5rem}.recent ul{list-style:none;padding:0;margin:0}.recent li{padding:.5rem 0;border-bottom:1px solid var(--border)}.recent a{color:var(--accent);text-decoration:none}.session-page{max-width:960px;margin:0 auto;padding:1rem}.topbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-bottom:.75rem;border-bottom:1px solid var(--border);margin-bottom:1rem}.topbar h2{margin:0;font-size:1.1rem;flex:1}.status-chip{padding:.25rem .75rem;border-radius:999px;font-size:.75rem;text-transform:uppercase;letter-spacing:.03em;background:var(--surface);border:1px solid var(--border)}.session-layout{display:grid;grid-template-columns:1fr 320px;gap:1.5rem}@media (max-width: 800px){.session-layout{grid-template-columns:1fr}}.chat-panel{display:flex;flex-direction:column;gap:.75rem;min-height:60vh}.messages{flex:1;display:flex;flex-direction:column;gap:.75rem;max-height:70vh;overflow-y:auto;padding-right:.5rem}.bubble{max-width:85%;padding:.75rem 1rem;border-radius:var(--radius);line-height:1.5;white-space:pre-wrap}.bubble.user{align-self:flex-end;background:var(--accent);color:#fff}.bubble.assistant{align-self:flex-start;background:var(--surface);border:1px solid var(--border)}.bubble.system_note{align-self:center;font-size:.85rem;color:var(--muted);background:transparent;border:none}.typing{align-self:flex-start;color:var(--muted);font-size:.9rem}.chat-input{display:flex;flex-direction:column;gap:.5rem}.chat-input textarea{width:100%;padding:.75rem 1rem;font-size:1rem;border:1px solid var(--border);border-radius:var(--radius);resize:vertical;min-height:80px;background:var(--bg);color:var(--fg)}.chat-input .row{display:flex;gap:.5rem;align-items:center}.chat-input button{padding:.6rem 1rem;border:none;border-radius:var(--radius);background:var(--accent);color:#fff;cursor:pointer}.chat-input button:disabled{opacity:.6;cursor:not-allowed}.sidebar{display:flex;flex-direction:column;gap:1rem}.panel{border:1px solid var(--border);border-radius:var(--radius);padding:1rem;background:var(--surface)}.panel h3{margin:0 0 .75rem;font-size:1rem}.progress{margin-bottom:.75rem}.progress-bar{height:6px;background:var(--border);border-radius:3px;overflow:hidden}.progress-bar>div{height:100%;background:var(--accent)}.checklist-item{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem 0;border-bottom:1px solid var(--border);cursor:pointer}.checklist-item:last-child{border-bottom:none}.checklist-item .icon{font-size:1rem;width:1.25rem;text-align:center}.checklist-item .label{flex:1;font-size:.9rem}.checklist-item .answer{font-size:.8rem;color:var(--muted);margin-top:.25rem}.btn-primary{width:100%;padding:.75rem;border:none;border-radius:var(--radius);background:var(--accent);color:#fff;cursor:pointer;font-size:.95rem}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.document-item{padding:.5rem 0;border-bottom:1px solid var(--border);cursor:pointer}.document-item:last-child{border-bottom:none}.doc-view{border:1px solid var(--border);border-radius:var(--radius);padding:1rem;min-height:300px;background:var(--bg)}.doc-view [contenteditable]{outline:none;min-height:250px}.doc-view mark[data-todo]{background:var(--todo);padding:0 2px}.todo-badge{display:inline-block;background:var(--todo);color:var(--fg);padding:.15rem .4rem;border-radius:999px;font-size:.75rem;margin-left:.5rem}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000080;display:flex;align-items:center;justify-content:center;padding:1rem;z-index:100}.modal{background:var(--bg);border-radius:var(--radius);padding:1.5rem;max-width:480px;width:100%}.modal textarea{width:100%;min-height:100px;margin:.75rem 0}.source-fallback{margin:1rem 0;padding:1rem;border:1px dashed var(--border);border-radius:var(--radius)}.source-fallback input,.source-fallback textarea{width:100%;margin-bottom:.5rem;padding:.5rem}small{color:var(--muted)}
