.fctpd { --navy:#142c50; --blue:#23528d; --line:#d3e0ef; --pale:#eef5fd; box-sizing:border-box; max-width:860px; margin:24px auto; background:#fff; color:var(--navy); border:1px solid var(--line); border-radius:18px; padding:clamp(14px, 3vw, 32px); font:16px/1.5 system-ui,sans-serif; }
.fctpd *, .fctpd *::before, .fctpd *::after { box-sizing:border-box; }
.fctpd [hidden] { display:none!important; }
.fctpd .fctpd-head h2 { font:700 clamp(25px, 4vw, 34px)/1.15 system-ui,sans-serif; margin:0 0 8px; color:var(--navy); }
.fctpd p { margin:0; }
.fctpd .fctpd-head p { color:#415775; }
.fctpd button { border:1px solid #b9cde4; border-radius:8px; background:white; color:var(--navy); font:600 14px/1.25 system-ui,sans-serif; padding:10px 12px; min-height:42px; cursor:pointer; }
.fctpd button:hover:not(:disabled) { background:#dbeaff; color:var(--navy); }
.fctpd button:disabled { opacity:.48; cursor:default; }
.fctpd :is(button,input,select):focus-visible { outline:2px solid #2563a6; outline-offset:2px; }
.fctpd-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; background:var(--pale); border-radius:12px; padding:5px; margin:20px 0 14px; }
.fctpd .fctpd-tabs button[aria-selected=true] { background:var(--navy); border-color:var(--navy); color:white; }
.fctpd-config { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; padding:14px; border-radius:12px; background:var(--pale); }
.fctpd-config p { grid-column:1/-1; }
.fctpd label { font-size:14px; font-weight:650; }
.fctpd input, .fctpd select { display:block; width:100%; min-width:0; height:42px; padding:7px 9px; border:1px solid #aebfd5; border-radius:8px; background:#fff; color:var(--navy); font:16px/1.25 system-ui,sans-serif; margin:3px 0 0; }
.fctpd input[aria-invalid=true] { border-color:#a33131; }
.fctpd-table { margin-top:14px; }
.fctpd-columns, .fctpd-row { display:grid; grid-template-columns:1.05fr minmax(90px,1fr) minmax(90px,1fr) auto; gap:12px; align-items:center; padding:8px 10px; }
.fctpd-columns { color:#415775; font-size:13px; font-weight:700; border-bottom:1px solid var(--line); grid-template-columns:1.05fr minmax(90px,1fr) minmax(90px,1fr) 79px; }
.fctpd-row { border-bottom:1px solid var(--line); }
.fctpd-row input { margin:0; }
.fctpd-row button { width:79px; }
.fctpd-stake { overflow-wrap:anywhere; }
.fctpd-mobile-label { display:none; }
.fctpd-actions { display:flex; justify-content:space-between; gap:8px; margin:12px 0 8px; }
.fctpd-status, .fctpd-config p, .fctpd-results p { color:#415775; font-size:13px; }
.fctpd-status { min-height:1.5em; }
.fctpd-results { margin-top:10px; }
.fctpd-tiles { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.fctpd-tiles div { background:var(--pale); border:1px solid var(--line); border-radius:11px; padding:10px; font-size:13px; }
.fctpd-tiles strong { display:block; color:var(--navy); font-size:clamp(18px, 3vw, 27px); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.fctpd-details { display:flex; flex-wrap:wrap; gap:5px 18px; padding:10px 0; font-size:13px; }
.fctpd-results p + p { margin-top:4px; }
@media (max-width:540px) {
    .fctpd-columns { display:none; }
    .fctpd-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:8px 0; gap:5px 10px; }
    .fctpd-selection { grid-row:1; grid-column:1; font-weight:700; }
    .fctpd-row button { grid-row:1; grid-column:2; justify-self:end; }
    .fctpd-mobile-label { display:block; font-size:13px; color:#415775; }
    .fctpd-stake { align-self:start; }
}
@media (max-width:350px) {
    .fctpd-config, .fctpd-tiles { grid-template-columns:1fr; }
}
.fctpd .fctpd-row button { padding-inline:6px; white-space:nowrap; }
.fctpd input[type=number] { background:#fff; border:1px solid #aebfd5; border-radius:8px; color:var(--navy); }

/* Profit/loss sign colours only; zero stays neutral. */
.fctpd .fctpd-results [data-out].fctpd-positive { color:#16743b; }
.fctpd .fctpd-results [data-out].fctpd-negative { color:#b42332; }


.fctpd .fctpd-outcomes{margin:12px 0;display:grid;gap:8px}.fctpd .fctpd-outcome{padding:10px;border:1px solid var(--line);border-radius:8px;overflow-wrap:anywhere}.fctpd .fctpd-outcome b,.fctpd .fctpd-outcome span{display:block}.fctpd .fctpd-outcome .fctpd-positive{color:#16743b}.fctpd .fctpd-outcome .fctpd-negative{color:#b42332}
.fctpd .fctpd-columns,.fctpd .fctpd-row{grid-template-columns:minmax(65px,.8fr) minmax(85px,1fr) minmax(70px,.8fr) minmax(130px,1.4fr) 79px}
.fctpd .fctpd-venue{min-width:0}.fctpd .fctpd-venue label{font-size:12px}.fctpd .fctpd-venue select,.fctpd .fctpd-venue input{font-size:14px}.fctpd .fctpd-assumptions{font-size:13px;color:#415775;margin-top:12px}.fctpd button{overflow-wrap:anywhere}.fctpd{container-type:inline-size}
@media(max-width:700px){.fctpd .fctpd-columns{display:none}.fctpd .fctpd-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.fctpd .fctpd-row>div:first-child{grid-row:1;grid-column:1}.fctpd .fctpd-row button{grid-row:1;grid-column:2;justify-self:end}.fctpd .fctpd-mobile-label{display:block}.fctpd .fctpd-venue{grid-column:1/-1}.fctpd .fctpd-venue>[data-exchange]{display:grid;grid-template-columns:1fr 1fr;gap:10px}}
@container(max-width:600px){.fctpd .fctpd-columns{display:none}.fctpd .fctpd-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.fctpd .fctpd-row>div:first-child{grid-row:1;grid-column:1}.fctpd .fctpd-row button{grid-row:1;grid-column:2;justify-self:end}.fctpd .fctpd-mobile-label{display:block}.fctpd .fctpd-venue{grid-column:1/-1}.fctpd .fctpd-venue>[data-exchange]{display:grid;grid-template-columns:1fr 1fr;gap:10px}}
@container(max-width:350px){.fctpd .fctpd-config,.fctpd .fctpd-tiles{grid-template-columns:1fr}}

.fctpd .fctpd-assumptions{font-size:13px;color:#415775;margin:12px 0}.fctpd .fctpd-config{grid-template-columns:1fr}.fctpd .fctpd-columns,.fctpd .fctpd-row{grid-template-columns:minmax(0,1fr) minmax(85px,.85fr) minmax(85px,.85fr) minmax(145px,1.2fr) 79px}.fctpd .fctpd-venue label{display:block;font-size:12px}.fctpd .fctpd-venue [data-exchange]{display:grid;gap:6px;margin-top:6px}
@container(max-width:600px){.fctpd .fctpd-columns{display:none}.fctpd .fctpd-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.fctpd .fctpd-row>.fctpd-venue{grid-column:1/-1;grid-row:auto}.fctpd .fctpd-venue [data-exchange]{grid-template-columns:1fr 1fr}}
