/* iMarketSignals P123 model pages; all rules scoped to .p123 */
.p123{--ink:#0b0b0b;--ink2:#52514e;--rule:#e6e5e0;--axis:#c3c2b7;--btn:#f0efec;
 --model:#0b0b0b;--b1:#9a9890;--b2:#eb6834;--buy:#14804f;--sell:#b42318;--sim:rgba(120,120,120,.10);
 color:var(--ink);font:14px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
 margin:18px 0 22px;font-variant-numeric:tabular-nums}
.p123 *{box-sizing:border-box}
.p123-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;padding-bottom:4px;
 margin-bottom:8px;border-bottom:1px solid var(--rule)}
.p123-title{font-size:15px;font-weight:600}
.p123-k{color:var(--ink2);font-size:12px;font-weight:400}
.p123-dates{font-size:13px;color:var(--ink2);margin:0 0 4px}
.p123-dates b{color:var(--ink);font-weight:600}.p123-gap{display:inline-block;width:24px}
.p123-foot{color:var(--ink2);font-size:11.5px;margin:6px 0 0}
.p123-note{color:var(--ink2);font-size:13px;margin:6px 0}
.p123-err{color:#a00020;background:#ffd8d8;border:1px solid #a00020;padding:4px 8px}

/* buttons */
.p123 button{border:1px solid var(--axis);background:var(--btn);color:var(--ink);border-radius:6px;
 padding:3px 10px;margin:0;font:inherit;font-size:13px;line-height:1.4;cursor:pointer;box-shadow:none;
 text-transform:none;letter-spacing:normal;width:auto;height:auto;min-height:0}
.p123 button.on{background:var(--ink);color:#fcfcfb;border-color:var(--ink)}
.p123-sel{margin-left:auto;display:flex;gap:6px;align-items:center;color:var(--ink2);font-size:12.5px}

/* tables */
.p123-scroll{overflow-x:auto}
.p123 table{border:none;margin:0;width:auto;background:none}
.p123 table td,.p123 table th{border:none;background:none;vertical-align:baseline}
table.p123-t{border-collapse:collapse;font-size:13px;margin:4px 0 10px}
table.p123-t th{font-weight:500;color:var(--ink2);text-align:right;padding:3px 10px;
 border-bottom:1px solid var(--rule);white-space:nowrap}
table.p123-t td{text-align:right;padding:3px 10px;white-space:nowrap}
table.p123-t th:first-child,table.p123-t td:first-child{text-align:left}
table.p123-t th.p123-grp{text-align:center;color:var(--ink);border-bottom:none;padding-bottom:0}
table.p123-t td.p123-gd{font-weight:700}
.p123-stats [data-bk]:not([data-bk="1"]){display:none}

/* holdings: one card each; six per row at most, never narrower than 90px */
.p123-hg{display:grid;gap:6px;max-width:720px;margin:0 0 8px;
 grid-template-columns:repeat(auto-fill,minmax(max(90px,calc((100% - 30px) / 6)),1fr))}
.p123-hc{border:1px solid var(--rule);border-radius:4px;padding:4px 8px 5px;display:flex;flex-direction:column;
 font-size:13px;line-height:1.5;white-space:nowrap}
.p123-hc b{font-size:13.5px;border-bottom:1px solid var(--rule);padding-bottom:2px;margin-bottom:2px}
.p123-hc .p123-op{color:var(--ink2);font-size:12px}

/* models overview */
table.p123-mt{width:100%;max-width:900px}
table.p123-mt th,table.p123-mt td{padding:3px 6px}
table.p123-mt td:first-child{white-space:normal;min-width:150px}
table.p123-mt th{vertical-align:bottom}
table.p123-mt tr.p123-h2 th{text-align:right}
table.p123-mt th.p123-v{padding:3px 2px;width:24px;text-align:center}
table.p123-mt th.p123-v span{writing-mode:vertical-rl;transform:rotate(180deg);display:inline-block;
 white-space:nowrap;line-height:1.2}
table.p123-mt th:nth-child(n+2):nth-child(-n+5),table.p123-mt td:nth-child(n+2):nth-child(-n+5){text-align:center;padding:3px 4px}
table.p123-mt tr.p123-sec td{font-weight:700;padding-top:10px;border-bottom:1px solid var(--rule);text-align:left}
table.p123-mt tr.p123-spy td{font-style:italic;color:var(--ink2)}
table.p123-mt tr.p123-fn td{font-size:11.5px;color:var(--ink2);text-align:left;padding-top:0}
table.p123-mt a{text-decoration:none}
.p123-tick{color:var(--buy);font-weight:700}
.p123-mt sup{font-size:10px;line-height:0}

/* trades */
table.p123-tt{width:100%;max-width:720px}
table.p123-tt td:last-child,table.p123-tt th:last-child{text-align:left;white-space:normal}
table.p123-tt td:nth-child(2),table.p123-tt th:nth-child(2){text-align:left}
table.p123-tt tr.p123-new td{border-top:1px solid var(--rule)}
.p123-buy{color:var(--buy);font-weight:600}.p123-sell{color:var(--sell);font-weight:600}

/* chart */
.p123-ctl{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;margin-bottom:8px}
.p123-ctl label{color:var(--ink2);font-size:13px;display:flex;align-items:center;gap:5px;margin:0}
.p123-ctl input[type=date]{border:1px solid var(--axis);background:var(--btn);color:var(--ink);border-radius:6px;
 padding:2px 6px;font:inherit;font-size:13px;width:auto;height:auto;margin:0}
.p123-scale{display:inline-flex;gap:0;margin-left:6px}
.p123-scale button{border-radius:0}
.p123-scale button:first-child{border-radius:6px 0 0 6px}
.p123-scale button:last-child{border-radius:0 6px 6px 0;border-left:none}
.p123-hint{color:var(--ink2);font-size:12px;margin-left:auto}
.p123-ro{border:1px solid var(--rule);border-radius:8px;padding:6px 10px;margin-bottom:6px;font-size:13px;overflow-x:auto}
.p123-ro table{border-collapse:collapse}
.p123-ro td,.p123-ro th{padding:1px 14px 1px 0;text-align:right;white-space:nowrap;font-weight:400}
.p123-ro th{color:var(--ink2);font-size:12px}
.p123-ro td:first-child,.p123-ro th:first-child{text-align:left;color:var(--ink2)}
.p123-sw{display:inline-block;width:14px;height:3px;border-radius:2px;vertical-align:middle;margin-right:5px}
.p123-simtag{display:inline-block;font-size:11px;color:var(--ink2);border:1px solid var(--axis);border-radius:4px;
 padding:0 5px;margin-left:6px}
.p123-pt{font-size:13px;font-weight:600;margin:8px 0 0}
.p123-pt span{font-weight:400;color:var(--ink2)}
.p123-c{width:100%;min-height:40px}
.p123 .uplot{font-family:inherit}.p123 .u-select{background:rgba(120,120,120,.15)}
@media (max-width:600px){.p123-hint{display:none}.p123-sel{margin-left:0}}

/* chart wider than the content column, into the sidebar's space, while
   the theme shows the sidebar beside the content (above 980px) */
@media screen and (min-width:981px){
 .col-620 .p123-chart{width:130%;position:relative;z-index:2;background:#fff}
}
