:root {
  --navy: #253444;
  --navy-2: #354860;
  --ink: #30343b;
  --ink-2: #4d5560;
  --muted: #68727e;
  --page: #f7f7f6;
  --panel: #fff;
  --line: #e2e2e0;
  --line-2: #ececea;
  --soft: #f3f4f3;
  --red: #c93e36;
  --green: #4b8755;
  --blue: #3170a8;
  --row-h: 52px;
  --cell-px: 13px;
}

.detail-view-tabs { display:inline-grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px; margin-top:6px; padding:3px; border:0; border-radius:10px; background:#edf0f2; box-shadow:inset 0 0 0 1px rgba(37,52,68,.08); }
.detail-view-tabs button { min-width:124px; min-height:36px; padding:0 16px; border:0; border-radius:7px; background:transparent; color:#626d79; font:inherit; font-size:13px; font-weight:700; cursor:pointer; transition:background-color .16s ease,color .16s ease,box-shadow .16s ease; }
.detail-view-tabs button:hover:not([aria-selected="true"]) { background:rgba(255,255,255,.58); color:var(--navy); }
.detail-view-tabs button[aria-selected="true"] { background:var(--navy-2); color:#fff; box-shadow:0 1px 2px rgba(31,42,54,.16),0 3px 8px rgba(31,42,54,.10); }
.detail-view-tabs button:active { box-shadow:0 1px 2px rgba(31,42,54,.12); }
.detail-view-tabs button:focus-visible { outline:2px solid #4b5158; outline-offset:2px; }
.do-t-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.do-t-summary > div { min-width:0; padding:12px 16px; border-right:1px solid var(--line); }
.do-t-summary > div:last-child { border-right:0; }
.do-t-summary span { display:block; color:var(--muted); font-size:11px; }
.do-t-summary strong { display:block; margin-top:4px; font-size:17px; font-variant-numeric:tabular-nums; }
.do-t-table { min-width:1120px; }
.detail-table.do-t-table th, .detail-table.do-t-table td { width:12.5%; text-align:left; }
.detail-table.do-t-table th:last-child, .detail-table.do-t-table td:last-child { padding-right:16px; text-align:left; }
.do-t-type { white-space:nowrap; }
.do-t-kind { display:inline-flex; align-items:center; min-height:24px; padding:2px 8px; border-radius:4px; font-size:11px; font-weight:700; line-height:1; white-space:nowrap; }
.do-t-kind-buy-first { background:#e8f0fb; color:#29547d; }
.do-t-kind-sell-first { background:#fff0df; color:#925414; }
.do-t-time { font-variant-numeric:tabular-nums; white-space:nowrap; }
.do-t-price-pair { display:inline-flex; align-items:center; gap:10px; min-width:138px; color:#4e5969; font-variant-numeric:tabular-nums; white-space:nowrap; }
.do-t-price-pair i { color:#b4bbc4; font-style:normal; }
.do-t-missing { color:var(--muted); font-size:12px; }

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; color: inherit; }
button, [role="button"] { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #4b5158; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 58px; padding: 8px 12px; transform: translateY(-160%); border-radius: 4px; background: var(--navy); color: #fff; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }
.num { font-variant-numeric: tabular-nums; }
.positive { color: var(--red) !important; }
.negative { color: var(--green) !important; }

.review-topbar { position: fixed; z-index: 25; top: 0; left: 46px; right: 0; height: 54px; padding: 0 22px; display: flex; align-items: center; gap: 18px; background: #fff; border-top: 4px solid #e7e7e5; border-bottom: 1px solid var(--line); }
.brand { color: var(--navy); font-size: 17px; font-weight: 750; }
.crumb { padding-left: 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.sync-state { margin-left: auto; color: var(--muted); font-size: 12px; }
.sync-state.is-ready { color: var(--green); }
.sync-state.is-partial { color: #8a631d; }
.sync-state.is-error { color: #a33a33; }
.review-page { min-width: 960px; margin-left: 46px; padding: 74px 22px 44px; }
.review-inner { width: min(100%, 1560px); margin: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.page-head h1 { margin: 0; color: var(--navy); font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.data-stamp { color: var(--muted); font-size: 11px; white-space: nowrap; }

.overview-stack, .matrix-card, .insight-card, .detail-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 3px rgba(37,47,65,.06); overflow: hidden; }
.overview-stack { margin-bottom: 18px; }
.scope-bar { display: flex; align-items: center; gap: 18px; min-height: 49px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.scope-group { display: flex; align-items: center; gap: 8px; min-width: 0; }
.scope-label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.segmented { display: inline-flex; gap: 2px; padding: 2px; background: var(--soft); border-radius: 6px; }
.segmented button, .custom-range button { height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #606873; font-size: 12px; white-space: nowrap; }
#accountTabs button { min-width: 32px; padding-inline: 8px; }
.segmented button:hover { background: #fff; }
.segmented button[aria-pressed="true"] { color: #fff; background: var(--navy-2); box-shadow: 0 1px 2px rgba(37,52,68,.18); }
.custom-range { display: flex; align-items: center; gap: 6px; }
.custom-range label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.custom-range input { width: 126px; height: 28px; padding: 0 7px; border: 1px solid #d8dce0; border-radius: 5px; background: #fff; color: var(--ink-2); }
.custom-range button { border-color: var(--navy-2); background: var(--navy-2); color: #fff; }
.custom-range .secondary-action { border-color: #d5d9de; background: #fff; color: #606873; }
.custom-range .secondary-action:hover { border-color: #aeb6bf; background: #f8f9f9; }
.scope-rule { margin: 0 0 0 auto; padding-left: 18px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; }
.scope-rule b { color: var(--ink-2); font-weight: 650; }
.settlement { display: grid; grid-template-columns: minmax(250px,.92fr) minmax(500px,2.08fr) minmax(260px,1fr); align-items: stretch; }
.settlement > section { min-width: 0; min-height: 124px; padding: 14px 20px; }
.settlement > .key-grid { padding: 0; }
.settlement > .key-grid, .settlement > .outcomes { margin-left: -1px; }
.net-section, .key, .outcomes { border: 1px solid var(--line); }
.net-section, .key, .outcomes { display: grid; grid-template-rows: 16px 42px 18px; align-content: center; }
.settle-label, .key span, .outcome-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.net { align-self: center; font: 750 clamp(30px,2.4vw,36px)/1 "DIN Alternate", "SFMono-Regular", Consolas, monospace; letter-spacing: -.045em; }
.net-meta { align-self: center; display: flex; gap: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.fee-inline { margin-left: 3px; padding-left: 9px; border-left: 1px solid #d9dde0; }
.fee-inline b { margin-left: 3px; color: var(--ink-2); }
.key-grid { display: grid; grid-template-columns: repeat(4,minmax(112px,1fr)); height: 100%; }
.key { height: 100%; padding: 14px 18px; }
.key + .key { margin-left: -1px; }
.key strong { align-self: center; font: 730 25px/1 "DIN Alternate", "SFMono-Regular", Consolas, monospace; letter-spacing: -.035em; }
.key small { align-self: center; color: #68727e; font-size: 11px; white-space: nowrap; }
.outcome-main { display: grid; align-self: center; grid-template-rows: 25px 7px; gap: 5px; }
.outcome-total { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; }
.outcome-total b { font: 730 25px/1 "DIN Alternate", "SFMono-Regular", Consolas, monospace; }
.outcome-total small, .outcome-item span { color: var(--muted); font-size: 11px; }
.splitbar { display: flex; height: 7px; overflow: hidden; border-radius: 2px; background: var(--soft); }
.splitbar i { display: block; }
.splitbar .win { background: var(--red); }
.splitbar .loss { background: var(--green); }
.outcome-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.outcome-item { display: flex; align-items: baseline; gap: 6px; }
.outcome-item.loss-outcome { justify-content: flex-end; text-align: right; }
.outcome-item b { font: 700 17px/1 "DIN Alternate", "SFMono-Regular", Consolas, monospace; }

.matrix-card { margin-bottom: 14px; }
.matrix-head { min-height: 62px; padding: 12px 14px; display: grid; grid-template-columns: minmax(260px,1fr) auto auto; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.matrix-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.matrix-title h2, .insight-title h2 { margin: 0; color: var(--navy); font-size: 16px; }
.matrix-title span, .matrix-meta { color: var(--muted); font-size: 11px; white-space: nowrap; }
.matrix-meta { margin: 0; text-align: right; }
.price-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--soft); }
.price-switch button { height: 28px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: #626a75; font-size: 12px; }
.price-switch button:hover { background: #fff; }
.price-switch button[aria-pressed="true"] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(37,52,68,.12); font-weight: 700; }
.fixed-mode { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #d9dde2; border-radius: 5px; background: #fafafa; color: var(--ink-2); font-size: 11px; white-space: nowrap; }
.fixed-mode::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--navy-2); }
.table-scroll, .detail-scroll { overflow: auto; scrollbar-width: thin; scrollbar-color: rgba(91,107,124,.14) transparent; }
.table-scroll { max-height: 390px; }
.detail-scroll { max-height: 520px; }
.table-scroll:hover, .detail-scroll:hover { scrollbar-color: rgba(91,107,124,.22) transparent; }
.table-scroll::-webkit-scrollbar, .detail-scroll::-webkit-scrollbar { width: 7px; height: 7px; }
.table-scroll::-webkit-scrollbar-track, .detail-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb, .detail-scroll::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: rgba(91,107,124,.14); background-clip: content-box; }
.table-scroll:hover::-webkit-scrollbar-thumb, .detail-scroll:hover::-webkit-scrollbar-thumb { background-color: rgba(91,107,124,.22); }
.matrix { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.buy-matrix { min-width: 980px; }
.sell-matrix { min-width: 1120px; }
.matrix col.stock-col { width: 96px; }
.matrix col.date-col { width: 72px; }
.matrix col.hold-col { width: 64px; }
.matrix col.anchor-col { width: 66px; }
.matrix col.result-col { width: 96px; }
.matrix th { position: sticky; top: 0; z-index: 4; height: 38px; padding: 0 var(--cell-px); background: #f2f3f2; border-bottom: 1px solid var(--line); color: #666e78; text-align: right; font-size: 11px; font-weight: 700; white-space: nowrap; }
.matrix td { height: var(--row-h); padding: 0 var(--cell-px); border-bottom: 1px solid var(--line-2); background: #fff; text-align: right; white-space: nowrap; }
.matrix tbody tr:last-child td { border-bottom: 0; }
.matrix tbody tr:hover td { box-shadow: inset 0 0 0 999px rgba(37,52,68,.025); }
.sort-head { width: 100%; height: 38px; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; font: inherit; font-weight: 700; }
.sort-head::after { color: var(--navy); font-size: 10px; line-height: 1; }
.sort-head[data-direction="desc"]::after { content: "↓"; }
.sort-head[data-direction="asc"]::after { content: "↑"; }
.sort-head:hover { color: var(--navy); }
.reset-sort { justify-content: flex-start; }
.reset-sort::after { content: ""; }
.reset-sort[data-reset-visible="true"]::after { content: "↺"; opacity: .9; }
.day-sort { justify-content: center; }
.matrix th:first-child, .matrix td:first-child { position: sticky; left: 0; z-index: 5; text-align: left; }
.matrix th:first-child { z-index: 9; }
.buy-matrix th:nth-child(2), .buy-matrix td:nth-child(2), .sell-matrix th:nth-child(2), .sell-matrix td:nth-child(2) { position: sticky; left: 96px; z-index: 4; background: #fff; }
.buy-matrix th:nth-child(2), .sell-matrix th:nth-child(2) { z-index: 8; background: #f2f3f2; }
.buy-matrix th:nth-child(3), .buy-matrix td:nth-child(3), .sell-matrix th:nth-child(3), .sell-matrix td:nth-child(3) { position: sticky; left: 168px; z-index: 3; background: #fff; }
.buy-matrix th:nth-child(3), .sell-matrix th:nth-child(3) { z-index: 7; background: #f2f3f2; }
.sell-matrix th:nth-child(4), .sell-matrix td:nth-child(4) { position: sticky; left: 232px; z-index: 3; background: #fff; }
.sell-matrix th:nth-child(4) { z-index: 7; background: #f2f3f2; }
.sell-matrix th:nth-child(5), .sell-matrix td:nth-child(5) { position: sticky; left: 298px; z-index: 2; border-right: 1px solid var(--line); background: #fff; }
.sell-matrix th:nth-child(5) { z-index: 6; background: #f2f3f2; }
.buy-matrix th:nth-child(3), .buy-matrix td:nth-child(3) { border-right: 1px solid var(--line); }
.identity { overflow: hidden; color: var(--ink); text-align: left !important; text-overflow: ellipsis; font-size: 13px; font-weight: 700; }
.date-cell, .hold-cell, .anchor { color: #65707e; font-variant-numeric: tabular-nums; }
.actual-result { font-weight: 750; font-variant-numeric: tabular-nums; }
.heat { border-bottom: 0 !important; text-align: center !important; font: 700 12px/1 "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.heat.up1 { color: #a23a34; background: #fff6f4; }.heat.up2 { color: #a53832; background: #ffebe8; }.heat.up3 { color: #a6332d; background: #fddbd6; }.heat.up4 { color: #9f2e28; background: #f8c7c0; }.heat.up5 { color: #92261f; background: #efaaa1; }.heat.up6 { color: #84211b; background: #df8b81; }.heat.up7 { color: #741b16; background: #d07066; }
.heat.down1 { color: #43794d; background: #f5faf6; }.heat.down2 { color: #3d7648; background: #e9f5eb; }.heat.down3 { color: #347140; background: #d8ecdc; }.heat.down4 { color: #2d6939; background: #c2e0c8; }.heat.down5 { color: #255f31; background: #9fcbaa; }.heat.down6 { color: #1e542b; background: #7fb68d; }.heat.down7 { color: #174824; background: #659f75; }
.heat.flat { color: #646b73; background: #f0f1f0; }
.heat.missing { color: #737b84; background: repeating-linear-gradient(-45deg,#fafafa,#fafafa 5px,#f2f2f0 5px,#f2f2f0 6px); font: 500 10px/1 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; }
.heat.source-missing { color: #8a5f33; background: repeating-linear-gradient(-45deg,#fffaf4,#fffaf4 5px,#f6eee3 5px,#f6eee3 6px); }
.matrix-foot { min-height: 36px; padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); background: #fafafa; color: var(--muted); font-size: 10px; }
.legend { display: flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; height: 7px; }
.swatch.down { width: 70px; background: linear-gradient(90deg,#659f75,#7fb68d,#9fcbaa,#c2e0c8,#d8ecdc,#e9f5eb,#f5faf6); }
.swatch.flat { width: 10px; background: #f0f1f0; }
.swatch.up { width: 70px; background: linear-gradient(90deg,#fff6f4,#ffebe8,#fddbd6,#f8c7c0,#efaaa1,#df8b81,#d07066); }

.insight-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(330px,1fr); gap: 14px; margin-bottom: 14px; }
.insight-card { min-width: 0; }
.insight-head { min-height: 66px; padding: 13px 16px 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.trend-card .insight-head { min-height: 58px; padding-bottom: 4px; align-items: center; }
.insight-title p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.trend-subrow { display: flex; align-items: center; gap: 11px; margin-top: 6px; color: #7e8792; font-size: 9px; }
.month-chip { padding: 2px 6px; border: 1px solid #dfe4e8; border-radius: 4px; background: #f7f8f8; color: #65717d; font-weight: 650; }
.trend-key { display: inline-flex; align-items: center; gap: 4px; }
.trend-key::before { width: 14px; height: 2px; background: #344e68; content: ""; }
.trend-key.added::before { width: 8px; height: 7px; border-radius: 2px; background: rgba(207,73,65,.62); }
.trend-metrics { display: flex; gap: 16px; }
.trend-metric { min-width: 67px; text-align: right; }
.trend-metric span, .trend-metric b { display: block; }
.trend-metric span { color: var(--muted); font-size: 9px; }
.trend-metric b { margin-top: 3px; color: var(--navy); font: 730 17px/1 "DIN Alternate","SFMono-Regular",Consolas,monospace; }
.trend-metric.added b { color: var(--red); }
.chart-scroll { overflow-x: auto; }
.trend-chart { display: block; width: 100%; min-width: 760px; height: 164px; }
.trend-chart .grid { stroke: #eceeef; stroke-width: 1; }.trend-chart .baseline { stroke: #d7dce0; stroke-width: 1; }.trend-chart .hold-area { fill: rgba(52,78,104,.055); }.trend-chart .hold-line { fill: none; stroke: #344e68; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }.trend-chart .add-bar { fill: rgba(207,73,65,.24); }.trend-chart .hold-point { fill: #344e68; stroke: #fff; stroke-width: 1.4; }.trend-chart text { font-family: -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif; }.trend-chart .hold-label { fill: #344e68; font-size: 8px; font-weight: 700; text-anchor: middle; }.trend-chart .add-label { fill: #c7443d; font-size: 8px; font-weight: 700; text-anchor: middle; }.trend-chart .date-label { fill: #707984; font-size: 7.2px; text-anchor: middle; }.trend-chart .row-label { fill: #69727c; font-size: 7px; font-weight: 650; }
.concept-list { padding: 3px 16px 15px; }
.concept-row { display: grid; grid-template-columns: 82px minmax(100px,1fr) 62px; align-items: center; gap: 10px; height: 34px; }
.concept-name { min-width:0; max-width:100%; justify-self:start; overflow: hidden; color: var(--ink-2); font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.concept-track { position: relative; height: 7px; overflow: hidden; border-radius: 4px; background: #edf0f2; }
.concept-track i { display: block; height: 100%; border-radius: 4px; }
.concept-row.positive .concept-track i { background: #d74b43; }.concept-row.negative .concept-track i { background: #2f876d; }
.concept-value { text-align: right; font: 700 11px/1 "SFMono-Regular",Consolas,monospace; }

.detail-card { margin-bottom: 20px; }
.detail-head { min-height: 72px; padding: 12px 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.detail-title span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.detail-title h2 { margin: 0; color: var(--navy); font-size: 20px; line-height: 1.15; }
.detail-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.detail-table { width: 100%; min-width: 1200px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12px; }
.detail-table:not(.do-t-table) col { width: 12.5%; }
.detail-table th { position: sticky; top: 0; z-index: 2; height: 40px; padding: 0 16px; background: #f3f3f2; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #69717c; text-align: left; font-size: 11px; font-weight: 700; white-space: nowrap; }
.detail-table td { height: var(--row-h); padding: 0 16px; border-bottom: 1px solid var(--line-2); color: #59616c; white-space: nowrap; }
.detail-table tbody tr:hover td { background: #fafafa; }
.detail-table th:first-child, .detail-table td:first-child { position: sticky; left: 0; z-index: 3; background: #fff; }
.detail-table th:first-child { z-index: 5; background: #f3f3f2; }
.detail-table th:last-child, .detail-table td:last-child { padding-right: 24px; text-align: right; }
.detail-sort-head { height: 40px; padding: 0; border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-weight: 700; }
.detail-sort-head[data-direction="desc"]::after { content: "↓"; }.detail-sort-head[data-direction="asc"]::after { content: "↑"; }.detail-reset-sort::after { content: ""; }.detail-reset-sort[data-reset-visible="true"]::after { content: "↺"; opacity: .9; }
.trade-name { color: var(--ink) !important; font-size: 13px; font-weight: 750; }.trade-theme { overflow: hidden; text-overflow: ellipsis; }.theme-tag { --theme-source:#646a73; --theme-tone-color:#fff; --theme-tone-weight:0%; --theme-bg-strength:13%; --theme-bg:color-mix(in srgb,var(--theme-source) var(--theme-bg-strength),#fff); --theme-text:color-mix(in srgb,var(--theme-source),var(--theme-tone-color) var(--theme-tone-weight)); display: inline-flex; align-items: center; max-width: 100%; height: 24px; margin-right: 4px; padding: 0 8px; overflow: hidden; border-radius: 4px; background:#eef0f2; background:var(--theme-bg); color:var(--theme-source); color:var(--theme-text); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.theme-blue { --theme-source:#1456f0 }.theme-wathet { --theme-source:#076a94 }.theme-green { --theme-source:#2ea121 }.theme-red { --theme-source:#d83931 }.theme-lime { --theme-source:#5c6d08 }.theme-carmine { --theme-source:#b82879 }.theme-purple { --theme-source:#6425d0 }.theme-orange { --theme-source:#a44904 }.theme-gray { --theme-source:#646a73 }.theme-turquoise { --theme-source:#067062 }.theme-yellow { --theme-source:#865b03 }.tone-lighter { --theme-tone-color:#fff;--theme-tone-weight:20%;--theme-bg-strength:9% }.tone-light { --theme-tone-color:#fff;--theme-tone-weight:10%;--theme-bg-strength:11% }.tone-standard { --theme-tone-color:#fff;--theme-tone-weight:0%;--theme-bg-strength:13% }.tone-dark { --theme-tone-color:#000;--theme-tone-weight:8%;--theme-bg-strength:15% }.tone-darker { --theme-tone-color:#000;--theme-tone-weight:16%;--theme-bg-strength:17% }
.price-pair, .holding-time, .trade-dates { font-variant-numeric: tabular-nums; }.price-pair i, .trade-dates i { margin: 0 7px; color: #adb2b8; font-style: normal; }.trade-pnl, .trade-amount { font: 750 13px/1 "SFMono-Regular",Consolas,monospace; font-variant-numeric: tabular-nums; }
.detail-table tbody tr[data-trade-chart], .detail-table tbody tr[data-do-t-chart] { cursor: pointer; }
.detail-table tbody tr[data-trade-chart]:focus-visible, .detail-table tbody tr[data-do-t-chart]:focus-visible { outline: none; }
.detail-table tbody tr[data-trade-chart]:focus-visible td, .detail-table tbody tr[data-do-t-chart]:focus-visible td { background: #f2f4f5; }
.detail-table tbody tr[data-trade-chart]:focus-visible td:first-child, .detail-table tbody tr[data-do-t-chart]:focus-visible td:first-child { box-shadow: inset 3px 0 0 #59616c; }
.trade-chart-dialog { width: min(94vw,1320px); max-width: none; max-height: 92vh; padding: 0; overflow: hidden; border: 1px solid #d8dde1; border-radius: 9px; background: #fff; color: var(--ink); box-shadow: 0 18px 60px rgba(22,32,44,.22); }
.trade-chart-dialog::backdrop { background: rgba(25,35,47,.42); }
.trade-chart-panel { display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; max-height: 92vh; }
.trade-chart-tabs { display:flex; align-items:center; gap:32px; min-height:48px; padding:0 18px; border-bottom:1px solid var(--line); }
.trade-chart-tabs button { align-self:stretch; padding:0 2px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--muted); font-family:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.trade-chart-tabs button[aria-selected="true"] { border-bottom-color:var(--navy); color:var(--navy); }
.trade-chart-tabs button:focus-visible { outline:1px solid rgba(89,97,108,.55); outline-offset:-3px; }
.trade-chart-scroll[data-chart-view="minute"] > :not(#tradeMinuteView) { display:none!important; }
.trade-minute-view[hidden] { display:none!important; }
.trade-minute-view { min-height:420px; width:100%; }
.trade-minute-loading, .trade-minute-error { min-height:420px; padding:40px 24px; display:grid; place-items:center; align-content:center; gap:10px; color:var(--muted); font-size:13px; text-align:center; }
.trade-minute-error b { color:var(--ink-2); font-size:15px; }
.trade-minute-error button { margin-top:8px; min-height:32px; padding:0 16px; border:1px solid var(--line); border-radius:4px; background:#fff; color:var(--navy); cursor:pointer; }
.trade-minute-loading[hidden], .trade-minute-error[hidden], #tradeMinuteImage[hidden] { display:none!important; }
.trade-chart-scroll #tradeMinuteImage { display:block; width:100%; min-width:0; min-height:0; height:auto; object-fit:contain; }
@media(max-width:767px),(max-width:932px) and (orientation:landscape) and (max-height:500px) { body.mobile-trade-review-active .trade-chart-tabs { display:none!important; } }
.trade-chart-head { min-height: 56px; padding: 9px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.trade-chart-identity { min-width: 0; display: flex; align-items: baseline; }
.trade-chart-head h2 { display: inline; margin: 0; color: var(--navy); font-size: 19px; }
.trade-chart-head p { display: inline; margin: 0 0 0 10px; color: var(--muted); font-size: 11px; }
.trade-chart-profit-label { margin-left: 14px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.trade-chart-profit { margin-left: 4px; color: var(--ink); font: 750 13px/1 "SFMono-Regular",Consolas,monospace; }
.trade-chart-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.trade-chart-head button { height: 36px; padding: 0; border: 1px solid #d9dde1; border-radius: 6px; background: #fff; color: #65707c; line-height: 1; cursor: pointer; }
.trade-chart-nav-button { min-width: 72px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 650; }
.trade-chart-nav-button i { font: normal 22px/1 system-ui,sans-serif; }
.trade-chart-head .trade-chart-close { width: 36px; border: 0; border-color: transparent; border-radius: 0; background: transparent; box-shadow: none; font-size: 24px; }
.trade-chart-head button:hover:not(:disabled) { border-color: #bfc6cc; background: #f5f6f6; color: var(--navy); }
.trade-chart-head .trade-chart-nav-button { border: 0; background: transparent; box-shadow: none; text-decoration: none; transition: color .14s ease,opacity .14s ease; }
.trade-chart-head .trade-chart-nav-button span { text-decoration: none; }
.trade-chart-head .trade-chart-nav-button:hover:not(:disabled) { border: 0; background: transparent; box-shadow: none; text-decoration: none; color: var(--navy); }
.trade-chart-head .trade-chart-nav-button:active:not(:disabled) { border: 0; outline: none; background: transparent; box-shadow: none; text-decoration: none; opacity: .72; }
.trade-chart-head .trade-chart-close:hover:not(:disabled) { border: 0; border-color: transparent; background: transparent; color: var(--navy); box-shadow: none; }
.trade-chart-head button:disabled { cursor: default; opacity: .34; }
.trade-chart-nav-button:focus { border: 0; outline: none; background: transparent; box-shadow: none; text-decoration: none; }
.trade-chart-nav-button:focus-visible { border: 0; outline: none; background: transparent; color: var(--navy); box-shadow: none; text-decoration: none; }
.trade-chart-close:focus-visible { border: 0; border-color: transparent; outline: none; background: transparent; color: var(--navy); box-shadow: none; }
.trade-chart-scroll { position: relative; overflow: auto; min-height: 420px; max-height: calc(92vh - 100px); background: #fff; scrollbar-width: thin; scrollbar-color: rgba(91,107,124,.24) transparent; }
.trade-chart-scroll:focus { outline: none; }
.trade-chart-scroll:focus-visible { outline: 1px solid rgba(89,97,108,.36); outline-offset: -1px; }
.trade-chart-scroll.is-switching::after { content: ""; position: absolute; z-index: 2; top: 14px; right: 14px; width: 18px; height: 18px; border: 2px solid rgba(89,97,108,.18); border-top-color: #59616c; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,255,255,.86); opacity: 0; animation: trade-chart-spinner-show 0s linear .16s forwards,trade-chart-spin .8s linear infinite; pointer-events: none; }
.trade-chart-scroll img { display: block; width: auto; min-width: max(100%, var(--chart-width, 1080px)); height: auto; min-height: 420px; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.trade-chart-loading { min-height: 500px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 12px; }
.trade-chart-loading::before { content: ""; width: 24px; height: 24px; border: 2px solid #d9dee2; border-top-color: var(--navy-2); border-radius: 50%; animation: trade-chart-spin .8s linear infinite; }
@keyframes trade-chart-spin { to { transform: rotate(360deg); } }
@keyframes trade-chart-spinner-show { to { opacity: 1; } }
.trade-chart-error { min-height: 420px; padding: 50px 24px; display: grid; place-items: center; align-content: center; gap: 8px; text-align: center; }
.trade-chart-error b { color: var(--ink-2); font-size: 15px; }.trade-chart-error > span { color: var(--muted); font-size: 12px; }
.trade-chart-fallback { margin-top: 10px; display: grid; grid-template-columns: repeat(4,minmax(120px,1fr)); border: 1px solid var(--line); }
.trade-chart-fallback div { padding: 9px 14px; border-right: 1px solid var(--line); text-align: left; }.trade-chart-fallback div:last-child { border-right: 0; }
.trade-chart-fallback span { display: block; color: var(--muted); font-size: 10px; }.trade-chart-fallback strong { display: block; margin-top: 3px; color: var(--ink); font-size: 12px; }
.trade-chart-foot { min-height: 43px; padding: 0 18px; display: flex; align-items: center; border-top: 1px solid var(--line); background: #fafafa; color: var(--muted); font-size: 10px; }
@media (min-width:933px), (min-width:768px) and (min-height:501px) {
  .trade-chart-dialog { height:min(92vh, 720px); height:min(92dvh, 720px); }
  .trade-chart-panel { height:100%; max-height:none; }
  .trade-chart-head { min-height:50px; padding-top:6px; padding-bottom:6px; }
  .trade-chart-tabs { min-height:40px; }
  .trade-chart-foot { min-height:30px; }
  .trade-chart-scroll { min-height:0; max-height:none; }
  .trade-minute-view { position:relative; width:100%; height:100%; min-height:0; }
  .trade-minute-loading, .trade-minute-error { min-height:0; height:100%; }
  .trade-minute-error.is-overlay { position:absolute; z-index:3; right:12px; bottom:12px; width:min(420px, calc(100% - 24px)); height:auto; min-height:0; padding:10px 12px; border:1px solid #e2d8d6; border-radius:6px; background:rgba(255,255,255,.97); box-shadow:0 3px 14px rgba(22,32,44,.12); }
  .trade-chart-scroll #tradeMinuteImage { width:100%; height:100%; max-height:100%; object-fit:contain; }
}
.empty-state, .error-state, .loading-state { min-height: 132px; padding: 38px 20px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.empty-state b, .error-state b { color: var(--ink-2); font-size: 14px; }.empty-state span, .error-state span { max-width: 560px; font-size: 12px; }.error-state b { color: #983d37; }.state-action { margin-top: 5px; min-height: 30px; padding: 5px 12px; border: 1px solid #d3d9df; border-radius: 5px; background: #fff; color: var(--navy); text-decoration: none; }

@media (max-width: 1439px) {
  .settlement { grid-template-columns: minmax(250px,.8fr) minmax(560px,2.2fr); }
  .settlement > .outcomes { grid-column: 1 / -1; margin: -1px 0 0; grid-template-columns: 140px 1fr 260px; grid-template-rows: 1fr; align-items: center; min-height: 76px; }
  .outcome-main { width: 100%; }
  .outcome-list { justify-self: end; width: 240px; }
}

@media (max-width: 1119px) {
  .review-page { padding-left: 14px; padding-right: 14px; }
  .scope-bar { flex-wrap: wrap; gap: 8px 14px; }
  .scope-rule { margin-left: 0; }
  .settlement { grid-template-columns: 250px minmax(560px,1fr); }
  .insight-grid { grid-template-columns: minmax(0,1.45fr) minmax(300px,1fr); }
  .matrix { width: 1120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
