/* Spacing and accessibility only: preserve the existing palette, fonts and chart geometry. */
:where(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--green,#17A57F);outline-offset:3px}input[aria-invalid=true],select[aria-invalid=true],textarea[aria-invalid=true]{border-color:var(--red,#e57983)!important}form[aria-busy=true] [aria-disabled=true]{opacity:.65;cursor:wait;pointer-events:none}
.nb-tool-menu,.record-more-menu{box-sizing:border-box;max-width:calc(100vw - 24px);overscroll-behavior:contain}.nb-tool-menu button,.record-more-menu button{line-height:1.35;overflow-wrap:anywhere}.nb-page-top{gap:7px;min-width:0}.nb-page-top .nb-preview-category{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#journalView .journal-record{min-width:0}#journalView .journal-record .record-info{padding:10px 12px}#journalView .journal-record .record-actions{gap:7px;padding:7px 12px;min-height:38px}#journalView .journal-record .record-result{font-variant-numeric:tabular-nums}#journalView .journal-record-heading h3{line-height:1.35}#journalView .record-more summary{min-height:34px;display:inline-flex;align-items:center;justify-content:center}#journalView .record-actions button{min-height:34px}#reviewView .review-metrics{gap:9px}#reviewView .review-metrics>.card{padding:12px 14px;min-width:0}#reviewView .review-metrics small{line-height:1.45}#marketsView .markets-grid>.panel{padding:14px}#marketsView .market-kpis>div{padding:11px 12px}#marketsView .market-resource-links{gap:8px}#marketsView .market-resource-links a{padding:10px 12px}
#userView .identity-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px}#userView .identity-actions>*{margin:0}#userView .user-avatar,#userInitials{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1}#profileView .inputs>*{min-width:0}.dialog-actions{gap:7px}.dialog-actions button{line-height:1.35}.auth{position:relative;box-sizing:border-box}.auth .auth-brand{display:inline-flex;align-items:center;max-width:calc(100% - 42px)}.auth .auth-brand img{display:block;width:170px;max-width:100%;height:auto;object-fit:contain}.auth .auth-logo-light{display:none!important}html[data-theme=light] .auth .auth-logo-dark{display:none!important}html[data-theme=light] .auth .auth-logo-light{display:block!important}.auth .auth-theme-toggle{position:absolute;right:18px;top:20px;width:34px!important;height:34px;min-height:34px!important;margin:0!important;padding:7px!important;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--surface);color:var(--ink);border:1px solid var(--line)}.auth .auth-theme-toggle svg{width:18px;height:18px}.auth label{min-width:0}.auth input,.auth select,.auth textarea{box-sizing:border-box;max-width:100%;min-width:0}.auth input:not([type=checkbox]):not([type=radio]){width:100%}.auth .message:empty{display:none}.auth p{overflow-wrap:anywhere}
@media(max-width:760px){#journalView .journal-record .record-info{padding:9px 10px}#journalView .journal-record .record-actions{padding:6px 10px;gap:5px}#reviewView .review-metrics>.card{padding:10px 11px}#marketsView .markets-grid>.panel{padding:12px}#marketsView .market-event{padding:9px 0}#userView .user-identity{padding:16px!important}#userView .user-identity h2{font-size:23px}#userView .identity-actions>*{min-height:38px!important;padding:8px 11px!important}.auth{padding:20px!important}.auth .auth-theme-toggle{right:14px;top:16px}dialog input:not([type=checkbox]):not([type=radio]),dialog select,dialog textarea,.auth input:not([type=checkbox]):not([type=radio]),.auth select,.auth textarea{font-size:16px!important}.dialog-actions>button{min-height:38px!important;padding:8px 12px!important}.public-header nav,.public-page-content,.contact-layout,.contact-form,.calc-grid,.calc-panel{min-width:0}#userView .user-links{gap:6px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}.public-header,.public-header *,#journalView .journal-record,.page-nav-item,.setup-tab{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Signed-in workspace refinements. Existing brand, editor and charts remain native. */
html body.workspace-studio{--workspace-control:38px;--workspace-gap:8px}
html body.workspace-studio main :is(.heading,.panel-title){min-width:0;align-items:center;gap:10px}
html body.workspace-studio main .heading{margin-bottom:14px}
html body.workspace-studio main :is(.heading,.panel-title)>div{min-width:0}
html body.workspace-studio main :is(.heading,.panel-title) :is(h1,h2,h3){text-wrap:balance}
html body.workspace-studio :is(.secondary,.dialog-actions>button,.identity-actions>a,.identity-actions>button){min-height:var(--workspace-control);box-sizing:border-box;line-height:1.3;align-items:center;justify-content:center;font-weight:500}
html body.workspace-studio :is(.journal-options-trigger,.nb-icon-button,#reviewFilterDrawer>summary,#backToDesk){display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box;flex-shrink:0;vertical-align:middle}
html body.workspace-studio :is(button,summary) svg{flex-shrink:0;vertical-align:middle}
html body.workspace-studio :is(.review-tabs,.market-tabs,.timeframes){align-items:center;scrollbar-width:thin;scroll-padding-inline:8px}
html body.workspace-studio :is(.review-tabs,.market-tabs) button{min-height:36px;white-space:nowrap}
html body.workspace-studio :is(.field,.inputs>*){min-width:0}
html body.workspace-studio :is(.field input,.field select,.field textarea){max-width:100%;box-sizing:border-box}
html body.workspace-studio :is(.error,.success-note,.strategy-entry-confirmations):empty{display:none}
/* A stable two-column reading order, with complex answers on their own row. */
html body.workspace-studio #deskView #checklist.modern-checklist #checks .check{gap:9px!important;padding:6px 7px!important;margin-bottom:3px!important}
html body.workspace-studio #deskView #checklist.modern-checklist #checks .check.confirmed{padding:6px 7px!important;background:color-mix(in srgb,var(--green) 13%,var(--surface))!important;box-shadow:inset 2px 0 var(--green)}
html body.workspace-studio #deskView #checklist.modern-checklist #checks .check>div{min-width:0;flex:1}
html body.workspace-studio #deskView #checklist.modern-checklist #checks .check>div>span:empty{display:none!important}
html body.workspace-studio #deskView #checklist.modern-checklist #checks .check>div:has(>.confirmation-value:not(textarea)){display:grid!important;grid-template-columns:minmax(0,1fr) minmax(100px,1fr)!important;align-items:center;gap:3px 8px!important}
html body.workspace-studio #deskView #checks .check>div>.confirmation-value:not(textarea){grid-column:2;grid-row:1 / span 2;min-width:0;width:100%;max-width:100%}
html body.workspace-studio #deskView #checks .check>div>strong{overflow-wrap:anywhere}
html body.workspace-studio #deskView #checks .check>div>span:not(:empty){font-size:12px;line-height:1.45;overflow-wrap:anywhere}
html body.workspace-studio #deskView #checks .check textarea.confirmation-value{width:100%;min-height:62px;resize:vertical;box-sizing:border-box;margin-top:5px}
html body.workspace-studio #deskView #checks .check.check-complex{padding-top:8px!important;padding-bottom:8px!important}
html body.workspace-studio #deskView #checks .check.check-complex>div{display:block!important}
html body.workspace-studio #deskView #checks .confirmation-alignment .alignment-row{margin:3px 0;gap:8px}
html body.workspace-studio #deskView #checklist .confirmation-heading{margin-bottom:2px;padding-bottom:5px}
/* Menu items are full-width rows, not a collection of floating pills. */
html body.workspace-studio :is(.record-more-menu,.nb-tool-menu){padding:5px!important;max-height:min(420px,70dvh);overflow:auto;scrollbar-width:thin;border-radius:13px!important}
html body.workspace-studio :is(.record-more-menu,.nb-tool-menu)>:is(button,a){display:flex!important;align-items:center!important;justify-content:flex-start!important;text-align:left!important;width:100%!important;min-height:38px!important;box-sizing:border-box!important;padding:9px 11px!important;margin:0!important;border-radius:8px!important;white-space:normal!important;border-color:transparent!important;line-height:1.4!important}
html body.workspace-studio :is(.record-more-menu,.nb-tool-menu)>:is(button,a):hover{background:var(--hover)}
html body.workspace-studio .workspace-action-sheet .sheet-body{gap:3px}
/* Compact, predictable headings and action footers in trade dialogs. */
html body.workspace-studio dialog .dialog-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px}
html body.workspace-studio dialog .dialog-actions>button{margin:0!important}
html body.workspace-studio dialog :is(.inputs,.strategy-entry-confirmations){gap:10px}
html body.workspace-studio dialog .strategy-entry-confirmations{margin-top:8px}
html body.workspace-studio dialog .strategy-entry-confirmation{padding:8px 10px;gap:7px}
html body.workspace-studio dialog .strategy-entry-confirmation strong{font-weight:500;line-height:1.4}
html body.workspace-studio dialog .strategy-entry-confirmation div>span{margin-top:2px;line-height:1.45}
html body.workspace-studio #profileView .profile-limit{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0;padding:10px 0;border-bottom:1px solid var(--line)}
html body.workspace-studio #profileView .profile-limit>.field{flex:0 1 210px;margin:0}
html body.workspace-studio #profileView .profile-limit>p{flex:1 1 220px;margin:0;font-size:12px;line-height:1.5}
html body.workspace-studio #profileView #accountProfiles :is(input,button){min-height:38px;box-sizing:border-box;line-height:1.3}
html body.workspace-studio #profileView #accountProfiles input{width:100%;min-width:80px}
html body.workspace-studio #userView .user-settings{padding:18px!important}
html body.workspace-studio #userView .panel-title{margin-bottom:12px}
html body.workspace-studio #userView #userProfileForm{gap:12px}
html body.workspace-studio #userView .identity-actions{gap:7px}
html body.workspace-studio #userView .identity-actions>:is(a,button),html body.workspace-studio #userView .workspace-data-tools>summary{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 12px;box-sizing:border-box;line-height:1.3}
html body.workspace-studio #userView .user-avatar,html body.workspace-studio #userInitials{display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important;padding:0}
html body.workspace-studio #notebookPane .nb-page-top{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:8px}
html body.workspace-studio #notebookPane .nb-page-top>.nb-tools{margin-left:auto}
html body.workspace-studio #notebookPane .nb-page-top>button{min-height:36px;margin:0;padding:7px 11px}
html body.workspace-studio #notebookPane :is(.nb-document,.ql-editor){overflow-wrap:anywhere}
html body.workspace-studio #notebookPane :is(.nb-document,.ql-editor) img{max-width:100%}
@media(max-width:760px){
 html body.workspace-studio{--workspace-control:44px}
 html body.workspace-studio main .heading{margin-bottom:10px;gap:8px}
 html body.workspace-studio main .panel-title{gap:8px;flex-wrap:wrap}
 html body.workspace-studio #deskView #checklist.modern-checklist #checks .check{min-height:44px!important;padding:5px 6px!important}
 html body.workspace-studio #deskView #checklist.modern-checklist #checks .check.confirmed{padding:5px 6px!important}
 html body.workspace-studio #deskView #checklist.modern-checklist #checks .check>div:has(>.confirmation-value:not(textarea)){grid-template-columns:minmax(0,1fr) minmax(110px,1fr)!important}
 html body.workspace-studio #deskView #checklist.modern-checklist #checks .check strong{font-size:14px!important;line-height:1.4!important}
 html body.workspace-studio #deskView #checks :is(select,textarea),html body.workspace-studio #profileView input{font-size:16px!important}
 html body.workspace-studio #deskView #checks .alignment-row select{min-height:40px}
 html body.workspace-studio :is(.record-more-menu,.nb-tool-menu)>:is(button,a){min-height:44px!important}
 html body.workspace-studio :is(.review-tabs,.market-tabs){display:flex;flex-wrap:nowrap;max-width:100%;overflow-x:auto;gap:3px;overscroll-behavior-x:contain}
 html body.workspace-studio :is(.review-tabs,.market-tabs)>button{flex:0 0 auto;min-height:40px;padding:8px 12px!important}
 html body.workspace-studio dialog .dialog-actions>button{min-height:44px!important;padding:9px 13px!important}
 html body.workspace-studio #userView .user-settings{padding:14px!important}
 html body.workspace-studio #profileView .profile-limit{gap:6px}
 html body.workspace-studio #profileView .profile-limit>.field{flex:1 1 100%}
 html body.workspace-studio #profileView .profile-limit>p{flex:1 1 100%}
 html body.workspace-studio #notebookPane .nb-page-top{gap:6px;margin-bottom:6px}
 html body.workspace-studio #notebookPane .nb-page-top>button{min-height:44px}
}
@media(max-width:350px){html body.workspace-studio #deskView #checklist.modern-checklist #checks .check>div:has(>.confirmation-value:not(textarea)){grid-template-columns:minmax(0,1fr)!important}html body.workspace-studio #deskView #checks .check>div>.confirmation-value:not(textarea){grid-column:1;grid-row:auto;text-align:left}}
@media(prefers-reduced-motion:reduce){html body.workspace-studio :is(button,summary,input,select){transition:none!important;scroll-behavior:auto!important}}
/* Strategy editor: controls stay aligned without making each condition taller. */
html body.workspace-studio #checklistSettingsDialog .strategy-profile-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;align-items:end;margin-bottom:12px}
html body.workspace-studio #checklistSettingsDialog .strategy-profile-controls>.field{margin:0}
html body.workspace-studio #checklistSettingsDialog .strategy-profile-controls>.dialog-actions{padding:0;margin:0;gap:6px}
html body.workspace-studio #checklistSettingsDialog .strategy-profile-controls>p{grid-column:1/-1;margin:0;line-height:1.5}
html body.workspace-studio #customChecklistRows .checklist-editor-head{display:flex;align-items:center;justify-content:space-between;gap:8px;grid-column:1/-1}
html body.workspace-studio #customChecklistRows .checklist-editor-head>div{display:flex;align-items:center;gap:5px}
html body.workspace-studio #customChecklistRows .checklist-editor-head>label{display:inline-flex;align-items:center;gap:7px;margin:0;line-height:1.3}
html body.workspace-studio #customChecklistRows .checklist-editor-head button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:32px;padding:4px 8px;line-height:1;box-sizing:border-box}
html body.workspace-studio #customChecklistRows input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;min-width:18px!important;margin:0!important;flex:none;accent-color:var(--green)}
@media(max-width:760px){html body.workspace-studio #checklistSettingsDialog .strategy-profile-controls{grid-template-columns:minmax(0,1fr)}html body.workspace-studio #checklistSettingsDialog .strategy-profile-controls>.dialog-actions{justify-content:flex-start;gap:6px}html body.workspace-studio #customChecklistRows .checklist-editor-head button{min-width:40px;min-height:40px;height:40px}html body.workspace-studio #customChecklistRows .condition-options>summary{min-height:40px;display:flex;align-items:center}}
