:root{--ink:#16253d;--muted:#64738b;--line:#e0e6ee;--accent:#275de6;--red:#b83a45;--green:#13845e;--bg:#f5f7fb;--surface:#fff}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif}button,input,select{font:inherit}button{cursor:pointer;min-height:43px;border-radius:11px;border:1px solid #ced8e8;background:#fff;color:var(--ink);font-weight:750;padding:10px 15px}button:disabled{opacity:.43;cursor:not-allowed}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #94b2fc;outline-offset:3px}a{color:inherit}h1,h2,h3,h4,p{margin-top:0}h1{font-size:29px;letter-spacing:-1px;margin-bottom:5px;line-height:1.16}h2{font-size:18px;letter-spacing:-.35px;margin:0 0 3px}h3{font-size:15px;margin:0}.head{background:#fff;border-bottom:1px solid var(--line)}.head-in{max-width:990px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px}.brand{display:flex;align-items:center;gap:10px}.brand-icon{width:37px;height:37px;border-radius:11px;background:#2b5de0;color:#fff;display:grid;place-items:center;font-weight:800;font-size:21px}.brand strong,.brand small{display:block;line-height:1.2}.brand strong{font-size:16px}.brand small{font-size:11px;color:var(--muted);margin-top:3px}.head nav{display:flex;gap:5px;background:#f4f7fc;border-radius:11px;padding:4px}.head nav a{font-size:12px;text-decoration:none;padding:8px 11px;border-radius:8px;font-weight:700;white-space:nowrap;color:#68778e}.head nav a.active{color:#2154bb;background:#fff;box-shadow:0 1px 3px #1c376016}.shell{max-width:990px;margin:auto;padding:23px 20px 50px}.intro{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.intro p:last-child{color:var(--muted);font-size:13px;margin:0}.eyebrow{font-size:10px;color:#6179a6;letter-spacing:1.1px;font-weight:800;margin:0 0 6px}.refresh{min-height:34px;padding:7px 10px;white-space:nowrap;font-size:12px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;margin-bottom:15px;box-shadow:0 2px 14px #1f355009}.panel-head{display:flex;align-items:start;justify-content:space-between;gap:10px;margin-bottom:15px}.panel-head p{color:var(--muted);font-size:12px;margin:0}.state{display:inline-block;border-radius:18px;padding:6px 10px;color:#475b75;background:#ecf1f8;font-size:11px;font-weight:800;white-space:nowrap}.state.running{background:#e8f3ed;color:#23714f}.state.finished{background:#edf2fa;color:#456083}.state.paused{background:#fff3e3;color:#956022}.fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.fields label{font-size:12px;font-weight:750;color:#485b74}.fields input,.fields select{display:block;width:100%;padding:10px 11px;min-height:43px;margin-top:5px;border:1px solid #cdd8e8;border-radius:9px;background:#fbfcff;color:#13263d;font-weight:750;font-size:16px}.fields small{display:block;font-weight:400;font-size:10px;color:#75849a;margin-top:5px}.timeframes{margin:14px 0 0;border:1px solid var(--line);border-radius:10px}.timeframes summary{padding:10px 13px;font-size:12px;font-weight:750;cursor:pointer}.timeframes summary span{font-weight:400;color:var(--muted);margin-left:7px}.tf-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;padding:0 13px 13px}.tf-grid label{border:1px solid var(--line);border-radius:7px;background:#f8faff;padding:7px;display:flex;align-items:center;gap:5px;justify-content:center;font-weight:650;font-size:12px}.tf-grid input{accent-color:var(--accent)}.source-line{margin:10px 0 13px;color:#697991;font-size:11px}.actions{display:grid;grid-template-columns:1.1fr .8fr 1fr;gap:8px}.actions button{font-size:14px;padding:10px 8px}.primary{background:#275de6;border-color:#275de6;color:white}.stop{border-color:#e8bfc3;color:#9b303e;background:#fff9f9}.reset{border-color:#bfd0eb;color:#285cb2;background:#f3f7fd}.hint{font-size:11px;color:#6c7d94;line-height:1.6;margin:11px 0 0}.finishing{margin-top:8px}.finishing summary{font-size:12px;color:#57709b;cursor:pointer;padding:7px 0}.finishing p{font-size:12px;color:var(--muted)}.finishing button{font-size:12px}.progress-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:4px 0 12px}.progress-row>div{background:#f7f9fc;border-radius:10px;padding:11px 12px}.progress-row small{display:block;color:#687993;font-size:11px;line-height:1.2}.progress-row strong{display:block;font-size:20px;letter-spacing:-.6px;margin-top:6px;font-variant-numeric:tabular-nums}.live-dot{height:9px;width:9px;border-radius:50%;background:#a0aabe;margin:7px}.live-dot.on{background:#1aa978;box-shadow:0 0 0 4px #e5f8ef}progress{display:block;width:100%;height:8px;accent-color:#2964dd;border-radius:10px}.activity{font-size:13px;color:#425977;font-weight:700;margin:13px 0 7px}.events{list-style:none;padding:0;margin:0;max-height:146px;overflow:auto}.events li{font-size:12px;padding:6px 0;border-top:1px solid #f0f3f7;color:#61728a;display:flex;gap:10px}.events time{font-size:11px;flex-shrink:0;color:#91a0b5}.top-count{background:#ecf3ff;border-radius:16px;color:#3460ae;padding:6px 10px;font-weight:800;font-size:11px}.verdict{border:1px solid #dfe5ef;background:#f7f9fc;border-radius:10px;padding:11px 13px;margin-bottom:12px;font-size:12px;color:#465b76;line-height:1.5}.verdict strong{display:block;font-size:14px;margin-bottom:3px;color:#253b59}.verdict.fail{border-color:#e7c4c8;background:#fff9f9}.verdict.fail strong{color:#aa3441}.verdict.pass{border-color:#b7e1cb;background:#f4faf7}.verdict.pass strong{color:#1a754e}.verdict .final-coins{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.verdict .final-coins div{padding:8px;border:1px solid #e6eaf1;background:white;border-radius:8px}.verdict .final-coins b{font-weight:850;margin-right:7px}.legend{display:flex;gap:13px;color:#708097;font-size:11px;margin-bottom:10px}.top-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.top-card{border:1px solid #dce5ef;border-radius:12px;padding:13px;min-width:0}.top-card:first-child{border-color:#9fb9ec;background:#fbfcff}.top-card header{display:flex;justify-content:space-between;align-items:start;gap:8px;margin-bottom:9px}.top-card header strong{font-size:14px}.top-card header small{display:block;color:#6d7d93;font-size:11px;margin-top:2px}.top-card .rank{height:25px;width:25px;border-radius:8px;background:#ebf1fb;display:grid;place-items:center;color:#315eae;font-size:12px;font-weight:850;flex-shrink:0}.top-card .market{display:grid;grid-template-columns:36px minmax(0,1fr) minmax(0,1fr);align-items:center;gap:7px;border-top:1px solid #edf1f6;padding:8px 0}.top-card .market span{font-size:12px;color:#41536b;font-weight:850}.top-card .market b{font-size:13px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;line-height:1.35}.top-card .market b::before{display:block;color:#8895a7;font-weight:500;font-size:9px}.top-card .market .train::before{content:"Nauka · 60%"}.top-card .market .dev::before{content:"Test · 20%"}.up{color:#13845e}.down{color:#c13d50}.top-card .approved{font-size:10px;color:#4c6584;margin:8px 0 0}.top-card details{border-top:1px solid #edf1f6;padding-top:7px;margin-top:5px}.top-card summary{font-size:11px;font-weight:650;color:#285ba9;cursor:pointer}.top-card details p{color:#6a7990;font-size:11px;margin:7px 0 0}.empty{font-size:13px;color:#6d7c91;background:#f7faff;border-radius:9px;padding:16px;grid-column:1/-1}.footnote{font-size:11px;color:#7a879b;margin:13px 0 0;line-height:1.6}.closing{text-align:center;color:#7c899a;font-size:11px;margin-top:10px}.notice{padding:12px 14px;border:1px solid #c9d7ee;background:#eaf1fc;border-radius:10px;color:#315281;font-size:13px;margin-bottom:12px}.notice.error{border-color:#f1bec7;color:#9a2c3d;background:#fff5f6}[hidden]{display:none!important}.auth-cover{position:fixed;inset:0;background:#0e22436b;z-index:100;display:grid;place-items:center;padding:16px}.auth-box{width:min(100%,360px);background:#fff;border-radius:14px;padding:22px;box-shadow:0 14px 45px #0e1e343b}.auth-box h2{font-size:20px}.auth-box p{font-size:13px;color:var(--muted)}.auth-box input{width:100%;border:1px solid #cbd7e8;border-radius:9px;min-height:45px;padding:10px;margin-bottom:10px}.auth-actions{display:flex;gap:9px;justify-content:flex-end}
@media(max-width:740px){.shell{padding:19px 12px 50px}.head-in{padding:12px}.head nav a{font-size:11px;padding:8px}.intro{align-items:start}.intro h1{font-size:25px}.intro p:last-child{font-size:12px}.refresh{font-size:11px}.panel{padding:14px 12px;border-radius:14px}.panel-head h2{font-size:18px}.fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.fields label:first-child{grid-column:1/-1}.fields label:first-child small{font-size:10px}.fields input,.fields select{min-height:41px}.tf-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.actions button{font-size:12px}.progress-row{gap:6px}.progress-row>div{padding:9px 8px}.progress-row small{font-size:10px}.progress-row strong{font-size:18px}.top-list{grid-template-columns:1fr}.top-card{padding:12px}.top-card .market{grid-template-columns:35px minmax(0,1fr) minmax(0,1fr)}.verdict .final-coins{grid-template-columns:1fr}.verdict .final-coins div{display:flex;justify-content:space-between;gap:8px}}@media(max-width:360px){.actions{grid-template-columns:1fr 1fr}.actions .reset{grid-column:1/-1}.head nav a{padding:7px 6px}.intro .refresh{padding:6px;font-size:10px}.top-card .market b{font-size:12px}}

/* Shadow diagnostic: the holdout never drives fitness or ranking. */
.top-card .market{grid-template-columns:35px repeat(3,minmax(0,1fr));gap:5px}
.top-card .market .shadow::before{content:"Shadow · 20%"}
.top-card .market .shadow{font-weight:850}
.top-card .approved.shadow-bad{color:#aa3647}
.top-card .approved.shadow-ok{color:#177851}
.top-card .shadow-details{font-size:11px;line-height:1.7;border-top:1px solid #e8edf4;padding-top:8px}
.shadow-notice{font-size:11px;color:#687891;margin:9px 0 0;line-height:1.65}
.legend{flex-wrap:wrap;gap:8px 15px}
@media(max-width:740px){
 .top-card .market{grid-template-columns:30px repeat(3,minmax(0,1fr));gap:3px}
 .top-card .market b{font-size:12px;letter-spacing:-.25px}
 .top-card .market b::before{font-size:9px}
 .top-card .market span{font-size:11px}
}
@media(max-width:380px){
 .top-card .market{grid-template-columns:27px repeat(3,minmax(0,1fr))}
 .top-card .market b{font-size:11px}
 .top-card .market b::before{font-size:8px}
}

/* Explicit day counts beside each train/development/shadow period. */
.top-card .market .train::before{content:"60% nauka · " attr(data-days) " dni"}
.top-card .market .dev::before{content:"20% rozwój · " attr(data-days) " dni"}
.top-card .market .shadow::before{content:"20% shadow · " attr(data-days) " dni"}
.top-card .market b::before{line-height:1.25;min-height:24px;white-space:normal}
.legend{font-size:12px;line-height:1.55;font-weight:700;color:#536887}
@media(max-width:740px){
 .top-card .market b::before{font-size:9px;min-height:27px}
 .top-card .market b{font-size:12px}
}

.risk-info{margin:0 0 12px;padding:10px 12px;border:1px solid #c7dddb;border-radius:10px;color:#216d58;background:#eff9f4;font-size:12px;line-height:1.55;font-weight:650}

/* Responsive controls for engine and coin selectors on Android. */
.coin-select{display:block;width:100%;min-width:0;max-width:100%;margin:0 0 12px;color:#485b74;font-size:12px;font-weight:750}
.coin-select select{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:47px;margin-top:6px;padding:10px 34px 10px 12px;border:1px solid #cdd8e8;border-radius:10px;background:#fbfcff;color:#14273f;font-family:inherit;font-size:14px;font-weight:700;appearance:none;-webkit-appearance:none;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;background-image:linear-gradient(45deg,transparent 50%,#64748b 50%),linear-gradient(135deg,#64748b 50%,transparent 50%);background-position:calc(100% - 18px) 20px,calc(100% - 13px) 20px;background-size:5px 5px;background-repeat:no-repeat}
@media(max-width:740px){.coin-select select{font-size:15px;max-width:100%;padding-right:30px}.coin-select{overflow:hidden}.panel{min-width:0}.fields{min-width:0}}


/* Distinct LONG/SHORT scanning ranges; mobile-first, no horizontal overflow. */
.threshold-picker{margin:15px 0 4px;padding:14px;border:1px solid #cfdae9;border-radius:12px;background:#f8fbff}
.threshold-picker h3{font-size:14px;font-weight:800;color:#263d5e;margin:0 0 10px}
.threshold-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.threshold-block{background:#fff;border:1px solid #dce5f1;border-radius:10px;padding:12px;min-width:0}
.threshold-block>label{display:block;color:#315d9d;font-size:13px;font-weight:800;margin-bottom:7px}
.threshold-block select{width:100%;max-width:100%;min-width:0;border:1px solid #cad8eb;background:#fff;border-radius:8px;min-height:44px;font-size:14px;padding:8px 6px}
.threshold-minmax{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.threshold-minmax label{font-size:11px;color:#566c89;font-weight:750;min-width:0}
.threshold-minmax input{display:block;width:100%;min-width:0;min-height:43px;font-weight:780;font-size:16px;border:1px solid #cad8eb;border-radius:8px;background:white;padding:8px;margin-top:4px}
.threshold-hint{font-size:11px;line-height:1.55;color:#71839d;margin:11px 0 0}
@media(max-width:530px){.threshold-columns{grid-template-columns:1fr;gap:9px}.threshold-picker{padding:11px}.threshold-block{padding:10px}.threshold-block select{font-size:15px}}

.full-history{border-top:1px solid #dce5f2;padding-top:18px;margin-top:18px}.full-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.full-history h3{margin:0;font-size:17px}.full-history progress{width:100%;height:10px}.full-history-message{font-size:13px;color:#405674}.full-history-scroll{overflow-x:auto}.full-history table{width:100%;border-collapse:collapse;font-size:12px;text-align:right}.full-history th,.full-history td{padding:11px 9px;border-bottom:1px solid #e1e8f2;white-space:nowrap}.full-history th:first-child{text-align:left}.full-history thead{color:#63738a}.full-history-total{font-weight:800;background:#f0f5ff}.full-history-years{display:flex;gap:15px;flex-wrap:wrap;margin-top:15px;font-size:13px}.full-history-previous{margin-top:18px}.full-history-previous summary{cursor:pointer;font-weight:650;padding:10px 0}

/* Threshold strategy builder: optional groups remain compact on phones. */
.base-badge{display:inline-block;margin-left:7px;padding:3px 7px;border-radius:6px;font-size:10px;background:#e4f3e9;color:#21694d;vertical-align:middle;white-space:nowrap}
.profile-fields{display:grid;grid-template-columns:1.35fr .8fr 1.2fr;gap:10px;margin-top:13px}
.profile-fields label{min-width:0;font-size:11px;font-weight:750;color:#4c6281}
.profile-fields select{display:block;width:100%;min-width:0;min-height:45px;margin-top:5px;padding:8px;border:1px solid #c8d6e8;border-radius:8px;background:white;color:#213956;font-size:13px}
.threshold-rule{margin:13px 0 0;background:#eaf1fd;border-left:3px solid #3266d4;padding:10px;border-radius:4px 8px 8px 4px;color:#294d87;font-size:12px;font-weight:750}
.optional-strategy{margin:20px 0 14px}.optional-strategy>h3{font-size:16px}.option-intro{font-size:12px;color:#65758c;margin:7px 0 12px;line-height:1.65}
.profile-presets{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:13px}.profile-presets button{min-height:39px;font-size:12px;padding:8px 11px;border-color:#c5d6ef;background:#f5f8ff;color:#2856a0}
.optional-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;align-items:start}
.option-group{min-width:0;border:1px solid #dbe4f0;border-radius:10px;background:#fcfdff;overflow:hidden}
.option-group summary{cursor:pointer;font-size:12px;font-weight:750;color:#304a70;padding:13px 11px;line-height:1.6}
.option-group summary span{float:right;font-size:10px;font-weight:600;color:#6d7e97;background:#edf2f9;border-radius:5px;padding:1px 5px;margin-left:5px}
.option-group[open] summary{border-bottom:1px solid #e4ebf5;background:#f2f6fd}
.option-group p{font-size:11px;color:#6a7b93;margin:10px 11px 7px;line-height:1.6}
.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:10px}.choices-wide{grid-template-columns:1fr}
.choice{display:flex;align-items:center;gap:7px;min-height:40px;padding:7px;border:1px solid #e0e7f1;border-radius:7px;background:#fff;cursor:pointer;min-width:0;font-size:11px;line-height:1.4;color:#415a7b}
.choice:has(input:checked){border-color:#88a9e5;background:#edf4ff;color:#214d94}.choice input{margin:0;width:17px;height:17px;flex-shrink:0;accent-color:#275de6}.choice span{overflow-wrap:anywhere}
.option-footnote{font-size:11px;color:#6a7b93;line-height:1.7;margin:11px 2px}
.search-preview{padding:14px;background:#f0f6ff;border:1px solid #bdd2f0;border-radius:11px}.search-preview strong{font-size:15px;color:#254f8d;display:block}.search-preview p{font-size:12px;color:#536a8b;margin:6px 0 11px;line-height:1.6}.search-preview button{font-size:12px;min-height:38px;padding:8px 10px}.search-preview>span{display:block;margin-top:6px;font-size:11px;color:#476b55}
.research-banner{margin:0 0 13px;padding:12px;border:1px solid #e6ca99;border-radius:10px;background:#fff8ec;color:#805c27;font-size:12px;line-height:1.6}
.budget-settings{border:1px solid #e1e7f0;border-radius:10px;margin:13px 0;padding:0 11px 10px}.budget-settings summary{font-weight:750;font-size:12px;padding:10px 0;cursor:pointer}.budget-settings .fields{padding-top:5px}
@media(max-width:700px){.profile-fields{grid-template-columns:1fr 1fr}.profile-fields label:first-child{grid-column:1/-1}.optional-grid{grid-template-columns:1fr}.choices{grid-template-columns:repeat(4,minmax(0,1fr))}.choices-wide{grid-template-columns:1fr}.choice{min-height:44px;font-size:12px}.option-group summary{font-size:13px}.profile-presets{display:grid;grid-template-columns:1fr 1fr}.profile-presets button{font-size:12px;padding:9px 5px}.base-badge{margin:5px 0 0}.threshold-picker h3{line-height:1.7}}
@media(max-width:380px){.choices{grid-template-columns:repeat(3,minmax(0,1fr))}.choices-wide{grid-template-columns:1fr}.profile-fields{grid-template-columns:1fr}.profile-fields label:first-child{grid-column:auto}.option-group summary span{font-size:9px}.search-preview strong{font-size:13px}}

.form-context{margin:0 0 15px;padding:11px 12px;border:1px solid #d7e3f3;background:#f5f9ff;border-radius:9px;font-size:12px;line-height:1.65;color:#49658b}
