/* Options Lab uses the shared theme and remains usable without a chart library. */
.opt-view { --opt-accent:#8a9eff;--opt-scenario:#e8b86a;--opt-radius:12px;min-width:0;padding:24px; }
.opt-view.active { display:block;overflow:auto; }
.opt-view [hidden] { display:none!important; }
.opt-view *, .opt-view *::before, .opt-view *::after { box-sizing:border-box; }
.opt-view h1 { font-size:29px;letter-spacing:-.7px;margin:5px 0 7px; }
.opt-view h2 { font-size:16px;letter-spacing:-.2px;margin:0 0 8px; }
.opt-view h3 { font-size:13px;margin:22px 0 12px; }
.opt-view p { line-height:1.6; }
.opt-view button,.opt-view input,.opt-view select { font:inherit;font-size:12px;color:var(--text-primary);border:1px solid var(--border);border-radius:7px;background:var(--bg-primary);min-height:36px;padding:8px 10px;max-width:100%; }
.opt-view input[type=number] { font-variant-numeric:tabular-nums; }
.opt-view input[type=range] { padding:0;accent-color:var(--opt-accent);border:0;min-height:24px;width:100%; }
.opt-view button { cursor:pointer;transition:background .15s,border-color .15s; }
.opt-view button:hover { background:var(--bg-tertiary);border-color:var(--opt-accent); }
.opt-view button:disabled { opacity:.45;cursor:default; }
.opt-view :focus-visible { outline:2px solid var(--opt-accent);outline-offset:3px; }
.opt-view label { display:flex;flex-direction:column;gap:6px;font-size:11px;color:var(--text-muted); }
.opt-view .opt-primary { background:var(--opt-accent);border-color:var(--opt-accent);color:#101527;font-weight:700; }
.opt-heading,.opt-card-head,.opt-actions,.opt-toolbar { display:flex;align-items:center;justify-content:space-between;gap:12px; }
.opt-heading { align-items:flex-start;margin-bottom:22px; }
.opt-heading p { font-size:13px;margin:0;color:var(--text-muted); }
.opt-eyebrow { font-size:10px;font-weight:650;letter-spacing:1.8px;color:var(--opt-accent); }
.opt-badge { display:inline-block;vertical-align:middle;font-size:9px;font-weight:650;letter-spacing:1px;color:var(--opt-accent);background:color-mix(in srgb,var(--opt-accent) 12%,transparent);padding:5px 8px;border:1px solid color-mix(in srgb,var(--opt-accent) 30%,transparent);border-radius:5px; }
.opt-actions { justify-content:flex-end;flex-wrap:wrap; }
.opt-context { display:flex;align-items:flex-end;gap:15px;flex-wrap:wrap;padding:16px 18px;border:1px solid var(--border);border-radius:var(--opt-radius);background:var(--bg-secondary); }
.opt-context input { width:130px; }.opt-context select { min-width:100px; }
.opt-feed { display:flex;flex-direction:column;gap:7px;margin-left:auto;align-self:center;min-width:150px;text-align:right;font-size:11px;color:var(--text-muted); }
.opt-dot { color:var(--opt-accent);font-size:10px;font-weight:650;letter-spacing:.8px; }
.opt-dot.live { color:var(--green); }.opt-dot.stale { color:var(--opt-scenario); }
.opt-stages { display:flex;gap:5px;margin:18px 0 8px;padding:4px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:10px;width:max-content;max-width:100%; }
.opt-stages button { border:0;background:transparent;color:var(--text-muted);padding:11px 18px; }
.opt-stages button[aria-current] { background:var(--bg-tertiary);color:var(--text-primary); }
.opt-stages button span { color:var(--opt-accent);font-size:10px;margin-right:9px;font-variant-numeric:tabular-nums; }
.opt-status { min-height:22px;margin:9px 0 14px;color:var(--text-muted);font-size:12px; }.opt-status.error { color:var(--red); }
.opt-card { min-width:0;background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--opt-radius);padding:18px; }
.opt-card-head { margin-bottom:15px;align-items:flex-start; }.opt-card-head h2 { margin:0; }
.opt-card-head p { margin:5px 0 0; }.opt-card-head>label { min-width:90px; }
.opt-build-grid { display:grid;grid-template-columns:235px minmax(0,1fr);gap:18px;align-items:start; }
.opt-builder-main { display:flex;flex-direction:column;gap:16px;min-width:0; }
.opt-template-card { position:sticky;top:0; }.opt-template-card .opt-card-head { flex-direction:column;gap:2px; }
.opt-full-label { margin:12px 0; }.opt-templates { display:flex;flex-direction:column;gap:7px;max-height:610px;overflow:auto; }
.opt-templates button { text-align:left;padding:11px 12px;background:transparent; }.opt-templates button.selected { border-color:var(--opt-accent);background:color-mix(in srgb,var(--opt-accent) 8%,var(--bg-secondary)); }
.opt-templates strong,.opt-templates small { display:block; }.opt-templates small { color:var(--text-muted);font-size:10px;line-height:1.5;margin-top:5px; }
.opt-name-label { flex:1;max-width:370px; }.opt-name-label input { font-size:15px;font-weight:600; }
.opt-muted,.opt-note { color:var(--text-muted);font-size:11px; }.opt-note { margin:10px 0; }
.opt-table-wrap { max-width:100%;overflow:auto; }.opt-table { width:100%;border-collapse:collapse;white-space:nowrap;font-size:11px;font-variant-numeric:tabular-nums; }
.opt-table th { color:var(--text-muted);font-size:10px;font-weight:500;text-align:right;padding:10px 9px;border-bottom:1px solid var(--border); }
.opt-table td { text-align:right;padding:10px 9px;border-bottom:1px solid var(--border); }.opt-table th:first-child,.opt-table td:first-child { text-align:left; }
.opt-leg-table input { width:90px;min-width:78px;padding:7px; }.opt-leg-table input[data-field=contracts] { width:70px;min-width:60px; }.opt-leg-table input[data-field=iv] { width:65px;min-width:60px; }.opt-leg-table select { padding:7px; }
.opt-leg-table small { display:block;color:var(--text-muted);font-size:9px;max-width:100px;overflow:hidden;text-overflow:ellipsis;margin-top:5px; }
.opt-buy { color:var(--green)!important; }.opt-sell { color:var(--red)!important; }
.opt-toolbar { flex-wrap:wrap;justify-content:flex-start;margin-top:14px; }.opt-toolbar label { min-width:135px; }.opt-toolbar input { width:145px; }
.opt-costs { margin-top:15px;border-top:1px solid var(--border);padding-top:14px; }.opt-costs summary,.opt-assumptions summary { color:var(--text-muted);font-size:11px;cursor:pointer; }
.opt-metrics { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px; }
.opt-metric { padding:14px 15px;background:var(--bg-secondary);border:1px solid var(--border);border-radius:9px;min-width:0; }
.opt-metric span { display:block;font-size:10px;color:var(--text-muted); }.opt-metric strong { display:block;font-size:22px;letter-spacing:-.45px;font-weight:600;margin:8px 0 4px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }.opt-metric small { display:block;font-size:9px;color:var(--text-muted);line-height:1.5; }
.opt-positive { color:var(--green); }.opt-negative { color:var(--red); }
.opt-chart { width:100%;min-width:0;min-height:80px; }.opt-chart svg { display:block;width:100%;height:auto;max-height:350px;overflow:visible; }.opt-chart-small svg { max-height:235px; }
.opt-chart text { font:11px system-ui,sans-serif;fill:var(--text-muted); }.opt-chart .opt-gridline { stroke:var(--border);stroke-width:1; }.opt-chart .opt-zero { stroke:var(--text-muted);stroke-dasharray:4 5;opacity:.7; }
.opt-chart .opt-reference { stroke:var(--text-muted);stroke-dasharray:3 5;opacity:.5; }.opt-chart .opt-crosshair { stroke:var(--text-muted);stroke-dasharray:2 4; }
.opt-chart-caption { min-height:22px;color:var(--text-muted);font-size:11px;margin:4px 0 0; }
.opt-legend { display:flex;justify-content:center;gap:23px;flex-wrap:wrap;font-size:10px;color:var(--text-muted); }.opt-legend span::before { content:"";display:inline-block;width:17px;height:2px;background:var(--green);margin-right:7px;vertical-align:middle; }.opt-key-today::before { background:var(--opt-accent)!important; }.opt-key-scenario::before { background:var(--opt-scenario)!important; }
.opt-scenario-controls { display:grid;grid-template-columns:1fr 1fr;gap:25px;margin-top:20px;border-top:1px solid var(--border);padding-top:15px; }.opt-scenario-controls output { color:var(--text-primary);font-size:12px; }
.opt-analytics-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:18px 0; }
.opt-mini-metrics { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;font-size:10px;color:var(--text-muted);margin-top:12px; }.opt-mini-metrics strong { display:block;font-size:13px;color:var(--text-primary);margin-top:6px; }
.opt-heatmap { width:100%;border-spacing:4px;white-space:nowrap;font-size:10px;text-align:center; }.opt-heatmap th { color:var(--text-muted);padding:7px;font-weight:500; }.opt-heatmap td { min-width:57px;padding:15px 5px;border-radius:5px;color:var(--text-primary);font-variant-numeric:tabular-nums; }
.opt-assumptions { margin-top:16px; }.opt-assumptions ul,.opt-assumption-list { font-size:11px;color:var(--text-muted);line-height:1.75;padding-left:18px; }
.opt-chain-strike { background:var(--bg-tertiary);font-weight:700;color:var(--text-primary); }.opt-chain-actions { display:flex;gap:5px;justify-content:flex-end; }.opt-chain-actions button { min-height:28px;font-size:10px;padding:4px 7px; }
.opt-test-grid,.opt-paper-grid { display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;align-items:start; }
.opt-form-stack { display:flex;flex-direction:column;gap:15px;margin-top:20px; }.opt-form-stack>button { margin-top:7px; }
.opt-empty { min-height:390px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px dashed var(--border);border-radius:var(--opt-radius);padding:30px;text-align:center; }.opt-empty-symbol { font-size:64px;color:var(--opt-accent);font-weight:200; }.opt-empty p { max-width:370px;color:var(--text-muted);font-size:12px; }
.opt-test-result { min-width:0; }.opt-test-result>.opt-card { margin-bottom:18px; }.opt-test-result>.opt-metrics { margin-bottom:18px; }.opt-test-result h2 { margin-bottom:8px; }
.opt-saved-list { display:flex;flex-direction:column;gap:8px;margin:14px 0; }.opt-saved-list>button { display:flex;align-items:center;justify-content:space-between;gap:15px;text-align:left;padding:13px; }.opt-saved-list strong { display:block;font-size:12px; }.opt-saved-list small { display:block;font-size:10px;color:var(--text-muted);line-height:1.6;margin-top:4px; }.opt-saved-list>button.selected { border-color:var(--opt-accent); }
.opt-paper-state { display:inline-block;background:var(--bg-tertiary);border-radius:5px;padding:4px 7px;font-size:10px;color:var(--opt-accent); }
.opt-modal { position:fixed;inset:0;z-index:450;display:flex;align-items:center;justify-content:center;background:#080b14ba;padding:20px; }
.opt-modal-card { width:680px;max-width:100%;max-height:90vh;overflow:auto;background:var(--bg-secondary);border:1px solid var(--border);border-radius:15px;padding:23px;box-shadow:0 22px 70px #0006; }
.opt-modal-card h2 { font-size:20px; }.opt-modal-card>label { max-width:180px; }.opt-modal-card>.opt-primary { width:100%;margin-top:8px; }
.opt-ticket-dl { display:grid;grid-template-columns:1fr 1fr;gap:13px;font-size:12px;margin:18px 0; }.opt-ticket-dl dt { color:var(--text-muted); }.opt-ticket-dl dd { margin:0;text-align:right;font-variant-numeric:tabular-nums; }
@media(min-width:1700px) { .opt-metrics { grid-template-columns:repeat(6,minmax(0,1fr)); }.opt-build-grid { grid-template-columns:260px minmax(0,1fr); } }
@media(max-width:1150px) { .opt-build-grid { grid-template-columns:190px minmax(0,1fr); }.opt-view { padding:17px; }.opt-card { padding:14px; }.opt-analytics-grid { grid-template-columns:1fr; }.opt-paper-grid,.opt-test-grid { grid-template-columns:260px minmax(0,1fr); }.opt-metric strong { font-size:19px; } }
@media(max-width:760px) { .opt-heading { flex-direction:column;gap:17px; }.opt-heading h1 { font-size:26px; }.opt-build-grid,.opt-test-grid,.opt-paper-grid { grid-template-columns:1fr; }.opt-template-card { position:static; }.opt-templates { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:190px; }.opt-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.opt-stages { width:100%; }.opt-stages button { flex:1;padding:10px 7px;font-size:11px; }.opt-stages button span { display:block;margin:0 0 5px; }.opt-context { gap:12px; }.opt-context>label { flex:1;min-width:120px; }.opt-context input { width:100%; }.opt-feed { flex-basis:100%;text-align:left; }.opt-scenario-controls { gap:16px; }.opt-view input:not([type=range]),.opt-view select { font-size:16px; }.opt-view button { min-height:40px; }.opt-view .opt-chain-actions button { min-height:34px; }.opt-table input { font-size:13px!important; }.opt-mini-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }.opt-modal { padding:12px; }.opt-modal-card { padding:18px; }.opt-chart text { font-size:11px; } }
@media(prefers-reduced-motion:reduce) { .opt-view button { transition:none; } }
