:root { color-scheme:dark; --ef-bg:#141a21; --ef-text:#edf1f4; --ef-muted:#9aa8b5; --ef-line:#2d3945; --ef-soft:#1d2630; --ef-blue:#9abeb0; --ef-onblue:#11201b; --ef-alert:#e9a1ab; }
* { box-sizing:border-box; }
html { scroll-padding-block:20px 112px; }
body { margin:0; background:#10151b; color:var(--ef-text); font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; -webkit-font-smoothing:antialiased; }
button,input,select,textarea { font:inherit; }
button,summary { -webkit-tap-highlight-color:transparent; }
#exchange-form-history { min-height:100dvh; }
#exchange-form-history [hidden] { display:none !important; }
.ef-app { max-width:480px; min-height:100dvh; margin:0 auto; background:var(--ef-bg); color:var(--ef-text); }
.ef-icon { width:24px; height:24px; display:block; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
small { display:block; color:var(--ef-muted); font-size:12px; }
button { min-height:44px; padding:10px 12px; border:0; border-radius:8px; background:transparent; color:var(--ef-text); cursor:pointer; }
button:disabled { cursor:wait; opacity:.5; }
button:not(:disabled):active { filter:brightness(.86); }
.ef-main { padding:14px 22px calc(112px + env(safe-area-inset-bottom)); }
.ef-main > section { min-width:0; }
h2 { margin:0 0 20px; font-size:23px; line-height:1.3; font-weight:630; letter-spacing:-.4px; overflow-wrap:anywhere; }
h3 { margin:26px 0 12px; font-size:17px; font-weight:600; letter-spacing:-.2px; overflow-wrap:anywhere; }
.ef-nav { position:fixed; z-index:10; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; padding:10px 12px calc(10px + env(safe-area-inset-bottom)); background:#141a21; border-top:1px solid var(--ef-line); }
.ef-nav button { display:flex; flex-direction:column; align-items:center; gap:5px; min-width:0; padding:3px 4px; color:#8e9daa; border-radius:4px; font-size:11px; line-height:1.4; }
.ef-nav .ef-icon { width:25px; height:25px; }
.ef-nav button[aria-pressed="true"] { color:var(--ef-blue); }
.ef-nav button[aria-pressed="true"] .ef-icon { stroke-width:1.9; }
.ef-market { margin:0 0 24px; }
.ef-market-heading,.ef-market-footer { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.ef-market-title { padding:0; font-size:21px; font-weight:620; letter-spacing:-.4px; text-align:left; }
.ef-market-toggle { flex-shrink:0; display:flex; padding:2px; border:1px solid #3a4954; border-radius:8px; }
.ef-market-toggle button { min-height:40px; padding:5px 9px; font-size:12px; color:var(--ef-muted); border-radius:5px; }
.ef-market-toggle button[aria-pressed="true"] { background:#89aa9e; color:#11221b; font-weight:600; }
.ef-market-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:21px; }
.ef-market-card { min-width:0; padding-right:12px; }
.ef-market-card + .ef-market-card { padding-left:21px; padding-right:0; border-left:1px solid var(--ef-line); }
.ef-market-card a { color:var(--ef-muted); font-size:14px; font-weight:550; text-decoration:none; }
.ef-market-card a:hover { text-decoration:underline; }
.ef-market-card strong { display:block; margin-top:4px; color:var(--ef-text); font-size:clamp(23px,6.7vw,32px); line-height:1.25; font-weight:630; letter-spacing:-.65px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-market-card small { margin-top:5px; font-size:10px; }
.ef-market-footer { margin-top:8px; }
.ef-market-footer small { font-size:11px; }
.ef-market-footer button { display:grid; place-items:center; width:36px; min-height:36px; padding:7px; color:var(--ef-muted); }
.ef-market-footer .ef-icon { width:18px; height:18px; }
.ef-overview { padding:20px; border:1px solid #33424e; border-radius:10px; background:#0e151c; }
.ef-eyebrow { color:#a7b4c1; font-size:14px; }
.ef-overview-value { display:block; margin:8px 0 14px; font-size:clamp(32px,9vw,44px); line-height:1.18; font-weight:640; letter-spacing:-1.3px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-overview-footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 12px; color:var(--ef-muted); font-size:13px; }
.ef-overview-footer > span:first-child { display:flex; align-items:center; gap:9px; }
.ef-dot { width:8px; height:8px; border-radius:2px; background:#89aa9e; }
.ef-primary { display:flex; justify-content:center; align-items:center; gap:10px; width:100%; min-height:50px; margin-top:16px; padding:12px 14px; background:#89aa9e; color:#10201a; border:1px solid #9bb9ae; border-radius:8px; font-size:15px; font-weight:640; line-height:1.4; }
.ef-new-button { margin-top:16px; font-size:17px; }
.ef-new-button .ef-icon { width:25px; height:25px; }
.ef-section-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:25px 0 12px; }
.ef-section-heading h2 { margin:0; font-size:20px; }
.ef-inline { color:var(--ef-blue); padding-inline:0; font-size:13px; }
.ef-section-heading .ef-inline { color:var(--ef-muted); flex-shrink:0; }
.ef-home-empty { padding:24px 18px; border:1px solid var(--ef-line); border-radius:9px; }
.ef-home-empty strong { font-weight:550; font-size:16px; }
.ef-home-empty p { margin:7px 0 0; color:var(--ef-muted); font-size:13px; }
.ef-active-card { display:block; width:100%; padding:18px 0; border-bottom:1px solid var(--ef-line); border-radius:0; text-align:left; }
.ef-active-featured { padding:18px; background:var(--ef-soft); border:1px solid transparent; border-radius:10px; margin-bottom:5px; }
.ef-active-top { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 10px; }
.ef-active-top > strong { font-size:18px; font-weight:620; overflow-wrap:anywhere; }
.ef-active-label { margin-top:16px; }
.ef-active-amount { display:block; margin:3px 0 4px; font-size:25px; line-height:1.3; font-weight:630; letter-spacing:-.55px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-active-compact-amount { display:block; margin:8px 0 4px; font-size:18px; font-weight:550; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-active-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:16px; padding-top:13px; border-top:1px solid #35434e; }
.ef-active-meta > div { min-width:0; }
.ef-active-meta > div + div { padding-left:12px; border-left:1px solid #35434e; }
.ef-active-meta strong { display:block; margin-top:3px; font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.ef-active-meta small { font-size:11px; }
.ef-profit { color:var(--ef-blue); }
.ef-status { display:inline-block; max-width:100%; padding:4px 7px; background:#303e4a; color:#c8d4de; border-radius:5px; font-size:11px; line-height:1.4; font-weight:450; overflow-wrap:anywhere; }
.ef-status-fix,.ef-status-assign { background:#303b46; color:#c9d5df; }
.ef-status-cash { background:#273b44; color:#b0ccd5; }
.ef-status-finish,.ef-status-done { background:#273c36; color:#b1cec1; }
.ef-status-void { background:#3c2933; color:#e5abb6; }
.ef-page-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:20px; }
.ef-page-heading h2 { margin:0; }
.ef-back { display:flex; align-items:center; gap:6px; margin:-4px 0 14px; }
.ef-back .ef-icon { width:18px; height:18px; }
.ef-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:17px 12px; }
.ef-fields > label { min-width:0; }
.ef-full { grid-column:1 / -1; }
label { display:flex; flex-direction:column; gap:7px; color:var(--ef-muted); font-size:12px; }
input:not([type="checkbox"]),select,textarea { min-width:0; max-width:100%; width:100%; min-height:48px; padding:12px; border:1px solid #3a4854; border-radius:7px; background:#19222b; color:var(--ef-text); font:16px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; scroll-margin-block:16px; }
input::placeholder,textarea::placeholder { color:#7f919f; opacity:1; }
input:read-only { background:#182029; color:var(--ef-muted); }
input[type="date"] { appearance:none; -webkit-appearance:none; text-align:left; padding-inline:9px; }
input::-webkit-date-and-time-value { text-align:left; min-height:1.35em; }
textarea { resize:vertical; }
.ef-field-hint { margin:-4px 0 0; color:var(--ef-muted); font-size:11px; }
.ef-stock { font-size:12px; color:var(--ef-muted); }
.ef-extra { margin:20px 0; border-block:1px solid var(--ef-line); }
summary { padding:15px 0; color:var(--ef-blue); cursor:pointer; font-size:13px; }
.ef-extra .ef-fields { padding-bottom:18px; }
.ef-check { flex-direction:row; align-items:center; min-height:44px; gap:10px; color:var(--ef-text); font-size:13px; margin-top:10px; }
input[type="checkbox"] { width:19px; height:19px; margin:0; accent-color:#89aa9e; flex-shrink:0; }
.ef-result { padding:18px; margin:20px 0 14px; border:1px solid var(--ef-line); border-radius:9px; background:#0e151c; font-variant-numeric:tabular-nums; }
.ef-result-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; }
.ef-result-row > span { color:var(--ef-muted); font-size:12px; }
.ef-result-row strong { font-size:23px; font-weight:600; overflow-wrap:anywhere; }
.ef-gross-row { display:block; padding-bottom:14px; margin-bottom:14px; border-bottom:1px solid var(--ef-line); }
.ef-gross-row strong { display:block; font-size:30px; margin-top:6px; letter-spacing:-.6px; }
.ef-shares { color:var(--ef-muted); font-size:12px; margin-top:9px; overflow-wrap:anywhere; }
.ef-search { margin-bottom:16px; }
.ef-status-filter { margin-bottom:10px; }
.ef-history-card { display:block; width:100%; text-align:left; padding:18px 0; border-radius:0; border-bottom:1px solid var(--ef-line); }
.ef-history-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 12px; }
.ef-history-top strong { font-size:16px; font-weight:600; overflow-wrap:anywhere; }
.ef-history-top > span { font-size:16px; font-weight:550; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-history-card small { margin-top:6px; overflow-wrap:anywhere; }
.ef-history-meta { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:10px; }
.ef-row { display:flex; flex-wrap:wrap; justify-content:space-between; gap:6px 14px; padding:12px 0; border-bottom:1px solid var(--ef-line); font-size:13px; font-variant-numeric:tabular-nums; }
.ef-row > span:first-child { color:var(--ef-muted); }
.ef-row > span:last-child { margin-left:auto; max-width:100%; text-align:right; overflow-wrap:anywhere; }
.ef-cash-summary { margin:20px 0; padding:18px; border:1px solid var(--ef-line); border-radius:9px; background:#0e151c; }
.ef-cash-summary > strong { display:block; margin:6px 0 12px; font-size:29px; line-height:1.3; font-weight:620; letter-spacing:-.6px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-secondary { width:100%; min-height:46px; margin-top:12px; padding:11px; background:var(--ef-soft); color:var(--ef-blue); border:1px solid #3a4854; }
.ef-cash-summary .ef-row { font-size:12px; padding:9px 0; }
.ef-steps { display:grid; gap:12px; list-style:none; padding:0; margin:24px 0; counter-reset:steps; }
.ef-steps li { display:flex; align-items:center; gap:10px; color:var(--ef-muted); font-size:13px; counter-increment:steps; }
.ef-steps li::before { content:counter(steps); display:grid; place-items:center; width:26px; height:26px; flex:0 0 26px; border:1px solid #3d4b57; border-radius:50%; font-size:12px; }
.ef-steps .ef-step-current { color:var(--ef-blue); }
.ef-step-current::before { border-color:var(--ef-blue); }
.ef-steps .ef-step-done::before { content:'✓'; color:var(--ef-blue); }
.ef-notes,.ef-detail-note { white-space:pre-wrap; overflow-wrap:anywhere; }
.ef-flow-hint { margin:14px 0; color:var(--ef-muted); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.ef-balances { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.ef-balance { min-width:0; padding:16px; background:var(--ef-soft); border-radius:9px; }
.ef-balance > strong { display:block; font-size:16px; font-weight:600; margin-bottom:12px; }
.ef-balance .ef-row { padding:5px 0; border:0; font-size:11px; }
.ef-balance > small { margin-top:14px; }
.ef-balance-total { margin:4px 0 8px; font-size:21px; font-weight:600; color:var(--ef-blue); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-balance button { padding:8px 0; text-align:left; color:var(--ef-blue); font-size:12px; }
.ef-payout-form { padding:0 0 20px; margin-top:22px; border-block:1px solid var(--ef-line); }
.ef-payout-form .ef-fields { margin:16px 0; }
.ef-total-label { margin-top:25px; color:var(--ef-muted); font-size:12px; }
.ef-total-value { margin:6px 0 18px; font-size:35px; line-height:1.25; letter-spacing:-.8px; font-weight:630; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-exports { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.ef-exports button { color:var(--ef-blue); background:var(--ef-soft); border:1px solid var(--ef-line); font-size:12px; }
.ef-error { color:var(--ef-alert); font-size:12px; margin:12px 0; }
.ef-empty { padding:18px 0; color:var(--ef-muted); font-size:13px; }
.ef-flash { padding:12px; color:var(--ef-text); background:var(--ef-soft); border-radius:7px; font-size:12px; }
.ef-banner,.ef-access { margin:0 22px 10px; padding:12px; color:#c8d5df; background:var(--ef-soft); border-radius:7px; font-size:12px; overflow-wrap:anywhere; }
.ef-access { margin-top:24px; padding:24px 18px; line-height:1.7; }
.ef-rates-dialog,.ef-person-dialog { width:calc(100% - 28px); max-width:440px; max-height:calc(100dvh - 40px); margin:auto; padding:22px; border:1px solid #40515d; border-radius:12px; background:var(--ef-bg); color:var(--ef-text); font:inherit; overflow:auto; overscroll-behavior:contain; }
.ef-rates-dialog::backdrop,.ef-person-dialog::backdrop { background:#050b11bb; backdrop-filter:blur(3px); }
.ef-rates-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.ef-rates-heading h2 { margin:0 0 5px; }
.ef-rates-heading button { flex-shrink:0; margin:-8px -9px 0 0; padding:4px 10px; font-size:27px; color:var(--ef-muted); }
.ef-rates-message { min-height:20px; margin:16px 0; color:var(--ef-muted); font-size:12px; }
.ef-rate-card { padding:16px; margin:12px 0; border:1px solid var(--ef-line); border-radius:8px; background:var(--ef-soft); }
.ef-rate-card h3 { margin:0 0 3px; }
.ef-rate-card a { color:var(--ef-text); text-underline-offset:4px; }
.ef-rate-prices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:16px 0; }
.ef-rate-prices > div { min-width:0; }
.ef-rate-prices strong { display:block; font-size:clamp(19px,5.3vw,25px); font-weight:600; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-rate-warning { color:#c4cdb0; }
.ef-rates-footnote { margin:16px 0 0; color:var(--ef-muted); font-size:11px; line-height:1.6; }
.ef-person-option { display:flex; flex-direction:column; align-items:flex-start; gap:3px; width:100%; margin-top:12px; padding:14px; border:1px solid #3a4854; border-radius:8px; background:var(--ef-soft); text-align:left; }
.ef-person-option strong { font-size:15px; font-weight:550; }
:focus-visible { outline:2px solid #a8cabb; outline-offset:3px; }
@media (min-width:520px) { .ef-app { border-inline:1px solid #25313c; } }
@media (max-width:370px) {
  .ef-main { padding-inline:16px; }
  .ef-market-title { font-size:18px; }
  .ef-market-toggle button { font-size:11px; padding-inline:8px; }
  .ef-market-card + .ef-market-card { padding-left:16px; }
  .ef-overview { padding:17px; }
  .ef-active-featured { padding:15px; }
  .ef-section-heading h2 { font-size:19px; }
  .ef-active-top > strong { font-size:17px; }
  .ef-active-amount { font-size:23px; }
  .ef-banner,.ef-access { margin-inline:16px; }
  .ef-rates-dialog,.ef-person-dialog { padding:17px; }
}
@media (max-width:350px) {
  .ef-balances { grid-template-columns:minmax(0,1fr); }
  .ef-balance-total { font-size:25px; }
  .ef-fields { column-gap:10px; }
  .ef-nav { padding-inline:8px; }
  .ef-nav button { font-size:10px; }
}
@media (prefers-reduced-motion:no-preference) { button { transition:background-color .15s,color .15s,filter .15s; } }
/* Cash uses the same palette and stays separate from profit. */
.ef-nav { grid-template-columns:repeat(5,minmax(0,1fr)); padding-inline:6px; }
.ef-nav button { font-size:10px; }
.ef-cash-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid #3a4954; border-radius:8px; padding:2px; margin:0 0 20px; }
.ef-cash-tabs button { min-width:0; padding:9px 5px; color:var(--ef-muted); font-size:13px; border-radius:5px; }
.ef-cash-tabs [aria-pressed="true"] { background:#89aa9e; color:#10201a; font-weight:600; }
.ef-cash-accounts { margin:16px 0; }
.ef-money-card { display:block; width:100%; padding:16px; margin:14px 0; background:var(--ef-soft); border:1px solid var(--ef-line); border-radius:9px; text-align:left; overflow-wrap:anywhere; }
.ef-money-card > strong { display:block; font-size:15px; font-weight:600; }
.ef-money-card-value { margin:5px 0 8px; font-size:25px; line-height:1.3; font-weight:620; letter-spacing:-.5px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.ef-money-card > small { margin-top:8px; }
.ef-money-card .ef-status { margin:3px 0; }
.ef-cash-route { font-size:17px; margin-top:14px; }
.ef-cash-event { margin-top:14px; padding-bottom:12px; border-bottom:1px solid var(--ef-line); }
.ef-cash-event .ef-row { border:0; }
.ef-cash-event .ef-inline { display:block; min-height:32px; padding-block:4px; }
.ef-cash-receive { margin:22px 0 12px; }
.ef-entry-money { margin-top:24px; border-top:1px solid var(--ef-line); padding-bottom:12px; }
.ef-entry-money .ef-money-card { margin:12px 0; }
.ef-cash-terms { margin:24px 0; padding:0 0 18px; border-block:1px solid var(--ef-line); }
.ef-cash-terms .ef-fields { margin-top:16px; }
.ef-payout-cash { margin-top:14px; }
@media (max-width:350px) { .ef-nav .ef-icon { width:23px; height:23px; } .ef-nav button { font-size:9px; } }
.ef-cash-accounts .ef-balance { padding:14px; }
.ef-cash-accounts .ef-balance-total { font-size:19px; letter-spacing:-.4px; }
@media (max-width:350px) { .ef-cash-accounts .ef-balance-total { font-size:24px; } }

/* Cash receipts remain visible after a trade closes. */
.ef-cash-receipts{margin:22px 0}.ef-cash-receipts summary{cursor:pointer;font-weight:600;margin-bottom:16px}.ef-cash-receipts .ef-money-card{margin-top:12px}.ef-entry-money .ef-money-card{margin:16px 0}.ef-entry-money .ef-money-card .ef-money-card{padding:14px}

.ef-amount-switch{grid-template-columns:repeat(2,minmax(0,1fr));margin:8px 0 0}.ef-amount-label{color:var(--ef-muted);font-size:13px}.ef-cash-opening{margin:0 0 20px;padding:14px;border:1px solid var(--ef-line);border-radius:12px}.ef-cash-opening summary{cursor:pointer;font-weight:600}
