:root{--bg:#f7f9fd;--surface:#fff;--text:#142038;--muted:#56667f;--line:#e0e6f0;--blue:#5146e5;--green:#087e5d;--red:#bb2545;--font:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.65 var(--font);font-variant-numeric:tabular-nums}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.45}button,a,input,select{outline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.table-scroll:focus-visible{outline:2px solid var(--blue)}::selection{background:#dedaff;color:#201874}a{color:var(--blue);text-underline-offset:3px}header{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:24px;min-height:78px;padding:12px max(24px,calc((100vw - 1400px)/2));background:var(--surface);border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;flex-shrink:0}.brand-icon{width:38px;height:38px;display:grid;place-items:center;background:var(--blue);color:white;border-radius:12px}.brand strong{font-size:18px;letter-spacing:-.02em}.brand small{display:block;font-size:11px;color:var(--muted)}nav{display:flex;gap:4px;padding:4px;background:#f0f3f9;border:1px solid var(--line);border-radius:24px;margin:auto}nav button{border:0;background:transparent;color:#465670;padding:7px 16px;border-radius:20px;white-space:nowrap;font-size:13px;font-weight:600}nav .selected{background:#fff;color:var(--blue);box-shadow:0 2px 5px #1523420c}nav span{margin-left:5px;font-size:11px}#connection{font-size:12px;white-space:nowrap;color:var(--muted)}#connection.online{color:var(--green)}main{max-width:1400px;margin:auto;padding:0 26px 30px}.sourcebar{display:flex;justify-content:space-between;gap:12px;padding:15px 0;color:var(--muted);font-size:12px}.sourcebar i{display:inline-block;width:7px;height:7px;background:#b6bfd0;border-radius:50%;margin-right:7px}.sourcebar i.online{background:#0f9d75}.notice{padding:11px 16px;background:#efedff;color:#463b9c;border:1px solid #dcd6ff;border-radius:9px;font-size:12px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:33px 0 20px}.section-heading h1{font-size:27px;line-height:1.3;letter-spacing:-.025em;margin:0 0 8px}.section-heading h2{font-size:17px;line-height:1.4;margin:0}.section-heading p{color:var(--muted);margin:6px 0 0}.compact{margin-top:31px}.muted{color:var(--muted);font-size:12px}.primary,.secondary{border-radius:8px;padding:9px 16px;font-weight:600;white-space:nowrap}.primary{color:white;background:var(--blue);border:1px solid var(--blue)}.primary:hover{background:#3f36be}.secondary{color:#42516c;background:white;border:1px solid #d6dfeb}.secondary:hover:not(:disabled){background:#f0f2ff}.overview{display:grid;grid-template-columns:repeat(4,1fr);background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:20px 0}.overview div{padding:0 24px;border-right:1px solid var(--line)}.overview div:last-child{border:0}.overview span{color:var(--muted);font-size:12px}.overview strong{display:block;font-size:28px;line-height:1.3;margin-top:8px}.signal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.signal{background:white;border:1px solid #c9d6ef;border-radius:12px;overflow:hidden;padding:19px}.signal-top{display:flex;justify-content:space-between;gap:15px;color:var(--muted);font-size:12px}.status{padding:2px 8px;background:#eef1ff;color:#5043aa;border-radius:5px;white-space:nowrap}.status.win{color:var(--green);background:#e6f6ef}.status.loss{color:var(--red);background:#fff0f2}.teams{font-size:16px;font-weight:650;display:flex;justify-content:space-between;gap:12px;align-items:center;margin:16px 0}.teams strong{font-size:22px;white-space:nowrap;background:#f2f5fa;padding:4px 15px;border-radius:8px}.teams span{min-width:0;overflow-wrap:anywhere}.teams span:last-child{text-align:right}.selection{font-size:16px;font-weight:700;margin:12px 0 8px}.tags{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 14px}.tag{display:inline-block;padding:3px 7px;border:1px solid #d7e0ef;border-radius:5px;background:#f7f9fd;font-size:12px;font-weight:600}.tag.ev{color:var(--green);background:#e7f7f1;border-color:#b6dfd1}.models{display:flex;gap:0;padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:14px 0}.models div{flex:1;min-width:0}.models span{display:block;font-size:11px;color:var(--muted)}.models b{font-size:14px}.audit{font-size:12px;line-height:1.85;color:var(--muted)}.audit p{margin:3px 0}.empty{grid-column:1/-1;padding:36px 24px;text-align:center;background:white;border:1px dashed #cbd6e7;border-radius:10px;color:var(--muted)}.empty strong{display:block;color:var(--text);font-size:16px;margin-bottom:7px}.table-scroll{overflow:auto;background:white;border:1px solid var(--line);border-radius:12px}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px}th{background:#f0f3f9;color:#4d5e77;text-align:left;font-weight:600}td,th{padding:13px 17px;border-bottom:1px solid var(--line)}tbody tr:last-child td{border:0}td:first-child{white-space:normal;min-width:260px}td small{display:block;color:var(--muted);font-size:11px}.positive{color:var(--green);font-weight:650}.negative{color:var(--red);font-weight:650}.ready{color:var(--green)}.search input,input,select{background:white;border:1px solid #cbd5e4;border-radius:8px;padding:9px 11px;color:var(--text);min-width:0}input::placeholder{color:#65748a}.filters{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap;background:white;padding:18px;border:1px solid var(--line);border-radius:12px;margin:20px 0}.filters label{font-size:12px;color:var(--muted)}.filters input,.filters select{display:block;min-height:40px;margin-top:5px}.ledger-summary{display:flex;gap:24px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:14px 0}.ledger-summary span{color:var(--muted);font-size:12px}.ledger-summary strong{display:block;font-size:21px;color:var(--text)}.pager{display:flex;gap:8px}.method-list{max-width:1000px}.method-list article{display:flex;gap:22px;border-bottom:1px solid var(--line);padding:24px 0}.model-number{color:var(--blue);font-weight:700;font-size:20px}.method-list h2,.rules h2{font-size:18px;margin:0 0 10px}.method-list p,.rules p,.rules li{max-width:75ch;color:#475874}.method-list p{margin:0}code{display:block;font:12px/1.8 var(--font);padding:12px;background:#edeafa;color:#463b8c;margin-top:14px;border-radius:8px}.rules{margin-top:32px}.rules h2{margin-top:28px}.rules li{padding:5px 0}.error{color:#aa203b;background:#fff0f2;padding:12px 16px;border-radius:8px}footer{margin:40px 0 0;padding-top:20px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:1000px){header{gap:14px;flex-wrap:wrap;padding:12px 20px}nav{order:3;flex-basis:100%;margin:0;justify-content:center}#connection{margin-left:auto}.section-heading .muted{max-width:35ch;text-align:right}.signal-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){main{padding:0 15px 24px}header{padding:10px 15px;gap:10px}.brand strong{font-size:16px}.brand small{font-size:10px}nav{overflow:auto;justify-content:flex-start}nav button{flex:1;padding:7px 10px;font-size:12px}#connection{font-size:11px}.sourcebar{flex-direction:column;gap:3px;padding:12px 0}.notice{font-size:11px}.section-heading{align-items:flex-start;margin-top:25px;gap:12px}.section-heading h1{font-size:23px}.section-heading p{font-size:12px}.section-heading .muted{font-size:11px}.overview{grid-template-columns:repeat(2,1fr);padding:0}.overview div{padding:15px 18px;border-bottom:1px solid var(--line)}.overview div:nth-child(2){border-right:0}.overview div:nth-child(n+3){border-bottom:0}.overview strong{font-size:25px}.signal-grid{grid-template-columns:1fr}.signal{padding:16px}.teams{font-size:15px}.teams strong{font-size:20px;padding:4px 10px}.models b{font-size:13px}.compact{flex-wrap:wrap}.search,.search input{width:100%}.filters{gap:12px;padding:14px}.filters label{flex:1;min-width:130px}.filters input,.filters select{width:100%}.filters button{flex:1}.ledger-summary{gap:15px 25px}.ledger-summary strong{font-size:19px}.method-list article{gap:14px}.method-list h2{font-size:16px}.method-list p,.rules li{font-size:13px}.pager .secondary{padding:7px 12px}table{font-size:12px}td,th{padding:12px}.section-heading.compact .muted{text-align:left;max-width:none}}
.history-scope-note{margin:25px 0 12px;color:var(--muted);font-size:12px}.ledger-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;border:0;padding:0}.ledger-stat{min-width:0;padding:18px 17px;background:white;border:1px solid var(--line);border-radius:12px}.ledger-stat span{color:#54647e;font-size:12px}.ledger-stat strong{display:block;margin-top:8px;font-size:25px;font-weight:650;line-height:1.35;white-space:nowrap}.ledger-stat small{font-size:11px;font-weight:400;margin-left:5px;color:var(--muted)}.ledger-stat.won{border-color:#bce7d5}.ledger-stat.won strong{color:#087e5d}.ledger-stat.lost{border-color:#f2c7d1}.ledger-stat.lost strong{color:#bb2545}.ledger-stat.pending{border-color:#b9e0ec}.ledger-stat.pending strong{color:#086d8a}.ledger-stat.profit strong{font-size:22px}.record-category-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:29px 0 0;flex-wrap:wrap}.record-category-heading h2{font-size:17px;margin:0}.record-categories{display:flex;flex-wrap:wrap;gap:4px;padding:5px;background:#edf1f8;border:1px solid #e3e9f2;border-radius:14px}.record-category{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:10px;padding:7px 11px;background:transparent;color:#4b5b75;font-size:12px;font-weight:600}.record-category span{font-size:11px;font-weight:600;font-variant-numeric:tabular-nums}.record-category:hover{background:#e3e8f4}.record-category.selected{background:white;color:#342b92;box-shadow:0 2px 5px #23375b0b}.record-category[aria-pressed=true] span{color:#5146e5}.record-category:focus-visible{outline:2px solid var(--blue);outline-offset:2px}.status.review{color:#8b5b08;background:#fff5d9}
@media(max-width:1100px){.ledger-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.record-category-heading{align-items:flex-start}.record-categories{width:100%}}
@media(max-width:640px){.ledger-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ledger-stat{padding:15px}.ledger-stat strong{font-size:23px}.ledger-stat.profit strong{font-size:21px}.record-category-heading{gap:12px;margin-top:25px}.record-categories{gap:5px;padding:6px;border-radius:12px}.record-category{padding:7px 10px;flex:1 0 auto;justify-content:center}.record-category-heading+.compact{margin-top:18px}.history-scope-note{font-size:11px}}

/* One desktop overview for full history totals and the equity curve. */
#history>.section-heading:first-child{margin:20px 0 12px}
#history>.section-heading:first-child h1{font-size:24px;margin-bottom:5px}
#history .filters{padding:14px 16px;gap:12px}
#history .history-scope-note{margin:12px 0 10px}
.history-overview{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr);grid-template-areas:"curve totals";gap:16px;align-items:stretch}
#historyStats{grid-area:totals;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-content:stretch}
#historyStats .ledger-stat{padding:12px 15px;display:flex;flex-direction:column;justify-content:center}
#historyStats .ledger-stat strong{font-size:25px;margin-top:6px}
#historyEquity{grid-area:curve;margin:0;padding:16px;min-width:0}
#historyEquity .equity-metrics{gap:12px 18px;margin-bottom:14px}
#historyEquity .equity-metrics div{min-width:0;flex:1}
#historyEquity .equity-metrics strong{font-size:20px;white-space:nowrap}
#historyEquity .equity-metrics span{font-size:12px}
#historyEquity .equity-note{font-size:11px;line-height:1.5;margin:6px 0}
#history .record-category-heading{margin-top:18px}
body:has(#history:not([hidden])) .sourcebar{padding:10px 0}
body:has(#history:not([hidden])) .notice{padding:8px 14px}
@media(max-width:1099px){.history-overview{grid-template-columns:minmax(0,1fr);grid-template-areas:"totals" "curve"}#historyStats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){#historyStats{grid-template-columns:repeat(2,minmax(0,1fr))}#historyStats .ledger-stat{padding:12px}#historyStats .ledger-stat strong{font-size:22px}#historyEquity .equity-metrics{flex-wrap:wrap}#historyEquity .equity-metrics div{min-width:120px}}
