/* FINBORS calculator: one light canvas for the site and the portable copy. */
:root,body{color-scheme:light;--bg:#f2f6fa;--panel:#fff;--panel2:#edf3fa;--border:#cbd7e6;--text:#172a46;--muted:#52647c;--blue:#1559b7;--orange:#b74b25;--green:#147452;--red:#b73149}
html{background:var(--bg)}
body{background:radial-gradient(ellipse at 85% 0%,#dfeaf8 0,transparent 48rem),var(--bg);color:var(--text);min-height:100vh}
.app-shell{background:transparent}
body .topbar{height:auto;min-height:64px;border-color:var(--border);gap:12px}
body:has(>finbors-header) .app-shell>.topbar{min-height:58px}
body .panel{background:var(--panel);color:var(--text);box-shadow:0 8px 28px #17335209}
body :is(.intro h1,.panel-heading h2,.flow-step-title h3,.instrument-search>span,.market-picker-head strong,.field>span,.specs summary,.trade-options summary,.manual-instrument summary){color:var(--text)}
body :is(.intro-text,.topbar-label,.live-tag,.hint,.summary-note,.auto-rate,.cash-cap,.instrument-help,.instrument-status,.symbol-field>span,.tick-help,.field-help,.market-picker-head span,.spec-save-status,.footnote,.footer,.language-control){color:var(--muted)}
body :is(.market-picker,.manual-instrument,.specs,.trade-options){background:#f5f8fc;border-color:var(--border)}
body :is(.field input,.field select,.language-control select){background-color:#fff;color:var(--text);border-color:#9aacc3}
body .field input:disabled{background-color:#edf3fa;opacity:1;color:var(--muted)}
body .market-picker .field select option{background:#fff;color:var(--text)}
body .instrument-search input::placeholder{color:#62748b}
body .field input.needs-input{background:#fff4ee;color:#7c2e1e;border-color:#b64a2d}
body :is(.flow-step+.flow-step,.partial-fields,.topbar){border-color:var(--border)}
body .flow-step-title>span{background:#e4eefb;color:#1559b7}
body .instrument-matches{background:#fff;border-color:#9aacc3;box-shadow:0 12px 25px #17335216}
body .instrument-matches button{color:var(--text);border-color:#d7e1ed}
body .instrument-matches button:is(:hover,:focus-visible,[data-active=true]){background:#173b6c;color:#fff}
body :is(.account-quick button,.direction-button){background:#edf3fa;color:#284567;border-color:#9aacc3}
body :is(.account-quick button[aria-pressed=true],.direction-button.active){background:#173b6c;color:#fff;border-color:#173b6c}
body .direction-button.active#sell{background:#7d3145;border-color:#7d3145;color:#fff}
body :is(.channel-link,.footer a,.intro-offline,.retry-rate,.offline-single,.dialog-channel,.result-actions a,#finbors-tool-footer a){color:var(--blue);text-underline-offset:3px}
body :is(.channel-link:hover,.footer a:hover,.intro-offline:hover,.result-actions a:hover){color:#113e79}
body :is(.install-button,.spec-actions button,.result-actions button,.app-update button){background:#fff;color:#214976;border-color:#a9bdd5;min-height:44px}
body :is(.install-button:hover,.spec-actions button:hover,.result-actions button:hover,.app-update button:hover){background:#e4eefb;color:#173b6c;border-color:#6386b0}
body .spec-actions #deleteSpecs{background:transparent;color:var(--muted);border-color:#9aacc3}
body .result-panel .panel-heading{min-height:54px;padding-block:14px;background:#f8fafd}
body .result-symbol{color:var(--muted)}
body .hero-result{background:linear-gradient(120deg,#e8f1fc,#f5f9ff);border-color:#b0c9e9}
body .hero-result .metric-label{color:#315a85;letter-spacing:.08em}
body .hero-value strong{color:#173b6c}
body :is(.hero-value span,.hero-result p){color:#45627f}
body :is(.risk-strip,.margin-strip,.margin-note,.metric-label,.metric small,.distance,.distance span,.distance-note,.execution-note,.assumptions,.result-footer){color:var(--muted)}
body :is(.risk-strip strong,.margin-strip strong,.distance strong){color:var(--text)}
body .metric{background:#f8fafd;border-color:var(--border)}
body :is(.partial-breakdown,.derivative-result){background:#f0f5fb;border-color:var(--border);color:#284567}
body #calculation-formula{color:var(--muted);background:#f5f8fc;border:1px solid var(--border);border-radius:10px;padding:10px 14px;margin:16px 0}
body #calculation-formula summary{color:var(--text);min-height:44px;cursor:pointer}
body .result-actions{justify-content:space-between;flex-wrap:wrap;gap:8px 12px;margin-top:12px}
body .result-actions a{font-size:13px;min-height:44px;display:inline-flex;align-items:center}
body .copy-status{color:var(--green)}
body .warning{color:#774115;background:#fff6e6;border-color:#d5ae78}
body .error{color:#92243a;background:#fff0f2;border-color:#d8a1ab}
body .result-footer{background:#f8fafd}
body .app-update{background:#e8f1fc;color:#234568;border-color:#a7c3e4}
body .install-dialog{background:#fff;color:var(--text);border-color:#a9bdd5;box-shadow:0 24px 80px #17335240}
body .install-dialog::backdrop{background:#172a4673}
body .dialog-head button{color:var(--muted);min-width:44px;min-height:44px}
body .install-dialog p{color:var(--muted)}
body .offline-download{background:#173b6c;color:#fff}
body .offline-download:hover{background:#234f85}
body :is(button,a,summary,select):focus-visible{outline:3px solid #1559b7;outline-offset:3px}
body .field :is(input,select):focus{border-color:#1559b7;box-shadow:0 0 0 3px #1559b71a}
@media(max-width:600px){
 body .intro{padding-block:20px}
 body .intro-text{font-size:14px;line-height:1.55}
 body .field>span{font-size:14px}
 body .field-grid.three input{font-size:16px;padding-inline:13px}
 body .metric-label{font-size:11px;letter-spacing:.06em}
 body :is(.distance-note,.execution-note,.assumptions,.margin-note,.result-footer,.footnote){font-size:13px;line-height:1.6}
 body .language-control select{font-size:16px;min-height:44px}
 body .install-button{font-size:13px;padding:10px 14px}
 body .footer{font-size:12px;line-height:1.6}
}
@media print{html,body{background:#fff!important}.panel{box-shadow:none!important}.result-panel{position:static}}

/* Stable shared navigation space before and after its upgrade; fallback links remain visible without JavaScript. */
finbors-header{display:block;min-height:125px;background:#fff}@media(max-width:1279px){finbors-header{min-height:190px}}@media(max-width:760px){finbors-header{min-height:220px}}

.scenario-workspace{max-width:1200px;margin:32px auto;padding:24px;background:#fff;border:1px solid #d4dfeb;border-radius:12px;color:#172a46}.scenario-workspace header{display:flex;justify-content:space-between;gap:24px;align-items:flex-start}.scenario-workspace h2{font-size:24px;margin:0 0 10px}.scenario-workspace p{font-size:14px;line-height:1.7}.scenario-workspace button{min-height:44px;padding:10px 16px;font:inherit;font-size:14px;font-weight:700;border:1px solid #becde0;background:#fff;color:#172a46;border-radius:8px;cursor:pointer}.scenario-workspace #scenarioSave{background:#ff914c;border-color:#ff914c;flex:none}.scenario-name{display:grid;gap:8px;max-width:380px;font-size:14px;margin:16px 0}.scenario-name input{font:inherit;font-size:16px;min-height:46px;padding:10px;border:1px solid #bacade;border-radius:8px;width:100%;box-sizing:border-box;background:#fff;color:#172a46}.scenario-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.scenario-card{padding:20px;border:1px solid #cbd9ea;border-radius:10px;background:#f7faff;min-width:0}.scenario-card h3{margin:0;font-size:20px;overflow-wrap:anywhere}.scenario-card .scenario-symbol{color:#526881}.scenario-card dl{margin:16px 0}.scenario-card dl>div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-top:1px solid #dce5f0;font-size:14px}.scenario-card dt{color:#526881}.scenario-card dd{margin:0;text-align:right;font-weight:700;overflow-wrap:anywhere;max-width:60%}.scenario-card pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;line-height:1.7;max-width:100%;margin-top:12px}.scenario-card summary{cursor:pointer;min-height:44px;font-size:14px;padding-top:10px}.scenario-controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.scenario-workspace :is(button,input):focus-visible{outline:3px solid #2455cc;outline-offset:3px}@media(max-width:760px){.scenario-workspace{margin:24px 12px;padding:20px}.scenario-workspace header{flex-direction:column;gap:12px}.scenario-list{grid-template-columns:1fr}.scenario-card{padding:18px}}
