:root{--bg-body: #0a0a0b;--text-body: #ededef;--text-heading: #ededef;--text-muted: #8a8a8e;--text-muted-hover: #ededef;--text-faint: #4a4a4e;--text-faint-alt: #6a6a6e;--bg-surface: #141415;--bg-surface-alt: #1a1a1c;--border: #1e1e20;--border-hover: #3a3a3e;--btn-primary-bg: #6e56cf;--btn-primary-bg-hover: #7c66d4;--btn-primary-text: #fff;--btn-ghost-text: #8a8a8e;--btn-ghost-border: #1e1e20;--btn-ghost-text-hover: #ededef;--error-text: #f87171;--error-bg: rgba(248, 113, 113, .08);--hover-overlay: rgba(255, 255, 255, .05);--selected-bg: rgba(110, 86, 207, .1);--selected-border: #6e56cf;--sql-highlight-bg: rgba(110, 86, 207, .25);--sql-highlight-text: #c4b5fd;--sql-badge-bg: rgba(110, 86, 207, .15);--sql-badge-text: #c4b5fd;--sql-indicator: #6e56cf;--time-bar-bg: #1e1e20;--tree-border: #1e1e20;--focus-border: #6e56cf}[data-theme=light]{--bg-body: #f5f5f7;--text-body: #1a1a1b;--text-heading: #1a1a1b;--text-muted: #6b6b6f;--text-muted-hover: #1a1a1b;--text-faint: #8a8a8e;--text-faint-alt: #7a7a7e;--bg-surface: #ffffff;--bg-surface-alt: #f0f0f2;--border: #d4d4d8;--border-hover: #a1a1a5;--btn-primary-bg: #6e56cf;--btn-primary-bg-hover: #5b43b8;--btn-primary-text: #fff;--btn-ghost-text: #6b6b6f;--btn-ghost-border: #d4d4d8;--btn-ghost-text-hover: #1a1a1b;--error-text: #dc2626;--error-bg: rgba(220, 38, 38, .08);--hover-overlay: rgba(0, 0, 0, .05);--selected-bg: rgba(110, 86, 207, .12);--selected-border: #6e56cf;--sql-highlight-bg: rgba(110, 86, 207, .2);--sql-highlight-text: #6e56cf;--sql-badge-bg: rgba(110, 86, 207, .1);--sql-badge-text: #6e56cf;--sql-indicator: #6e56cf;--time-bar-bg: #e4e4e8;--tree-border: #d4d4d8;--focus-border: #6e56cf}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg-body);color:var(--text-body);min-height:100vh;transition:background-color .15s,color .15s}.app{max-width:1400px;margin:0 auto;padding:clamp(1rem,3vw,2rem) clamp(.75rem,3vw,2rem)}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem}header h1{font-size:clamp(1.125rem,2vw,1.5rem);font-weight:600;color:var(--text-heading);transition:color .15s}.header-actions{display:flex;align-items:center;gap:.75rem}.header-link{color:var(--text-muted);font-size:.8125rem;text-decoration:none;transition:color .15s}.header-link:hover{color:var(--text-muted-hover)}.theme-toggle{padding:.25rem .5rem;font-size:1.125rem;line-height:1;background:transparent;border:1px solid var(--border);border-radius:6px;cursor:pointer;color:var(--text-muted);transition:border-color .15s,color .15s;display:flex;align-items:center;justify-content:center}.theme-toggle:hover{border-color:var(--border-hover);color:var(--text-muted-hover)}.plan-input{display:flex;flex-direction:column;gap:.75rem}.plan-input-hint{font-size:.75rem;color:var(--text-faint);line-height:1.5}.plan-input-hint code{font-family:SF Mono,Fira Code,monospace;font-size:.6875rem;color:var(--text-faint-alt);background:var(--bg-surface-alt);padding:.1rem .3rem;border-radius:3px;transition:background-color .15s,color .15s}.plan-input-label{font-size:.75rem;font-weight:500;color:var(--text-muted)}.plan-input textarea{width:100%;min-height:clamp(200px,40vh,400px);padding:1rem;font-family:SF Mono,Fira Code,monospace;font-size:.8125rem;line-height:1.5;background:var(--bg-surface);color:var(--text-body);border:1px solid var(--border);border-radius:8px;resize:vertical;transition:background-color .15s,color .15s,border-color .15s}.plan-input textarea.sql-query-input{min-height:auto}.plan-input textarea:focus{outline:none;border-color:var(--focus-border)}.plan-input textarea::placeholder{color:var(--text-faint)}.btn-primary{padding:.5rem 1.25rem;font-size:.875rem;font-weight:500;color:var(--btn-primary-text);background:var(--btn-primary-bg);border:none;border-radius:6px;cursor:pointer;transition:background .15s}.btn-primary:hover:not(:disabled){background:var(--btn-primary-bg-hover)}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.btn-ghost{padding:.5rem 1.25rem;font-size:.875rem;font-weight:500;color:var(--btn-ghost-text);background:transparent;border:1px solid var(--btn-ghost-border);border-radius:6px;cursor:pointer;transition:border-color .15s,color .15s}.btn-ghost:hover{border-color:var(--border-hover);color:var(--btn-ghost-text-hover)}.plan-input-actions{display:flex;flex-direction:row;gap:.5rem}.error{color:var(--error-text);font-size:.875rem;padding:.5rem;background:var(--error-bg);border-radius:6px;transition:background-color .15s,color .15s}.result-toolbar{margin-bottom:1rem}.result-layout{display:flex;gap:1rem;align-items:flex-start}.result-tree{flex:1;min-width:0;overflow-x:auto}.result-detail{width:clamp(260px,25vw,360px);flex-shrink:0;position:sticky;top:1rem}.plan-tree{font-size:.8125rem}.tree-node-header{display:flex;align-items:center;gap:.4rem;padding:.3rem .5rem;border-radius:4px;cursor:pointer;transition:background .1s}.tree-node-header:hover{background:var(--hover-overlay)}.tree-node-header.selected{background:var(--selected-bg);border-left:2px solid var(--selected-border);padding-left:calc(.5rem - 2px)}.tree-toggle{width:1rem;flex-shrink:0;text-align:center;font-size:.625rem;color:var(--text-muted);user-select:none}.tree-node-label{white-space:nowrap;font-weight:500;color:var(--text-body);transition:color .15s}.tree-node-stats{display:flex;gap:.5rem;margin-left:auto;white-space:nowrap}.tree-stat{color:var(--text-muted);font-size:.75rem;font-variant-numeric:tabular-nums}.tree-time-bar{width:clamp(40px,5vw,80px);height:4px;flex-shrink:0;background:var(--time-bar-bg);border-radius:2px;overflow:hidden;transition:background-color .15s}.tree-time-bar-fill{height:100%;border-radius:2px;transition:width .2s}.tree-children{padding-left:1.25rem;border-left:1px solid var(--tree-border);margin-left:.5rem;transition:border-color .15s}.node-detail{background:var(--bg-surface);border:1px solid var(--border);border-radius:8px;padding:1rem;transition:background-color .15s,border-color .15s}.node-detail h3{font-size:.875rem;font-weight:600;color:var(--text-body);margin-bottom:.75rem;transition:color .15s}.node-detail-empty{color:var(--text-muted);font-size:.8125rem}.detail-section{margin-bottom:.75rem}.detail-section:last-child{margin-bottom:0}.detail-section-title{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-faint);padding:.25rem 0;margin-bottom:.25rem;border-bottom:1px solid var(--border);transition:color .15s,border-color .15s}.node-detail-table{width:100%;border-collapse:collapse;font-size:.8125rem}.node-detail-table tr{border-bottom:1px solid var(--border)}.node-detail-table tr:last-child{border-bottom:none}.metric-label{padding:.3rem .5rem .3rem 0;color:var(--text-muted);white-space:nowrap;vertical-align:top;transition:color .15s}.metric-value{padding:.3rem 0;color:var(--text-body);text-align:right;font-variant-numeric:tabular-nums;transition:color .15s}.sql-display{margin-bottom:1rem;background:var(--bg-surface);border:1px solid var(--border);border-radius:8px;overflow:hidden;transition:background-color .15s,border-color .15s}.sql-display-header{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-faint);padding:.5rem .75rem;border-bottom:1px solid var(--border);transition:color .15s,border-color .15s}.sql-display-code{padding:.75rem;margin:0;font-family:SF Mono,Fira Code,monospace;font-size:.8125rem;line-height:1.6;color:var(--text-body);white-space:pre-wrap;word-break:break-word;overflow-x:auto;transition:color .15s}.sql-display-code code{font-family:inherit}.sql-highlight{background:var(--sql-highlight-bg);color:var(--sql-highlight-text);border-radius:2px;padding:.05rem .15rem;transition:background .15s,color .15s}.tree-sql-indicator{font-family:SF Mono,Fira Code,monospace;font-size:.625rem;color:var(--sql-indicator);opacity:.6;flex-shrink:0}.detail-sql-fragments{display:flex;flex-wrap:wrap;gap:.35rem;padding:.25rem 0}.detail-sql-fragment{font-family:SF Mono,Fira Code,monospace;font-size:.75rem;color:var(--sql-badge-text);background:var(--sql-badge-bg);padding:.15rem .4rem;border-radius:3px;transition:background-color .15s,color .15s}@media(max-width:768px){.app{padding:1rem .75rem}header{flex-direction:row;flex-wrap:wrap;gap:.5rem}header h1{font-size:1.125rem}.result-layout{flex-direction:column}.result-detail{width:100%;position:static}.tree-node-label{white-space:normal;word-break:break-word}.tree-time-bar{width:40px}.plan-input textarea{font-size:.875rem}}
