.tsb-review-dialog {position:fixed;inset:20px;margin:auto;padding:0;border:1px solid var(--app-border-default,#e5e6e2);border-radius:12px;width:calc(100vw - 40px);height:calc(100dvh - 40px);max-width:1600px;max-height:calc(100dvh - 40px);overflow:hidden;box-shadow:0 24px 90px #24272230;background:var(--jw-surface,var(--bg-primary,#fff))}
.tsb-review-dialog::backdrop {background:#24272255}
.tsb-review-dialog iframe {display:block;width:100%;height:100%;border:0}
.tsb-review-dialog .tsb-review-history[hidden] {display:none!important}
.tsb-review-dialog.tsb-review-quick {width:min(1180px,calc(100vw - 64px));height:min(790px,calc(100dvh - 64px));inset:0;margin:auto;max-width:none;max-height:none}
/* Both sizes share the same centre, including an interrupted reverse transition. */
.tsb-review-dialog.tsb-review-quick[open] {transition:width 220ms cubic-bezier(.2,.8,.2,1),height 220ms cubic-bezier(.2,.8,.2,1),border-radius 220ms cubic-bezier(.2,.8,.2,1),border-width 220ms cubic-bezier(.2,.8,.2,1),box-shadow 220ms cubic-bezier(.2,.8,.2,1)}
.tsb-review-dialog.tsb-review-quick.is-expanded {inset:0;margin:auto;width:100%;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;box-shadow:none}
@media(prefers-reduced-motion:reduce){.tsb-review-dialog.tsb-review-quick[open]{transition:none}}
html[data-reduce-motion=true] .tsb-review-dialog.tsb-review-quick[open]{transition:none}
.tsb-review-loading {position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:20px;background:var(--jw-surface,var(--bg-primary,#fff));color:var(--jw-muted,#71746e);font:14px 'TSB Inter',sans-serif;z-index:2}
.tsb-review-loading[hidden] {display:none}
/* Selection is re-attested before mounting Review. A slow read acknowledges
   the clicked action without exposing stale trades or changing its geometry. */
.journal-workspace-native :is(.j-history-symbol,.journal-calendar-trade,#review-next-btn)[aria-busy=true]{cursor:progress;color:var(--jw-accent-text);background-image:linear-gradient(90deg,transparent 0 25%,var(--jw-accent-text) 40% 60%,transparent 75% 100%);background-size:200% 2px;background-position:100% 100%;background-repeat:no-repeat;animation:tsb-review-opening 800ms ease-in-out infinite}
@keyframes tsb-review-opening{to{background-position:-100% 100%}}
@media(prefers-reduced-motion:reduce){.journal-workspace-native :is(.j-history-symbol,.journal-calendar-trade,#review-next-btn)[aria-busy=true]{animation:none;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:4px}}
html[data-reduce-motion=true] .journal-workspace-native :is(.j-history-symbol,.journal-calendar-trade,#review-next-btn)[aria-busy=true]{animation:none;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:4px}
.tsb-review-loading button {padding:10px 16px;background:var(--jw-surface,var(--bg-primary,#fff));border:1px solid var(--app-border-default,#dcded7);border-radius:6px;font:inherit;cursor:pointer}
@media(max-width:750px) {.tsb-review-dialog {inset:0;margin:0;width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;border:0;border-radius:0}}
@media(max-width:750px) {.tsb-review-dialog.tsb-review-quick,.tsb-review-dialog.tsb-review-quick.is-expanded {inset:0;width:100vw;height:100dvh}}
/* Selected Journal split review; same contextual editor and guarded queue. */
.tsb-review-dialog.tsb-review-workbench {inset:var(--review-host-top,72px) 0 0 var(--review-host-left,216px);margin:0;width:calc(100vw - var(--review-host-left,216px));height:calc(100dvh - var(--review-host-top,72px));max-width:none;max-height:none;border:0;border-top:1px solid var(--jw-divider,#dcded6);border-radius:0;box-shadow:none;display:grid;grid-template-columns:minmax(420px,1fr) minmax(500px,.9fr);grid-template-rows:auto minmax(0,1fr);background:var(--jw-surface,var(--bg-primary,#fff));color:var(--jw-ink,#20231f);font:14px/1.45 'TSB Inter',sans-serif;z-index:90}
.tsb-review-dialog.tsb-review-workbench::backdrop {background:transparent}
.tsb-review-context {grid-column:1/-1;grid-row:1;display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;box-sizing:border-box;min-height:54px;padding:12px 24px;border-bottom:1px solid var(--jw-divider,#dcded6);font-size:14px; line-height: 22px;color:var(--jw-muted,#71746e);background:var(--jw-surface,var(--bg-primary,#fff))}
.tsb-review-context strong {color:var(--jw-ink,#18181b);font-size:14px; line-height: 22px;font-weight:600;font-variant-numeric:tabular-nums}
.tsb-review-context strong[data-tone="positive"] {color:var(--jw-positive-text,var(--app-positive, #449a6b))}
.tsb-review-context strong[data-tone="negative"] {color:var(--jw-negative-text,#c92a42)}
.tsb-review-context[hidden] {display:none}
.tsb-review-context .tsb-review-period {min-height:28px;padding:0;border:0;background:transparent;color:var(--jw-muted,var(--text-secondary,#5d5d68));font:inherit;font-size:14px;font-weight:600;cursor:pointer;text-align:left}
.tsb-review-context .tsb-review-period:hover {color:var(--jw-accent-text,var(--app-accent-text,#443ab8));text-decoration:underline;text-underline-offset:3px}
.tsb-review-context .tsb-review-period:focus-visible {outline:2px solid var(--jw-accent-text,var(--app-accent-text,#443ab8));outline-offset:3px}
.tsb-review-workbench iframe {grid-column:2;grid-row:2;min-width:0;min-height:0}
/* The review arrives from the right when a trade is opened from the table (the list beside it stays still). */
.tsb-review-dialog.tsb-review-workbench[open] iframe {animation:tsb-review-side-enter 240ms cubic-bezier(.2,.8,.2,1) both}
@keyframes tsb-review-side-enter {from {opacity:0;transform:translateX(24px)}}
@media(prefers-reduced-motion:reduce){.tsb-review-dialog.tsb-review-workbench[open] iframe{animation:none}}
html[data-reduce-motion=true] .tsb-review-dialog.tsb-review-workbench[open] iframe{animation:none}
.tsb-review-history {--app-control-label-weight:500;grid-column:1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) 108px;align-content:start;gap:10px 8px;min-width:0;overflow:auto;border-right:1px solid var(--jw-line,var(--app-border-soft,#e4e4e8));padding:20px;background:var(--jw-surface,var(--bg-primary,#fff))}
.tsb-review-history h2 {grid-column:1;grid-row:1;font-size:20px; line-height: 28px;letter-spacing:-.03em;font-weight:600;margin:0 0 4px}
.tsb-review-history>p {font-size:14px; line-height: 22px;color:var(--jw-muted,#71746e);margin:0 0 18px}
.tsb-review-history>[data-review-history-count] {grid-column:2;grid-row:1;align-self:center;text-align:right;font-size:14px;line-height:20px;margin:0 0 4px}
.tsb-review-history input[type="search"] {font:inherit;width:100%;max-width:none;min-height:40px;padding:8px 12px;border:1px solid var(--jw-border,var(--app-border-default,#ceced5));border-radius:6px;background:var(--jw-surface,var(--bg-primary,#fff));color:var(--jw-ink,#18181b);margin-bottom:0}
.tsb-review-history input[type="search"]::placeholder {color:var(--jw-muted,var(--text-secondary,#5d5d68));opacity:1}
/* Reparented original Journal controls retain their owners and native form state. */
.tsb-review-history [hidden] {display:none!important}
.tsb-review-history .journal-history-read-status>[data-history-read-retry] {margin-left:32px;min-height:44px}
.tsb-review-history .journal-history-read-status [data-history-read-detail]::before {content:none}
.tsb-review-history * {box-sizing:border-box}
.tsb-review-history :is(button,input,select) {font-family:inherit}
.tsb-review-history svg {width:18px;height:18px;flex-shrink:0;stroke-width:1.7}
.tsb-review-history [data-review-query-controls],.tsb-review-history .journal-query-tools {display:contents}
.tsb-review-history .journal-query-tools .filters-search {grid-column:1;grid-row:2;width:100%;max-width:none;min-width:0}
.tsb-review-history .journal-filters-toggle {grid-column:2;grid-row:2;width:100%}
.tsb-review-history .journal-workspace-sort {flex:0 0 108px;width:108px;min-width:0}
.tsb-review-history .journal-workspace-sort select {width:100%;min-width:0;padding-inline:10px}
.tsb-review-history .filters-search input {min-height:38px}
.tsb-review-history .app-action-btn,.tsb-review-history .btn-reset-filters {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:8px 12px;background:var(--jw-surface,var(--bg-primary,#fff));border:1px solid var(--jw-border,#d8dce6);border-radius:6px;color:var(--jw-ink,#171b2a);font-size:14px;line-height:20px;font-weight:500;cursor:pointer}
.tsb-review-history .app-action-btn:hover,.tsb-review-history .btn-reset-filters:hover {background:var(--jw-hover,var(--app-action-bg-hover,color-mix(in srgb,var(--text-primary,#262728) 6%,var(--bg-primary,#fff))));border-color:var(--app-border-hover,var(--jw-border,#d9dbde))}
.tsb-review-history .journal-filters-panel {grid-column:1/-1;grid-row:4;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;padding:12px;gap:12px}
.tsb-review-history .journal-filters-panel>.btn-reset-filters {grid-column:2}
.tsb-review-history .journal-filters-panel .filter-input-inline {width:100%}
.tsb-review-view-controls {grid-column:1/-1;grid-row:3;display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.tsb-review-view-controls>[data-review-sort-control] {display:contents}
.tsb-review-view-controls>.app-view-toggle {flex:none;width:max-content;max-width:100%;margin:0;justify-content:flex-start;gap:3px}
.tsb-review-view-controls>.app-view-toggle button {min-width:0;cursor:pointer}
.tsb-review-history>[data-review-selection-context] {grid-column:1/-1;font-size:14px;line-height:20px;padding:8px 10px;margin:0;border-left:2px solid var(--jw-accent,#443ab8);background:var(--jw-accent-soft,#efedf9)}
.tsb-review-history-rows,.tsb-review-history [data-review-history-pagination] {grid-column:1/-1}
.tsb-review-history [data-review-table] {grid-column:1/-1;min-width:0}
.tsb-review-display-controls {display:flex;align-items:center;justify-content:flex-end;flex:1 1 280px;gap:8px;min-width:0;margin-left:auto}
.tsb-review-history .journal-display-menu {margin-left:0}
.tsb-review-history .table-scroll {scrollbar-width:thin;scrollbar-color:var(--jw-divider,#dcded6) transparent}
.tsb-review-history [data-review-table]:empty {display:none}
.tsb-review-history #table-view {margin:0;border:0}
.tsb-review-history :is(#cards-view,#calendar-view){margin:0;min-width:0;width:100%;box-sizing:border-box}
.tsb-review-history #cards-grid{width:100%;padding:0;min-width:0}
.tsb-review-history [data-review-table]{container:review-source / inline-size}
.tsb-review-history .journal-list-layout{display:block}
.tsb-review-history .journal-list-calendar{display:none}
.tsb-review-history .journal-calendar-layout{grid-template-columns:minmax(0,1fr)}
.tsb-review-history .journal-calendar-selected{padding:18px 0 0;border-left:0;border-top:1px solid var(--jw-divider)}
.tsb-review-history :is(.j-list-record,.j-gallery,.trade-card)[aria-current=true]{background:var(--jw-accent-soft);box-shadow:none}
@container review-source (max-width:700px){.tsb-review-history .j-week-days{overflow-x:auto;grid-template-columns:repeat(7,minmax(106px,1fr))}.tsb-review-history .journal-calendar-day{min-height:92px;padding-inline:5px}.tsb-review-history .j-week-heading{flex-wrap:wrap}}
.tsb-review-history .trades-table .profit-positive .table-pl-main {color:var(--jw-positive-text,var(--app-positive, #449a6b))}
.tsb-review-history .trades-table .profit-negative .table-pl-main {color:var(--jw-negative-text,#dc304a)}
.tsb-review-history .trades-table tr[aria-current=true] {background:var(--jw-accent-soft,#443ab80f);box-shadow:none}
.tsb-review-history [data-review-history-pagination] {margin-top:6px}
.tsb-review-history .journal-load-more-wrap {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;color:var(--jw-muted,#71746e);font-size:14px; line-height: 22px;}
.tsb-review-history .journal-load-more-btn {display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;font:inherit;color:var(--jw-ink,#171b2a);min-height:36px;padding:7px 10px;background:var(--jw-surface,var(--bg-primary,#fff));border:1px solid var(--jw-border,#d8dce6);border-radius:6px;cursor:pointer}
.tsb-review-history-rows h3 {font-size:14px; line-height: 22px;font-weight:600;background:var(--jw-soft,var(--bg-secondary,#f5f5fa));margin:8px -8px 0;padding:9px 8px}
.tsb-review-history-row {display:grid;grid-template-columns:minmax(0,1fr) 46px max-content max-content;gap:5px 8px;align-items:center;width:100%;min-height:68px;padding:10px 8px;background:var(--jw-surface,var(--bg-primary,#fff));border:0;border-bottom:1px solid var(--jw-line,var(--app-border-soft,#ebebef));text-align:left;font:inherit;color:inherit;cursor:pointer}
.tsb-review-history-row:hover {background:var(--jw-hover,var(--app-action-bg-hover,color-mix(in srgb,var(--text-primary,#262728) 6%,var(--bg-primary,#fff))))}
.tsb-review-history-row[aria-current=true] {background:var(--jw-accent-soft,#f1effb);box-shadow:none}
.tsb-review-history-row:disabled {cursor:wait}
.tsb-review-history-identity {min-width:0;grid-row:1/3}
.tsb-review-history-identity strong {display:block;font-size:16px; line-height: 24px;font-weight:600;overflow-wrap:anywhere}
.tsb-review-history-identity small {font-size:12px; line-height: 18px;color:var(--jw-muted,var(--text-secondary,#5d5d68));overflow-wrap:anywhere}
.tsb-review-history-identity small+small {white-space:nowrap;font-size:12px; line-height: 18px;}
.tsb-review-history-side {font-size:12px; line-height: 18px;grid-column:2;grid-row:1/3}
.tsb-review-history-side[data-side=long],.tsb-review-history-result[data-tone=positive] {color:var(--jw-positive-text,var(--app-positive-text,#2f7d54))}
.tsb-review-history-side[data-side=short],.tsb-review-history-result[data-tone=negative] {color:var(--jw-negative-text,var(--app-negative-text,#bf2d23))}
.tsb-review-history-result {grid-column:3;grid-row:1/3;display:flex;flex-direction:column;gap:2px;text-align:right;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.tsb-review-history-result strong {font-size:16px; line-height: 24px;font-weight:600;white-space:nowrap}
.tsb-review-history-result small {font-size:12px; line-height: 18px;font-weight:400;color:var(--jw-muted,var(--text-secondary,#5d5d68))}
.tsb-review-history-status {grid-column:4;grid-row:1/3;justify-self:end;font-size:12px; line-height: 18px;border-radius:6px;padding:3px 7px;color:var(--jw-muted,var(--text-secondary,#5d5d68));background:var(--jw-soft,var(--bg-secondary,#f4f3f9))}
.tsb-review-history-row:has(.tsb-review-history-media) .tsb-review-history-status {grid-row:1;align-self:end}
.tsb-review-history-media {grid-column:4;grid-row:2;justify-self:end;display:flex;align-items:center;gap:8px;color:var(--jw-muted,var(--text-secondary,#5d5d68))}
.tsb-review-history-media svg {width:14px;height:14px;display:block;stroke-width:1.7}
.tsb-review-history-status[data-reviewed=true] {color:var(--jw-positive-text,var(--app-positive-text,#2f7d54));background:var(--jw-positive-soft,var(--app-positive-soft,#eaf7f2))}
.tsb-review-history-status[data-state=open] {color:var(--jw-accent,#443ab8);background:var(--jw-accent-soft,#efedf9)}
/* Shared intrinsic result column keeps every complete amount aligned. */
@supports (grid-template-columns:subgrid) {
.tsb-review-history-rows {display:grid;grid-template-columns:minmax(0,1fr) 46px max-content 92px;column-gap:8px}
.tsb-review-history-rows>h3,.tsb-review-history-rows>p {grid-column:1/-1}
.tsb-review-history-row {grid-column:1/-1;grid-template-columns:subgrid}
}
.tsb-review-history :is(button,input):focus-visible,.tsb-review-workbench-tools button:focus-visible {outline:2px solid var(--jw-accent-text,var(--app-accent-text,#443ab8));outline-offset:2px}
.tsb-review-workbench-tools {display:none}
@media(max-width:1449px) {
.tsb-review-dialog.tsb-review-workbench {inset:0;width:100vw;height:100dvh;grid-template-columns:minmax(0,1fr);grid-template-rows:52px minmax(0,1fr);border:0}
.tsb-review-workbench .tsb-review-context {display:none}
.tsb-review-workbench iframe {grid-column:1;grid-row:2}
.tsb-review-workbench .tsb-review-history {display:none;grid-column:1;grid-row:2;border:0}
.tsb-review-workbench.is-showing-history iframe {visibility:hidden}
.tsb-review-workbench.is-showing-history .tsb-review-history {display:grid}
.tsb-review-workbench .tsb-review-workbench-tools {display:flex;grid-column:1;grid-row:1;align-items:center;justify-content:space-between;padding:8px 16px;border-bottom:1px solid var(--jw-line,var(--app-border-soft,#e4e4e8));background:var(--jw-surface,var(--bg-primary,#fff))}
.tsb-review-workbench-tools button {font:inherit;color:var(--jw-accent-text,var(--app-accent-text,#443ab8));background:var(--jw-surface,var(--bg-primary,#fff));border:0;padding:6px 0;min-height:36px;cursor:pointer}
.tsb-review-workbench:not(.is-showing-history):has(.tsb-review-loading[hidden]) .tsb-review-workbench-tools button:last-child {display:none}
}
@media(max-width:600px) {
.tsb-review-history {grid-template-columns:repeat(2,minmax(0,1fr))}
.tsb-review-history .journal-query-tools .filters-search {grid-column:1/-1;grid-row:2}
.tsb-review-history .journal-filters-toggle {grid-column:1/-1;grid-row:3}
.tsb-review-history .journal-workspace-sort {flex:1 1 108px;width:auto}
.tsb-review-view-controls {grid-row:4}
.tsb-review-history .journal-filters-panel {grid-row:5}
.tsb-review-history .journal-filters-panel {grid-template-columns:minmax(0,1fr)}
.tsb-review-history .journal-filters-panel>.btn-reset-filters {grid-column:1;grid-row:auto;justify-self:start}
.tsb-review-view-controls>.app-view-toggle {width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
.tsb-review-history .app-view-toggle-btn {min-height:40px;padding-inline:8px;gap:5px;font-size:14px; line-height: 22px;}
.tsb-review-history .app-view-toggle-btn svg {width:15px;height:15px}
.tsb-review-history-row {grid-template-columns:minmax(0,1fr) max-content;gap:5px 12px;min-height:84px}
.tsb-review-history-identity {grid-column:1;grid-row:1/3}
.tsb-review-history-result {grid-column:2;grid-row:1/3}
.tsb-review-history-side {grid-column:1;grid-row:3}
.tsb-review-history-status,.tsb-review-history-row:has(.tsb-review-history-media) .tsb-review-history-status {grid-column:2;grid-row:3}
.tsb-review-history-media {grid-column:1;grid-row:4}
@supports (grid-template-columns:subgrid) {
.tsb-review-history-rows {grid-template-columns:minmax(0,1fr) max-content;column-gap:12px}
.tsb-review-history-row {grid-template-columns:subgrid}
}
}
/* The existing Journal gallery is temporarily hosted above the editor, so
 * its viewport and top layer belong to the workspace rather than the iframe. */
.journal-review-image-host{padding:0;margin:0;border:0;border-radius:0;max-width:none;max-height:none;width:100vw;height:100dvh;background:transparent;overflow:hidden}
.journal-review-image-host .screenshot-lightbox-overlay{position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box}
