:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:first baseline center;flex-direction:column;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}#app{width:100%;margin:0 auto;text-align:center}.logo{height:6em;padding:1.5em}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.preact:hover{filter:drop-shadow(0 0 2em #673ab8aa)}.card{padding:2em}.read-the-docs{color:#888}.login-container{display:flex;justify-content:center;align-items:center;height:100vh;background:#f5f6fa}.login-form{background:#fff;padding:2rem 2.5rem;border-radius:8px;box-shadow:0 2px 16px #00000014;display:flex;flex-direction:column;min-width:300px}.login-form h2{margin-bottom:1.5rem;text-align:center}.login-form input{margin-bottom:1rem;padding:.75rem;border:1px solid #ddd;border-radius:4px;font-size:1rem}.login-form button{padding:.75rem;background:#4f8cff;color:#fff;border:none;border-radius:4px;font-size:1rem;cursor:pointer;transition:background .2s}.login-form button:hover{background:#2563eb}.error{color:#e53e3e;margin-bottom:1rem;text-align:center;font-size:.95rem}.editor-container{margin:0}.editor-title{font-size:18px;font-weight:600;color:#374151;margin:0 0 16px;padding-bottom:8px;border-bottom:1px solid #e5e7eb}.condition-group{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:16px;margin-bottom:12px}.condition-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:16px}.condition-side{display:flex;align-items:center;gap:8px}.condition-side label{font-size:14px;font-weight:500;color:#374151;margin:0}.side-select{padding:6px 10px;border:1px solid #d1d5db;border-radius:4px;background:#fff;font-size:14px;min-width:80px}.condition-logic{display:flex;align-items:center;gap:8px}.condition-logic label{font-size:14px;font-weight:500;color:#374151;margin:0}.logic-select{padding:6px 10px;border:1px solid #d1d5db;border-radius:4px;background:#fff;font-size:14px;min-width:80px}.remove-button{background:#ef4444;color:#fff;border:none;padding:6px 12px;border-radius:4px;font-size:12px;cursor:pointer;transition:background-color .2s}.remove-button:hover{background:#dc2626}.rule-item{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:12px;margin-bottom:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center}.rule-select,.rule-input{padding:6px 10px;border:1px solid #d1d5db;border-radius:4px;font-size:14px;background:#fff;transition:border-color .2s,box-shadow .2s}.rule-select:focus,.rule-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f61a}.rule-select.column-select{min-width:140px}.rule-select.operator-select{min-width:80px}.rule-input.value-input{min-width:100px}.rule-select.interval-select{min-width:120px}.rule-input.position-input{min-width:80px}.add-button{background:#3b82f6;color:#fff;border:none;padding:8px 16px;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color .2s,transform .1s}.add-button:hover{background:#2563eb;transform:translateY(-1px)}.add-button:active{transform:translateY(0)}.add-rule-button{background:#10b981;color:#fff;border:none;padding:6px 12px;border-radius:4px;font-size:12px;font-weight:500;cursor:pointer;margin-top:8px;transition:background-color .2s}.add-rule-button:hover{background:#059669}.rules-container{margin-top:8px}.analysis-item{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:12px;margin-bottom:8px;display:flex;flex-direction:column;gap:12px}.analysis-group{display:flex;flex-direction:column;gap:4px}.analysis-label{font-size:12px;font-weight:500;color:#6b7280;margin:0}.analysis-select,.analysis-input{padding:6px 10px;border:1px solid #d1d5db;border-radius:4px;font-size:14px;background:#fff;min-width:120px;transition:border-color .2s,box-shadow .2s}.analysis-select:focus,.analysis-input:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px #3b82f61a}.parameters-section{width:100%;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:12px;margin-top:8px}.parameters-title{font-size:14px;font-weight:600;color:#374151;margin:0 0 12px;padding-bottom:6px;border-bottom:1px solid #e5e7eb}.parameters-section .analysis-group{margin-bottom:8px}.parameters-section .analysis-group:last-child{margin-bottom:0}@media (max-width: 768px){.rule-item{flex-direction:column;align-items:stretch}.rule-select,.rule-input,.analysis-select,.analysis-input{width:100%;min-width:unset}.condition-header{flex-direction:column;gap:12px;align-items:stretch}}.strategy-creator{background:#fff;border-radius:12px;box-shadow:0 4px 6px #0000001a;padding:32px;margin-bottom:24px}.strategy-creator h3{margin:0 0 24px;color:#1f2937;font-size:24px;font-weight:600;border-bottom:2px solid #e5e7eb;padding-bottom:12px}.strategy-form{display:flex;flex-direction:column;gap:24px}.form-section{background:#f8fafc;border-radius:8px;padding:20px;border:1px solid #e2e8f0}.section-title{font-size:16px;font-weight:600;color:#374151;margin:0 0 16px;display:flex;align-items:center;gap:8px}.section-title:before{content:"";width:4px;height:16px;background:#3b82f6;border-radius:2px}.form-row{display:flex;flex-wrap:wrap;gap:16px;align-items:center}.form-group{display:flex;flex-direction:column;gap:6px}.form-group label{font-size:14px;font-weight:500;color:#374151;margin:0}.form-group input,.form-group select{padding:8px 12px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;transition:border-color .2s,box-shadow .2s;background:#fff}.form-group input:focus,.form-group select:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.form-group input[type=checkbox]{width:auto;margin:0;transform:scale(1.2)}.checkbox-group{display:flex;align-items:center;gap:8px}.checkbox-group label{margin:0;cursor:pointer}.input-small{width:100px}.input-medium{width:150px}.input-large{width:200px}.submit-button{background:#3b82f6;color:#fff;border:none;padding:12px 24px;border-radius:8px;font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s,transform .1s;align-self:flex-start}.submit-button:hover{background:#2563eb;transform:translateY(-1px)}.submit-button:active{transform:translateY(0)}.editor-wrapper{background:#fff;border-radius:6px;padding:16px;border:1px solid #e2e8f0;box-shadow:0 1px 3px #0000000d}.editors-section{display:flex;flex-direction:column;gap:16px}@media (max-width: 768px){.form-row{flex-direction:column;align-items:stretch}.form-group input,.form-group select{width:100%}.strategy-creator{padding:20px}}.backtest-chart-outer{width:100%;display:flex;flex-direction:column;gap:12px}.backtest-chart-container{width:40%;float:left;box-sizing:border-box}.chart-top{width:100%}.results-row{display:flex;flex-direction:row;width:100%;align-items:stretch;gap:16px}.strategy-creator{width:100%;background:#f9f9f9;padding:24px;box-sizing:border-box;margin-bottom:16px}.strategy-panel{width:45%;background:#f1f1f1;padding:24px;box-sizing:border-box;border-radius:8px 0 0 8px}.stats-container,.returns-summary{margin-top:0;color:#282642}.results-row .stats-panel{width:55%;height:600px;background:#f1f1f1;padding:24px;box-sizing:border-box;overflow:auto}.stats-panel{display:flex;flex-direction:column;height:100%}.results-spacer{display:none}.tabs{display:flex;margin:16px 0}.tabs button{flex:unset;padding:6px 20px;margin:0 6px;background:transparent;color:#a0a1aa;border:none;border-radius:999px;border-bottom:2px solid transparent;cursor:pointer;transition:background .2s,border-bottom .2s,color .2s;font-size:1rem;min-width:0;display:inline-block}.tabs button.active,.tabs button:focus{background:#fff;color:#282642;outline:none}.returns-summary ul,.stats-container ul{color:#282642;padding-left:20px;list-style:none;margin:0}.returns-summary li,.stats-container li{margin-bottom:4px}.insights-tabs{display:flex;margin-bottom:12px;gap:8px}.insights-tabs button{padding:4px 16px;background:#ececf6;color:#6c6c8a;border:none;border-radius:999px;cursor:pointer;font-size:.98rem;transition:background .2s,color .2s}.insights-tabs button.active,.insights-tabs button:focus{background:#fff;color:#282642;outline:none;font-weight:600}.insights-content{background:#fff;border-radius:8px;padding:16px 14px;min-height:120px;color:#282642;font-size:1rem;box-shadow:0 1px 2px #2826420a;margin-top:8px;overflow:auto;max-height:none;text-align:left}.stats-panel>.returns-summary,.stats-panel>.stats-container,.stats-panel>.insights-container{flex:1 1 auto;min-height:0;overflow:auto}.insights-container{display:flex;flex-direction:column}.markdown-body h1,.markdown-body h2,.markdown-body h3{margin-top:1em;margin-bottom:.5em;font-weight:600}.markdown-body ul,.markdown-body ol{margin-left:1.2em;margin-bottom:.7em}.markdown-body li{margin-bottom:.3em}.markdown-body code{background:#f4f4f8;padding:2px 5px;border-radius:4px;font-size:.95em}.markdown-body pre{background:#f4f4f8;padding:10px;border-radius:6px;overflow-x:auto;margin-bottom:1em}.markdown-body p{margin-bottom:.7em}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:#fff;border-radius:8px;max-width:500px;width:90%;max-height:80vh;overflow-y:auto;box-shadow:0 4px 16px #0003}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;border-bottom:1px solid #eee}.modal-header h3{margin:0;color:#282642}.close-button{background:none;border:none;font-size:1.5rem;cursor:pointer;color:#666;padding:0;width:30px;height:30px;display:flex;align-items:center;justify-content:center}.close-button:hover{color:#000}.modal-body{padding:1.5rem}.backtest-info{margin-bottom:1.5rem;padding:1rem;background:#f8f9fa;border-radius:4px}.backtest-info h4{margin:0 0 .75rem;color:#282642}.backtest-info p{margin:.25rem 0;font-size:.9rem}.options-section{margin-bottom:1.5rem}.options-section h4{margin:0 0 1rem;color:#282642}.checkbox-group{display:flex;align-items:flex-start;margin-bottom:.75rem;gap:.5rem}.checkbox-group input[type=checkbox]{margin-top:.25rem}.checkbox-group label{flex:1;line-height:1.4}.modal-actions{display:flex;justify-content:flex-end;gap:.75rem;margin-top:1.5rem;padding-top:1rem;border-top:1px solid #eee}.modal-actions button{padding:.5rem 1rem;border:1px solid #ddd;border-radius:4px;cursor:pointer;font-size:.9rem}.modal-actions button[type=button]{background:#fff;color:#666}.modal-actions button[type=submit]{background:#007bff;color:#fff;border-color:#007bff}.modal-actions button:disabled{opacity:.6;cursor:not-allowed}.modal-actions button[type=submit]:not(:disabled):hover{background:#0056b3}.error-message{padding:.75rem;background:#f8d7da;color:#721c24;border:1px solid #f5c6cb;border-radius:4px}.history-list-item{cursor:pointer;transition:background-color .2s}.history-list-item:hover{background-color:#007bff1a}.history-list-item.selected{background-color:#007bff33;border-left:3px solid #007bff}
