:root{--color-primary: #2563eb;--color-primary-dark: #1d4ed8;--color-primary-light: #dbeafe;--color-success: #16a34a;--color-success-light: #dcfce7;--color-danger: #dc2626;--color-danger-light: #fee2e2;--color-bg: #f8fafc;--color-surface: #ffffff;--color-surface-alt: #f1f5f9;--color-sidebar: #ffffff;--color-border: #e2e8f0;--color-text: #0f172a;--color-text-secondary:#475569;--color-muted: #94a3b8;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:16px;line-height:1.5;color:var(--color-text)}*,*:before,*:after{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{background:var(--color-bg)}h1,h2,h3{line-height:1.25}input[type=checkbox]{width:16px;height:16px;accent-color:var(--color-primary);cursor:pointer}select{padding:7px 10px;border:1px solid var(--color-border);border-radius:4px;font-size:.875rem;background:var(--color-surface);color:var(--color-text);cursor:pointer}select:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 2px var(--color-primary-light)}[data-theme=modern] [data-route=perimetres]{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' opacity='0.055'><g fill='none' stroke='%237c3aed' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'><rect x='80' y='30' width='240' height='340' rx='4'/><line x1='80' y1='143' x2='320' y2='143'/><line x1='80' y1='256' x2='320' y2='256'/><rect x='163' y='283' width='74' height='87' rx='3'/><rect x='102' y='53' width='50' height='55' rx='3'/><rect x='248' y='53' width='50' height='55' rx='3'/><rect x='102' y='165' width='50' height='55' rx='3'/><rect x='248' y='165' width='50' height='55' rx='3'/></g></svg>");background-attachment:fixed;background-position:right 48px bottom 48px;background-size:300px;background-repeat:no-repeat}[data-theme=modern] [data-route=applications],[data-theme=modern] [data-route=application-new],[data-theme=modern] [data-route=application-detail]{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' opacity='0.055'><g fill='none' stroke='%237c3aed' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'><rect x='40' y='70' width='320' height='72' rx='6'/><rect x='40' y='164' width='320' height='72' rx='6'/><rect x='40' y='258' width='320' height='72' rx='6'/><rect x='60' y='89' width='18' height='34' rx='3'/><rect x='88' y='89' width='18' height='34' rx='3'/><rect x='116' y='89' width='18' height='34' rx='3'/><rect x='144' y='89' width='18' height='34' rx='3'/><rect x='172' y='89' width='18' height='34' rx='3'/><rect x='200' y='89' width='18' height='34' rx='3'/><rect x='228' y='89' width='18' height='34' rx='3'/><rect x='256' y='89' width='18' height='34' rx='3'/><rect x='60' y='183' width='18' height='34' rx='3'/><rect x='88' y='183' width='18' height='34' rx='3'/><rect x='116' y='183' width='18' height='34' rx='3'/><rect x='144' y='183' width='18' height='34' rx='3'/><rect x='172' y='183' width='18' height='34' rx='3'/><rect x='200' y='183' width='18' height='34' rx='3'/><rect x='228' y='183' width='18' height='34' rx='3'/><rect x='60' y='277' width='18' height='34' rx='3'/><rect x='88' y='277' width='18' height='34' rx='3'/><rect x='116' y='277' width='18' height='34' rx='3'/><rect x='144' y='277' width='18' height='34' rx='3'/></g></svg>");background-attachment:fixed;background-position:right 48px bottom 48px;background-size:300px;background-repeat:no-repeat}[data-theme=modern] [data-route=flux],[data-theme=modern] [data-route=flux-new]{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' opacity='0.055'><g fill='none' stroke='%237c3aed' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'><rect x='20' y='148' width='72' height='104' rx='8'/><rect x='38' y='170' width='12' height='44' rx='2'/><rect x='56' y='170' width='12' height='44' rx='2'/><rect x='308' y='148' width='72' height='104' rx='8'/><rect x='326' y='170' width='12' height='44' rx='2'/><rect x='344' y='170' width='12' height='44' rx='2'/><path d='M92 185 C145 75 255 325 308 215'/><circle cx='152' cy='114' r='10'/><circle cx='200' cy='200' r='10'/><circle cx='248' cy='286' r='10'/></g></svg>");background-attachment:fixed;background-position:right 48px bottom 48px;background-size:300px;background-repeat:no-repeat}[data-theme=modern] [data-route=rules],[data-theme=modern] [data-route=rule-new],[data-theme=modern] [data-route=rule-detail]{background-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' opacity='0.055'><g fill='none' stroke='%237c3aed' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'><rect x='28' y='75' width='124' height='250' rx='8'/><line x1='50' y1='115' x2='132' y2='115'/><line x1='50' y1='143' x2='112' y2='143'/><line x1='50' y1='171' x2='132' y2='171'/><line x1='50' y1='199' x2='104' y2='199'/><line x1='50' y1='227' x2='122' y2='227'/><line x1='50' y1='255' x2='110' y2='255'/><rect x='248' y='75' width='124' height='250' rx='8'/><line x1='270' y1='115' x2='352' y2='115'/><line x1='270' y1='143' x2='334' y2='143'/><line x1='270' y1='171' x2='352' y2='171'/><line x1='270' y1='199' x2='324' y2='199'/><line x1='270' y1='227' x2='344' y2='227'/><line x1='270' y1='255' x2='330' y2='255'/><path d='M152 198 L248 202' stroke-dasharray='10 6'/><polyline points='236,194 248,202 236,210'/></g></svg>");background-attachment:fixed;background-position:right 48px bottom 48px;background-size:300px;background-repeat:no-repeat}.sidebar-health-popup{position:fixed;z-index:1000;width:480px;max-width:calc(100vw - 16px);max-height:70vh;overflow-y:auto;background:var(--color-surface, #ffffff);color:var(--color-text, #0f172a);border:1px solid var(--color-border, #e2e8f0);border-radius:6px;padding:10px 12px;box-shadow:0 8px 24px #0000002e;font-family:inherit;font-size:.85rem;animation:sidebar-health-popup-fade .12s ease-out}@keyframes sidebar-health-popup-fade{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}.sidebar-health-popup-head{font-weight:600;font-size:.88rem;padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid var(--color-border, #e2e8f0);color:var(--color-text)}.sidebar-health-popup-ts{font-weight:400;font-size:.74rem;color:var(--color-text-secondary, #475569);margin-left:6px}.sidebar-health-popup-stale{margin-top:6px;padding:4px 8px;font-size:.74rem;font-weight:400;color:#92400e;background:#fef3c7;border-left:3px solid #fb923c;border-radius:0 4px 4px 0}.sidebar-health-popup-list{list-style:none;margin:0;padding:0}.sidebar-health-popup-alert{display:grid;grid-template-columns:110px 1fr;grid-template-rows:auto auto;gap:2px 8px;padding:6px 4px;border-bottom:1px dashed var(--color-border, #e2e8f0);cursor:help}.sidebar-health-popup-alert:last-child{border-bottom:none}.sidebar-health-popup-alert:hover{background:var(--color-surface-alt, #f1f5f9)}.sidebar-health-popup-alert--clickable{cursor:pointer}.sidebar-health-popup-alert--clickable:hover{background:var(--color-primary-light, #dbeafe)}.sidebar-health-popup-perim{grid-column:1;grid-row:1 / 3;font-size:.74rem;color:var(--color-text-secondary, #475569);font-weight:600;text-transform:uppercase;letter-spacing:.02em;align-self:center}.sidebar-health-popup-status{grid-column:2;grid-row:1;font-size:.8rem;white-space:nowrap}.sidebar-health-popup-status--red{color:var(--color-danger, #b91c1c);font-weight:600}.sidebar-health-popup-status--yellow{color:var(--color-warning, #b45309);font-weight:600}.sidebar-health-popup-summary{grid-column:2;grid-row:2;font-size:.78rem;color:var(--color-text-secondary, #475569)}.sidebar-health-popup-empty{font-size:.85rem;color:var(--color-text-secondary, #475569);font-style:italic;padding:8px 4px}.sidebar-health-popup-loading{display:flex;align-items:center;gap:10px;padding:12px 4px;font-size:.85rem;color:var(--color-text-secondary, #475569)}.sidebar-health-popup-spinner{display:inline-block;width:18px;height:18px;border:2px solid var(--color-border, #e2e8f0);border-top-color:var(--color-primary, #6366f1);border-radius:50%;animation:sidebar-health-popup-spin .8s linear infinite;flex-shrink:0}@keyframes sidebar-health-popup-spin{to{transform:rotate(360deg)}}.health-popup-floating{position:fixed;z-index:1000;width:420px;max-width:calc(100vw - 16px);background:var(--color-surface, #ffffff);color:var(--color-text, #0f172a);border:1px solid var(--color-border, #e2e8f0);border-radius:6px;padding:10px 12px;box-shadow:0 8px 24px #0000002e;pointer-events:auto;font-family:inherit;animation:health-popup-fade .12s ease-out}.health-popup-floating .health-popup-downgrade{background:var(--color-success-light, #dcfce7);color:var(--color-success, #16a34a);font-size:.74rem;padding:4px 8px;border-radius:4px;margin-bottom:8px;font-weight:500}.health-popup-floating .health-popup-concerns-list{margin:0;font-size:.82rem}@keyframes health-popup-fade{0%{opacity:0;transform:translateY(-2px)}to{opacity:1;transform:translateY(0)}}.health-popup-floating .health-popup-concerns{list-style:disc;margin:0 0 0 18px;padding:0;font-size:.82rem;color:var(--color-text-secondary, #475569)}.health-popup-floating .health-popup-concerns li{margin-bottom:4px;line-height:1.4}.health-popup-floating .health-popup-cta{margin-top:8px;padding-top:8px;border-top:1px solid var(--color-border, #e2e8f0);font-size:.78rem;color:var(--color-primary, #2563eb);font-style:italic}.supervision-alerts-popup{position:fixed;z-index:9990;background:var(--color-surface, #fff);border:1px solid var(--color-border, #e2e8f0);border-radius:6px;box-shadow:0 6px 18px #00000026;max-height:360px;display:flex;flex-direction:column;overflow:hidden}.supervision-alerts-popup .supervision-alerts-header{padding:8px 12px;font-size:.78rem;font-weight:600;color:var(--color-text);background:var(--color-surface-alt, #f8fafc);border-bottom:1px solid var(--color-border, #e2e8f0)}.supervision-alerts-popup .empty-hint{padding:12px;font-size:.8rem;color:var(--color-text-secondary, #64748b);font-style:italic}.supervision-alerts-popup .supervision-alerts-list{list-style:none;margin:0;padding:4px 0;overflow-y:auto;scrollbar-width:thin}.supervision-alerts-popup .supervision-alert-row{display:grid;grid-template-columns:80px 1fr;grid-template-rows:auto auto;gap:0 8px;padding:6px 12px;font-size:.78rem;border-bottom:1px solid var(--color-border, #e2e8f0);transition:background .1s}.supervision-alerts-popup .supervision-alert-row:last-child{border-bottom:none}.supervision-alerts-popup .supervision-alert-row:hover{background:var(--color-surface-alt, #f8fafc)}.supervision-alerts-popup .supervision-alert-state{grid-row:1 / 3;align-self:center;font-weight:600;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em}.supervision-alerts-popup .supervision-alert-row--critical .supervision-alert-state,.supervision-alerts-popup .supervision-alert-row--down .supervision-alert-state{color:#dc2626}.supervision-alerts-popup .supervision-alert-row--warning .supervision-alert-state,.supervision-alerts-popup .supervision-alert-row--unreachable .supervision-alert-state{color:#f59e0b}.supervision-alerts-popup .supervision-alert-row--unknown .supervision-alert-state,.supervision-alerts-popup .supervision-alert-row--other .supervision-alert-state{color:#94a3b8}.supervision-alerts-popup .supervision-alert-row--failed .supervision-alert-state{color:#dc2626}.supervision-alerts-popup .supervision-alert-row--running .supervision-alert-state{color:#3b82f6}.supervision-alerts-popup .supervision-alert-row--clickable{cursor:pointer}.supervision-alerts-popup .supervision-alert-row--clickable:hover{background:var(--color-surface-alt, #f8fafc)}.supervision-alerts-popup .supervision-alert-target{color:var(--color-text);font-weight:500;word-break:break-word}.supervision-alerts-popup .supervision-alert-output{grid-column:2;color:var(--color-text-secondary, #64748b);font-size:.72rem;display:block;word-break:break-word;white-space:pre-wrap}.mermaidTooltip{position:absolute;text-align:left;max-width:320px;padding:8px 12px!important;font-size:.82rem!important;font-family:inherit!important;line-height:1.4!important;background:var(--color-surface, #ffffff)!important;color:var(--color-text, #0f172a)!important;border:1px solid var(--color-border, #e2e8f0)!important;border-radius:6px!important;box-shadow:0 4px 12px #0000002e!important;pointer-events:none;z-index:100000!important;white-space:pre-line}.msg-bubble [data-md-clickable=bold]{cursor:pointer;border-bottom:1px dashed transparent;transition:border-color .12s ease,background .12s ease}.msg-bubble [data-md-clickable=bold]:hover{border-bottom-color:var(--color-primary, #6366f1);background:#6366f114;border-radius:3px}.msg-bubble .inline-action-btn{display:inline-flex;align-items:center;gap:3px;padding:1px 8px;margin:0 2px;font-size:.82em;font-family:inherit;line-height:1.4;vertical-align:baseline;background:var(--color-accent-soft, #dbeafe);border:1px solid var(--color-accent, #3b82f6);border-radius:999px;color:var(--color-accent-strong, #1e40af);cursor:pointer;transition:background .1s ease,transform .08s ease;white-space:nowrap}.msg-bubble .inline-action-btn:hover{background:var(--color-accent, #3b82f6);color:#fff}.msg-bubble .inline-action-btn:active{transform:scale(.96)}.msg-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:.74rem;color:var(--color-text-soft, #6b7280);padding:0 0 8px;margin-bottom:6px;border-bottom:1px dashed var(--color-border-soft, #e5e7eb)}.msg-meta-ts{font-variant-numeric:tabular-nums}.msg-meta-tokens{display:inline-flex;align-items:center;gap:3px;padding:1px 6px;background:#0000000a;border-radius:8px;font-variant-numeric:tabular-nums;cursor:help}.msg-meta-cost{display:inline-flex;align-items:center;padding:1px 6px;background:#6366f114;color:var(--color-primary, #6366f1);border-radius:8px;font-weight:600;font-variant-numeric:tabular-nums;cursor:help}.msg-rating{display:flex;align-items:center;justify-content:flex-end;gap:6px;margin-top:8px;padding:6px 0;font-size:.78rem}.msg-rating-label{color:var(--color-text-soft, #6b7280);margin-right:2px}.msg-rating-star{background:transparent;border:none;cursor:pointer;padding:0 2px;font-size:1.05rem;line-height:1;color:var(--color-border, #d1d5db);transition:color .12s,transform .08s}.msg-rating-star:hover{transform:scale(1.18)}.msg-rating-star--filled{color:#f59e0b}.msg-rating-star--preview{color:#f59e0b;opacity:.45}.msg-rating-value{margin-left:4px;font-size:.74rem;color:var(--color-text-soft, #6b7280);font-variant-numeric:tabular-nums}.msg-openings{display:flex;flex-direction:column;gap:4px;margin-top:8px;padding:8px 0 4px;border-top:1px dashed var(--color-border-soft, #e5e7eb)}.msg-openings-label{font-size:.72rem;font-weight:500;color:var(--color-text-soft, #6b7280);margin-bottom:2px;text-transform:uppercase;letter-spacing:.04em}.msg-opening-chip{display:block;width:100%;text-align:left;padding:5px 8px;font-size:.82rem;background:transparent;border:1px solid transparent;border-radius:4px;color:var(--color-accent, #2563eb);cursor:pointer;transition:background .12s ease,border-color .12s ease;line-height:1.35}.msg-opening-chip:hover:not(:disabled){background:var(--color-surface-alt, #f3f4f6);border-color:var(--color-accent, #3b82f6)}.msg-opening-chip:disabled{opacity:.5;cursor:not-allowed}.chat-side-panel{position:fixed;top:0;right:0;bottom:0;background:var(--color-bg);border-left:1px solid var(--color-border);box-shadow:-8px 0 24px #00000026;display:flex;flex-direction:column;padding:12px;z-index:1000;transform:translate(100%);transition:transform .28s cubic-bezier(.22,1,.36,1),width .22s cubic-bezier(.22,1,.36,1);overflow:hidden}body:has(.chat-side-panel--open) .grid-stack-item .ui-resizable-handle,body:has(.chat-side-panel--open) .grid-stack-item [class*=ui-resizable-],body:has(.chat-side-panel--open) .grid-stack-item .gs-resize-handle{display:none!important}.chat-side-panel--normal{width:min(560px,92vw)}.chat-side-panel--fullscreen{border-left:1px solid var(--color-border)}.chat-side-panel--open{transform:translate(0)}.chat-panel-resize{background:none;border:1px solid var(--color-border);border-radius:4px;padding:0 6px;height:24px;font-size:.85rem;line-height:1;color:var(--color-text-secondary);cursor:pointer;transition:background .12s,color .12s,border-color .12s}.chat-panel-resize:hover{background:var(--color-surface-alt);color:var(--color-text);border-color:var(--color-text-secondary)}.chat-panel-close{background:none;border:none;font-size:1.4rem;line-height:1;color:var(--color-text-secondary);cursor:pointer;padding:0 6px;border-radius:4px;transition:background .12s,color .12s}.chat-panel-close:hover{background:var(--color-surface-alt);color:var(--color-text)}.chat-fab{position:fixed;bottom:20px;right:20px;width:56px;height:56px;border-radius:50%;border:none;background:var(--color-primary, #3b82f6);color:#fff;font-size:1.5rem;cursor:pointer;z-index:60;box-shadow:0 4px 16px #3b82f666;display:flex;align-items:center;justify-content:center;transition:transform .18s,box-shadow .18s,right .28s cubic-bezier(.22,1,.36,1)}.chat-fab:hover{transform:scale(1.06);box-shadow:0 6px 20px #3b82f680}.chat-fab:active{transform:scale(.96)}.chat-fab--open{background:var(--color-text-secondary, #64748b);box-shadow:0 4px 12px #0003}.chat-fab--open:hover{box-shadow:0 6px 16px #0000004d}.chat-fab--open[data-panel-size=normal]{right:calc(min(560px,92vw) + 16px)}.chat-fab--open[data-panel-size=fullscreen]{display:none}.chat-fab-pulse{position:absolute;top:-4px;right:-4px;width:12px;height:12px;background:#ef4444;border-radius:50%;border:2px solid var(--color-bg);animation:chat-fab-pulse-anim 1.4s ease-in-out infinite}@keyframes chat-fab-pulse-anim{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.25);opacity:.7}}.block-title{font-size:.72rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em;margin:0 0 6px;flex-shrink:0}.chat-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;margin-bottom:8px;gap:8px}.chat-header-btns{display:flex;align-items:center;flex-wrap:wrap;gap:6px;row-gap:4px;justify-content:flex-end}.ia-model-select{font-size:.72rem;padding:2px 6px;border:1px solid var(--color-border);border-radius:4px;background:var(--color-surface);color:var(--color-text-secondary);max-width:220px;cursor:pointer}.ia-model-select:hover{background:var(--color-surface-alt)}.ia-model-select:focus{outline:none;border-color:var(--color-primary)}.env-switch{display:inline-flex;border:1px solid var(--color-border);border-radius:4px;overflow:hidden}.env-btn{background:var(--color-surface);border:none;padding:3px 8px;font-size:.7rem;font-weight:600;color:var(--color-text-secondary);cursor:pointer;line-height:1.3}.env-btn+.env-btn{border-left:1px solid var(--color-border)}.env-btn:hover{background:var(--color-surface-alt)}.env-btn--active{background:var(--color-primary);color:#fff}.mermaid-mode-select{padding:3px 6px;font-size:.78rem;line-height:1;border:1px solid var(--color-border);border-radius:4px;background:var(--color-surface);color:var(--color-text-secondary);cursor:pointer;opacity:.65;max-width:140px;transition:opacity .12s,background .12s,color .12s,border-color .12s}.mermaid-mode-select:hover{background:var(--color-surface-alt);opacity:.85}.mermaid-mode-select--active{opacity:1;background:var(--color-primary-light, #dbeafe);color:var(--color-primary, #3b82f6);border-color:var(--color-primary, #3b82f6)}.debug-btn{padding:3px 6px;font-size:.72rem;font-family:monospace;border:1px solid var(--color-border);border-radius:4px;background:var(--color-surface);color:var(--color-text-secondary);cursor:pointer}.debug-btn--active{background:var(--color-primary-light);border-color:var(--color-primary);color:var(--color-primary)}.debug-btn:hover{background:var(--color-surface-alt)}.attached-files{display:flex;flex-wrap:wrap;gap:4px;flex-shrink:0;padding:4px 0}.file-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 7px;border-radius:10px;font-size:.75rem;background:var(--color-surface-alt);border:1px solid var(--color-border);color:var(--color-text-secondary)}.file-chip--sent{background:#3b82f61a;border-color:var(--color-primary);color:var(--color-primary)}.file-chip-remove{background:none;border:none;cursor:pointer;color:var(--color-text-secondary);font-size:.9rem;padding:0;line-height:1}.file-chip-remove:hover{color:var(--color-danger)}.msg-files{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:4px;justify-content:flex-end}.msg-hint-badge{align-self:flex-end;font-size:.7rem;font-weight:500;color:#15803d;background:#22c55e1a;border:1px solid rgba(34,197,94,.35);padding:2px 7px;border-radius:10px;margin-bottom:3px;letter-spacing:.01em}.msg--hint .msg-bubble{background:#22c55e0f;border-color:#22c55e59;font-style:italic}.btn-attach{background:none;border:1px solid var(--color-border);border-radius:4px;padding:4px 7px;cursor:pointer;font-size:.9rem;color:var(--color-text-secondary);flex-shrink:0;align-self:flex-end}.btn-attach:hover{background:var(--color-surface-alt)}.chat-messages{flex:1;min-height:0;overflow-y:auto;padding:4px 0;display:flex;flex-direction:column;gap:8px}.msg{display:flex;flex-direction:column}.msg--user{align-items:flex-end}.msg--assistant{align-items:flex-start}.msg-bubble{max-width:90%;padding:7px 10px;border-radius:10px;font-size:.8rem;line-height:1.45;background:var(--color-surface-alt);border:1px solid var(--color-border)}.preflight-progress{margin-bottom:8px;padding:8px 10px;background:#a78bfa14;border-left:3px solid var(--color-primary, #a78bfa);border-radius:4px;font-size:.78rem}.preflight-progress-header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:4px}.preflight-progress-label{font-weight:600;color:var(--color-primary, #6d28d9)}.preflight-progress-phase{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--color-muted);font-style:italic}.preflight-progress-thoughts{margin:4px 0;color:var(--color-text-secondary);font-style:italic;line-height:1.4}.preflight-progress-needs{list-style:none;padding:0;margin:4px 0 0;display:flex;flex-direction:column;gap:2px}.preflight-progress-needs li{font-size:.74rem;color:var(--color-text-secondary)}.preflight-progress-needs code{background:var(--color-bg);padding:1px 6px;border-radius:3px;font-size:.74rem;color:var(--color-primary, #6d28d9)}.preflight-progress-need-arg{margin-left:4px;color:var(--color-muted);font-family:var(--font-mono, monospace);font-size:.72rem}.preflight-progress-status{font-size:.68rem;text-transform:uppercase;letter-spacing:.04em;padding:1px 8px;border-radius:10px;font-weight:600;border:1px solid transparent}.preflight-progress-status--observing{background:#60a5fa26;color:#2563eb;border-color:#60a5fa66}.preflight-progress-status--forming_hypothesis{background:#a78bfa26;color:#6d28d9;border-color:#a78bfa66}.preflight-progress-status--testing{background:#fbbf2426;color:#b45309;border-color:#fbbf2466}.preflight-progress-status--ready_to_answer{background:#22c55e26;color:#15803d;border-color:#22c55e66}.preflight-progress-status--stuck{background:#ef44441f;color:#b91c1c;border-color:#ef444466}.preflight-progress-playbooks{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin:4px 0;font-size:.74rem}.preflight-progress-playbooks-label{color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em;font-size:.68rem;margin-right:2px}.preflight-progress-playbook{background:#a78bfa1f;color:var(--color-primary, #6d28d9);padding:1px 8px;border-radius:10px;font-weight:600;font-size:.72rem;border:1px solid rgba(167,139,250,.35);cursor:help}.preflight-progress-playbook--default{background:#94a3b81f;color:var(--color-text-secondary, #475569);border-color:#94a3b859;font-weight:500;font-style:italic}.preflight-progress-confidence{margin:6px 0}.preflight-progress-confidence-label{display:flex;justify-content:space-between;align-items:center;font-size:.72rem;color:var(--color-text-secondary);margin-bottom:2px}.preflight-progress-confidence-value{font-weight:600;font-variant-numeric:tabular-nums}.preflight-progress-confidence-bar{height:6px;background:#0000000f;border-radius:3px;overflow:hidden}.preflight-progress-confidence-fill{height:100%;border-radius:3px;transition:width .3s ease,background .3s ease}.preflight-progress-confidence-fill--low{background:linear-gradient(90deg,#ef4444,#f87171)}.preflight-progress-confidence-fill--mid{background:linear-gradient(90deg,#f59e0b,#fbbf24)}.preflight-progress-confidence-fill--high{background:linear-gradient(90deg,#16a34a,#22c55e)}.preflight-progress-hypotheses{margin:6px 0}.preflight-progress-hypotheses-title{font-size:.72rem;font-weight:600;color:var(--color-text-secondary);margin-bottom:3px}.preflight-progress-hypotheses ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:3px}.preflight-progress-hypothesis{display:flex;align-items:flex-start;gap:6px;font-size:.74rem;line-height:1.35;padding:3px 6px;border-radius:3px;background:#fff6;border-left:2px solid transparent}.preflight-progress-hypothesis--testing{border-left-color:#60a5fa}.preflight-progress-hypothesis--partially_confirmed{border-left-color:#fbbf24}.preflight-progress-hypothesis--confirmed{border-left-color:#22c55e}.preflight-progress-hypothesis--refuted{border-left-color:#ef4444;opacity:.65;text-decoration:line-through}.preflight-progress-hypothesis-icon{flex:0 0 auto;line-height:1.2}.preflight-progress-hypothesis-text{flex:1;min-width:0;word-break:break-word}.preflight-progress-hypothesis-conf{flex:0 0 auto;font-variant-numeric:tabular-nums;font-size:.7rem;color:var(--color-muted);font-weight:600}.preflight-progress-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px;padding-top:6px;border-top:1px dashed var(--color-border)}.preflight-progress-done-banner{margin-top:8px;padding:5px 10px;border-top:1px dashed var(--color-border);font-size:.74rem;font-style:italic;color:#15803d;background:#22c55e14;border-radius:3px;border-left:2px solid #22c55e}.preflight-progress-action{font-size:.74rem;padding:3px 9px;border-radius:4px;border:1px solid var(--color-border);background:var(--color-bg, #fff);color:var(--color-text);cursor:pointer;font-weight:500;transition:background .15s ease,border-color .15s ease}.preflight-progress-action:hover:not(:disabled){background:#a78bfa14;border-color:var(--color-primary, #a78bfa)}.preflight-progress-action:disabled{opacity:.55;cursor:default}.preflight-progress-action--secondary{color:var(--color-text-secondary)}.preflight-progress-action--small{font-size:.72rem;padding:2px 8px}.preflight-progress-action--primary{background:var(--color-primary, #a78bfa);color:#fff;border-color:var(--color-primary, #a78bfa)}.preflight-progress-action--primary:hover:not(:disabled){background:var(--color-primary-hover, #8b5cf6);border-color:var(--color-primary-hover, #8b5cf6)}.preflight-progress-hint-tip{font-size:.72rem;color:var(--color-text-secondary);font-style:italic;align-self:center;cursor:help}.preflight-progress-hint-pending{margin-top:6px;font-size:.72rem;font-style:italic;color:#15803d;background:#22c55e14;padding:3px 8px;border-radius:3px;border-left:2px solid #22c55e}.preflight-progress-time-estimate{margin-top:8px;padding:8px 10px;background:#6366f112;border:1px solid rgba(99,102,241,.25);border-radius:6px;display:flex;flex-direction:column;gap:6px}.preflight-progress-time-estimate-header{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:.78rem}.preflight-progress-time-estimate-icon{font-size:.95rem}.preflight-progress-time-estimate-label{color:var(--color-text-secondary);font-weight:500}.preflight-progress-time-estimate-duration{font-weight:700;color:#4338ca;background:#6366f11f;padding:2px 8px;border-radius:10px}.preflight-progress-time-estimate-factors{display:flex;flex-wrap:wrap;gap:4px 6px}.preflight-progress-time-estimate-factor{font-size:.7rem;padding:2px 7px;border-radius:3px;background:#6366f114;color:var(--color-text-secondary);border:1px solid rgba(99,102,241,.2)}.preflight-progress-time-estimate-factor--complexity-low{background:#22c55e1a;color:#15803d;border-color:#22c55e4d}.preflight-progress-time-estimate-factor--complexity-medium{background:#f59e0b1a;color:#b45309;border-color:#f59e0b4d}.preflight-progress-time-estimate-factor--complexity-high{background:#ef44441a;color:#b91c1c;border-color:#ef44444d}.preflight-progress-time-estimate-factor--precision-precise{background:#22c55e1a;color:#15803d;border-color:#22c55e4d}.preflight-progress-time-estimate-factor--precision-approximate{background:#f59e0b1a;color:#b45309;border-color:#f59e0b4d}.preflight-progress-time-estimate-factor--precision-vague{background:#ef44441a;color:#b91c1c;border-color:#ef44444d}.preflight-progress-time-estimate-rationale{font-size:.74rem;color:var(--color-text-secondary);font-style:italic;line-height:1.35}.preflight-summary{margin:0 0 10px;padding:0;background:#6366f10a;border:1px solid rgba(99,102,241,.18);border-radius:6px;font-size:.78rem}.preflight-summary[open]{padding-bottom:8px}.preflight-summary-header{cursor:pointer;-webkit-user-select:none;user-select:none;list-style:none;display:flex;align-items:center;gap:8px;padding:6px 10px;font-weight:500;color:var(--color-text-secondary)}.preflight-summary-header::-webkit-details-marker{display:none}.preflight-summary-header:before{content:"▸";display:inline-block;transition:transform .15s;color:var(--color-text-secondary);font-size:.7rem}.preflight-summary[open] .preflight-summary-header:before{transform:rotate(90deg)}.preflight-summary-icon{font-size:.9rem}.preflight-summary-title{flex:1}.preflight-summary-confidence{font-size:.74rem;font-weight:600;color:var(--color-text-secondary)}.preflight-summary-body{padding:0 10px;display:flex;flex-direction:column;gap:8px}.msg-citations{margin-top:10px;padding-top:8px;border-top:1px dashed var(--color-border);font-size:.78rem}.msg-citations summary{cursor:pointer;color:var(--color-text-secondary);font-weight:600;padding:2px 0;-webkit-user-select:none;user-select:none}.msg-citations summary:hover{color:var(--color-text)}.msg-citations-list{list-style:none;padding:6px 0 0;margin:0;display:flex;flex-direction:column;gap:3px}.msg-citations-list li{display:flex;align-items:baseline;gap:8px;font-size:.76rem;color:var(--color-text-secondary)}.msg-citation-key{flex:0 0 auto;background:#a78bfa26;color:var(--color-primary, #6d28d9);padding:1px 6px;border-radius:3px;font-weight:600;font-size:.74rem;font-family:var(--font-mono, monospace)}.msg-citation-round{flex:0 0 auto;font-size:.7rem;color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em}.msg-citation-cached{flex:0 0 auto;font-size:.68rem;background:#22c55e1f;color:#15803d;padding:1px 6px;border-radius:8px;font-weight:600;cursor:help}.msg-citation-label{flex:1;min-width:0;font-family:var(--font-mono, monospace);font-size:.74rem;word-break:break-word}.msg--user .msg-bubble{background:var(--color-primary-light);border-color:var(--color-primary);color:var(--color-text);overflow-wrap:break-word}.msg-collapse summary{cursor:pointer;list-style:none;outline:none}.msg-collapse summary::marker,.msg-collapse summary::-webkit-details-marker{display:none}.msg-collapse summary:before{content:"▸";display:inline-block;width:.9em;font-size:.85em;transition:transform .15s;color:var(--color-text-secondary)}.msg-collapse[open]>summary:before{transform:rotate(90deg)}.msg-collapse-body{margin:6px 0 0;padding:6px 8px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:4px;font-size:.76rem;font-family:inherit;white-space:pre-wrap;overflow-wrap:break-word;max-height:400px;overflow-y:auto;color:var(--color-text-secondary)}.cursor{animation:blink 1s step-end infinite}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.msg-bubble code{background:#00000014;border-radius:3px;padding:1px 4px;font-family:monospace;font-size:.92em}.msg-bubble .code-block{margin:6px 0;border:1px solid var(--color-border);border-radius:6px;overflow:hidden}.msg-bubble .code-lang{background:var(--color-surface-alt);border-bottom:1px solid var(--color-border);padding:2px 10px;font-size:.72em;font-family:monospace;color:var(--color-text-secondary)}.msg-bubble pre{background:#1e1e1e;color:#d4d4d4;padding:8px 10px;margin:0;white-space:pre-wrap;overflow-wrap:break-word}.msg-bubble pre code{background:none;padding:0;font-size:.9em;color:inherit}.chat-input-row{display:flex;gap:8px;flex-shrink:0;margin-top:10px;border-top:1px solid var(--color-border);padding-top:10px;align-items:flex-end}.history-search-badge{display:flex;align-items:center;gap:8px;padding:6px 10px;margin-top:8px;background:color-mix(in srgb,var(--color-primary) 8%,var(--color-surface-alt));border:1px solid var(--color-primary-light, var(--color-border));border-radius:4px;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:.78rem;flex-wrap:wrap}.history-search-label{color:var(--color-text-secondary);flex-shrink:0}.history-search-query{color:var(--color-primary);font-weight:700}.history-search-match{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text)}.history-search-match--empty{font-style:italic;color:var(--color-muted)}.history-search-hint{font-family:var(--font-base, sans-serif);font-size:.7rem;color:var(--color-muted);white-space:nowrap}.tab-completion-popup{display:flex;flex-direction:column;gap:1px;margin-top:6px;padding:4px;background:var(--color-surface);border:1px solid var(--color-border);border-radius:4px;max-height:160px;overflow-y:auto;box-shadow:0 2px 6px #0000000f;font-family:ui-monospace,SF Mono,Menlo,Consolas,monospace;font-size:.78rem}.tab-completion-item{padding:3px 6px;border-radius:3px;cursor:default;color:var(--color-text)}.tab-completion-item--current{background:var(--color-primary-light, color-mix(in srgb, var(--color-primary) 12%, transparent));color:var(--color-primary);font-weight:600}.convo-search-bar{display:flex;align-items:center;gap:6px;padding:6px 10px;background:var(--color-surface-alt);border-bottom:1px solid var(--color-border);flex-shrink:0}.convo-search-input{flex:1;padding:4px 8px;border:1px solid var(--color-border);border-radius:4px;background:var(--color-surface);color:var(--color-text);font-size:.85rem}.convo-search-input:focus{outline:none;border-color:var(--color-primary)}.convo-search-counter{font-size:.75rem;color:var(--color-text-secondary);font-variant-numeric:tabular-nums;min-width:36px;text-align:center}.convo-search-btn{padding:2px 8px;border:1px solid var(--color-border);border-radius:4px;background:var(--color-surface);color:var(--color-text);cursor:pointer;font-size:.85rem}.convo-search-btn:hover:not(:disabled){background:var(--color-primary-light, color-mix(in srgb, var(--color-primary) 12%, transparent));border-color:var(--color-primary);color:var(--color-primary)}.convo-search-btn:disabled{opacity:.45;cursor:not-allowed}.msg--search-hit{outline:1px dashed var(--color-primary);outline-offset:-1px}.msg--search-current{outline-width:2px;outline-style:solid;box-shadow:0 0 0 4px color-mix(in srgb,var(--color-primary) 14%,transparent)}.chat-input{flex:1;padding:5px 9px;border:1px solid var(--color-border);border-radius:4px;font-size:.8rem;background:var(--color-surface);color:var(--color-text);resize:none}.chat-input:focus{outline:none;border-color:var(--color-primary)}.chat-input--placeholder{color:var(--color-muted);font-style:italic}.btn-send{background:var(--color-primary);color:#fff;border:none;border-radius:4px;padding:5px 12px;font-size:.875rem;cursor:pointer;align-self:flex-end}.btn-send:disabled{opacity:.45;cursor:not-allowed}.btn-send:not(:disabled):hover{opacity:.85}.btn-send--hint{background:#16a34a}.btn-send--hint:not(:disabled):hover{background:#15803d;opacity:1}.btn-send--stop{background:var(--color-danger, #dc2626)}.chat-error{flex-shrink:0;padding:6px 10px;font-size:.78rem;color:var(--color-danger);background:var(--color-danger-light);border-top:1px solid var(--color-danger);margin-top:4px;border-radius:0 0 4px 4px}.ia-max-tokens-banner{flex-shrink:0;display:flex;align-items:center;gap:8px;padding:6px 10px;font-size:.78rem;color:var(--color-warning, #b45309);background:var(--color-warning-light, #fef3c7);border-top:1px solid var(--color-warning, #b45309)}.btn-continue{font-size:.75rem;padding:3px 10px}.msg--assistant .msg-bubble .mermaid-render{position:relative}.msg--assistant .msg-bubble .mermaid-toolbar{position:absolute;top:6px;right:6px;display:flex;gap:2px;opacity:0;transition:opacity .15s;z-index:2}.msg--assistant .msg-bubble .mermaid-render:hover .mermaid-toolbar,.msg--assistant .msg-bubble .mermaid-toolbar:focus-within{opacity:1}.msg--assistant .msg-bubble .mermaid-tool-btn{background:var(--color-surface-alt, rgba(255,255,255,.92));border:1px solid var(--color-border);border-radius:4px;padding:0 6px;height:22px;font-size:.85rem;line-height:1;cursor:pointer;color:var(--color-text-secondary)}.msg--assistant .msg-bubble .mermaid-tool-btn:hover,.msg--assistant .msg-bubble .mermaid-tool-btn--pinned{background:var(--color-primary-light, #dbeafe);color:var(--color-primary, #3b82f6);border-color:var(--color-primary, #3b82f6)}.msg--assistant .msg-bubble .mermaid-tool-btn--pinned:hover{background:var(--color-danger-light, #fee2e2);color:var(--color-danger, #dc2626);border-color:var(--color-danger, #dc2626)}.md-collapse{margin:12px 0;border-left:2px solid var(--color-border, #e5e7eb);padding-left:10px}.md-collapse[open]{border-left-color:var(--color-primary, #6366f1)}.md-collapse-summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:6px;padding:4px 0;-webkit-user-select:none;user-select:none;font-weight:600;font-size:.95rem;color:var(--color-text-secondary, #6b7280)}.md-collapse-summary::-webkit-details-marker{display:none}.md-collapse-summary::marker{content:""}.md-collapse-chevron{display:inline-block;width:12px;flex-shrink:0;color:var(--color-muted, #9ca3af);font-size:.7rem;transition:transform .15s ease;transform:rotate(0)}.md-collapse-chevron:before{content:"▸"}.md-collapse[open]>.md-collapse-summary>.md-collapse-chevron{transform:rotate(90deg)}.md-collapse[open]>.md-collapse-summary{color:var(--color-text, #111827);margin-bottom:6px}.md-collapse-title{flex:1}.proposal-card{margin:12px 0;padding:12px 14px;background:linear-gradient(180deg,#6366f10f,#6366f105);border:1px solid rgba(99,102,241,.35);border-left:3px solid var(--color-primary, #6366f1);border-radius:8px;display:flex;flex-direction:column;gap:8px}.proposal-card .proposal-header{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.proposal-card .proposal-icon{font-size:1.05rem;line-height:1}.proposal-card .proposal-title{flex:1;font-weight:600;font-size:.92rem;color:var(--color-text, #111827)}.proposal-card .proposal-confidence{font-size:.72rem;font-weight:600;padding:2px 8px;border-radius:10px;white-space:nowrap}.proposal-card .proposal-confidence--high{background:#16a34a1f;color:#15803d}.proposal-card .proposal-confidence--medium{background:#f59e0b1f;color:#b45309}.proposal-card .proposal-confidence--low{background:#ef44441f;color:#b91c1c}.proposal-card .proposal-rationale{font-size:.85rem;line-height:1.45;color:var(--color-text-secondary, #4b5563);padding:4px 0}.proposal-card .proposal-changes-list,.proposal-card .proposal-changes-summary{margin:0;padding:6px 10px;background:#00000006;border-radius:6px;font-size:.84rem;line-height:1.45}.proposal-card .proposal-changes-list{list-style:disc inside}.proposal-card .proposal-change-note-only{padding:2px 0}.proposal-card .proposal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:4px}.proposal-card .proposal-btn{display:inline-flex;align-items:center;gap:4px;padding:5px 12px;font-size:.82rem;font-weight:500;background:var(--color-bg, #fff);color:var(--color-text, #111827);border:1px solid var(--color-border, #d1d5db);border-radius:5px;cursor:pointer;transition:all .12s}.proposal-card .proposal-btn:hover{background:var(--color-primary-light, #eef2ff);border-color:var(--color-primary, #6366f1)}.proposal-card .proposal-btn--primary{background:var(--color-primary, #6366f1);color:#fff;border-color:var(--color-primary, #6366f1)}.proposal-card .proposal-btn--primary:hover{filter:brightness(1.1);background:var(--color-primary, #6366f1)}.proposal-card .proposal-scope{font-size:.72rem;color:var(--color-muted, #9ca3af);font-family:var(--font-mono, monospace);margin-left:auto}.embed-placeholder{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;margin:.75rem 0;border:1px dashed var(--color-border, #d0d7de);border-radius:8px;background:var(--color-background-soft, #f6f8fa);color:var(--color-text-soft, #57606a);font-size:.9rem}.embed-placeholder-icon{font-size:1.1rem}.embed-placeholder-label code{background:var(--color-background, #fff);padding:.05em .4em;border-radius:3px;font-size:.92em}.embed-error{display:flex;align-items:flex-start;gap:.5rem;padding:.6rem .9rem;margin:.75rem 0;border:1px solid #f0c674;border-radius:8px;background:#fff8e1;color:#8a6d3b;font-size:.88rem}.embed-error-icon{line-height:1.4;flex-shrink:0}.embed-error-body{flex:1;min-width:0}.embed-error-message{font-weight:500}.embed-error-meta{margin-top:.3em;font-size:.82rem;color:#6e5a25}.embed-error-meta code{background:#0000000f;padding:.05em .4em;border-radius:3px;font-size:.95em}.embed-error-params{margin-top:.4em}.embed-error-params summary{cursor:pointer;font-size:.82rem;color:#6e5a25;-webkit-user-select:none;user-select:none}.embed-error-params summary:hover{text-decoration:underline}.embed-error-params pre{margin:.4em 0 0;padding:.5em .7em;background:#0000000f;border-radius:4px;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.75rem;line-height:1.4;max-height:240px;overflow:auto;white-space:pre}.embed-host{margin:.75rem 0}.debug-panel{display:flex;flex-direction:column;max-height:40vh;min-height:12rem;margin:.5rem .75rem 0;border:1px solid var(--color-border, #d0d7de);border-radius:8px;background:var(--color-background, #fff);overflow:hidden;flex-shrink:0}.debug-panel-header{display:flex;align-items:center;gap:.4rem;padding:.4rem .6rem;background:var(--color-background-soft, #f6f8fa);border-bottom:1px solid var(--color-border, #d0d7de);font-size:.85rem}.debug-panel-title{font-weight:600;display:flex;align-items:baseline;gap:.5rem}.debug-panel-nav-label{font-weight:400;font-size:.78rem;color:var(--color-text-soft, #57606a);font-variant-numeric:tabular-nums}.debug-panel-spacer{flex:1}.debug-panel-btn{border:1px solid var(--color-border-soft, #d0d7de);background:var(--color-background, #fff);border-radius:4px;padding:.15rem .5rem;font-size:.85rem;cursor:pointer;line-height:1}.debug-panel-btn:hover:not(:disabled){background:#eaeef2}.debug-panel-btn:disabled{opacity:.4;cursor:not-allowed}.debug-panel-body{flex:1;margin:0;padding:.5rem .75rem;overflow:auto;font-family:var(--font-mono, ui-monospace, "SF Mono", monospace);font-size:.78rem;line-height:1.4;white-space:pre;color:var(--color-text, #1f2328);background:var(--color-background, #fff)}
