:root{--bg:#f4f2ed;--surface:#fff;--surface-2:#f0ede7;--text:#171717;--muted:#77736c;--border:#ded8cf;--green:#d3a34a;--green-dark:#b6842a;--red:#c6472d;--blue:#d3a34a;--amber:#d3a34a;--shadow:0 1px 4px rgba(0,0,0,.08);--radius:14px}*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}.hidden{display:none!important}.plan-bar{min-height:30px;background:#ece8e0;border-bottom:1px solid #d8d1c7;padding:5px 18px;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#6f6a62}.top-links{display:flex;gap:12px;align-items:center}.link-button{border:0;background:none;color:#111;cursor:pointer;padding:0}.file-link{cursor:pointer}.danger-link{color:#a9402d}.app-header{background:#fff;border-bottom:1px solid var(--border);padding:12px 18px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:16px}.brand,.header-banner,.header-actions{height:220px;border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.brand{display:flex;align-items:center;justify-content:center;gap:12px;background:#fff;padding:20px;text-align:center}.brand img{width:58px;height:58px;object-fit:cover;border-radius:11px;flex:0 0 auto}.brand-copy{display:flex;flex-direction:column;align-items:center;justify-content:center}.brand-name{font-weight:800;font-size:20px;line-height:1.05}.brand-name span{color:var(--green)}.brand-tagline{font-size:10px;color:#8a8379;margin-top:4px}.header-banner{overflow:hidden;position:relative;background:#171717;display:flex;align-items:center;justify-content:center;padding:0}.header-banner img{display:block;width:100%;height:100%;object-fit:cover;object-position:center center}.header-actions{display:flex;align-items:center;justify-content:center;background:#fff;padding:20px}.header-actions .btn{min-width:160px}.btn{min-width:110px}.btn{border:0;border-radius:10px;padding:10px 16px;font-weight:700;font-size:12px;cursor:pointer}.btn-primary{background:linear-gradient(180deg,#e0b45c,#d09a34);color:#111;border:1px solid #bd8524}.btn-primary:hover{background:linear-gradient(180deg,#d3a34a,#b6842a);color:#111}.btn-secondary{background:#181818;color:#fff;border:1px solid #333}main{min-height:calc(100vh - 100px)}.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.summary-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:13px 14px;box-shadow:var(--shadow);min-height:82px}.summary-card .label{font-size:10px;color:#8b847a;margin-bottom:6px}.summary-card .value{font-size:18px;font-weight:800}.value.green{color:var(--green)}.value.blue{color:var(--green)}.value.red{color:var(--red)}.tabs{height:43px;background:#fff;border-top:1px solid #f2f3f5;border-bottom:1px solid var(--border);display:flex;padding:0 20px;gap:0;overflow-x:auto;justify-content:space-between;align-items:stretch}.tab{flex:1 1 20%;display:flex;align-items:center;justify-content:center;border:0;background:transparent;padding:0 12px;color:#77736c;font-weight:600;font-size:12px;border-bottom:2px solid transparent;cursor:pointer;white-space:nowrap;text-align:center}.tab.active{color:#9a6813;border-bottom-color:var(--green)}.page{display:none;padding:24px 18px}.page.active{display:block}.dashboard-page{padding-top:14px}.page-header{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px}.page-header h1{font-size:21px;margin:0 0 4px}.page-header p,.card p{color:#8b847a;font-size:12px;margin:0}.filters{display:flex;gap:8px}.filters input,.filters select{width:160px;padding:9px 11px;border:1px solid var(--border);background:#fff;border-radius:9px;font-size:12px}.card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.panel{padding:18px}.dashboard-main-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:stretch;margin-bottom:16px}.dashboard-side-panel,.dashboard-summary-panel{min-height:100%;height:100%}.dashboard-summary-panel{display:flex;align-items:stretch}.dashboard-summary-panel .summary-grid{width:100%}.dashboard-side-panel{display:flex;flex-direction:column}.dashboard-exposure-panel{margin-top:0}.card-title-row h2{font-size:15px;margin:0 0 3px}.detail-list{margin-top:16px}.detail-list>div{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #ebe6de;font-size:12px}.detail-list>div:last-child{border:0}.review-list{display:grid;gap:7px;margin-top:14px}.review-item{display:grid;grid-template-columns:60px 1fr;gap:10px;text-align:left;border:1px solid #e2c3b9;background:#fff7f4;border-radius:9px;padding:9px 10px;cursor:pointer}.review-item strong{color:var(--red)}.review-item span{font-size:11px;color:#6d7480}.ok-state{padding:22px;color:#13872d;background:#f0fbf2;border-radius:10px;margin-top:14px}.table-card{overflow:hidden}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:1050px}table.compact-table{min-width:900px}th{text-align:left;color:#8b847a;font-size:10px;letter-spacing:.04em;text-transform:uppercase;padding:13px 14px;border-bottom:1px solid var(--border);background:#f8f6f2}td{padding:13px 14px;border-bottom:1px solid #ebe6de;font-size:12px;white-space:nowrap}tbody tr:hover{background:#fbf8f2}.ticker-cell{font-weight:800}.strategy-badge,.status-badge,.qualification{display:inline-flex;border-radius:999px;padding:4px 8px;font-weight:700;font-size:10px}.strategy-badge{background:#f5ead5;color:#7a5108;border:1px solid #e6cea0}.status-Open{background:#252525;color:#f3cf87}.status-Closed,.status-Expired,.status-Called-Away{background:#f5ead5;color:#76500d;border:1px solid #e6cea0}.status-Assigned,.status-Rolled{background:#2f2b25;color:#f2c86f}.status-Max-Loss{background:#f5e2dd;color:#a33c28;border:1px solid #dfb9af}.status-Cancelled{background:#e9e5de;color:#6f6a62}.q-green{background:#f5ead5;color:#76500d;border:1px solid #e6cea0}.q-yellow{background:#eee5d5;color:#6e5120;border:1px solid #d8c39b}.q-orange{background:#dfd7ca;color:#4c453c;border:1px solid #c8bdad}.q-red{background:#f5e2dd;color:#a33c28;border:1px solid #dfb9af}.positive{color:#a66f12;font-weight:800}.negative{color:var(--red);font-weight:800}.warning-count{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center;border-radius:50%;background:#f6e5df;color:var(--red);font-weight:800}.row-action{border:1px solid var(--border);background:#fff;border-radius:7px;padding:5px 8px;cursor:pointer;font-size:11px}.empty-state{text-align:center;padding:48px}.empty-state h3{margin:0 0 4px}.cycles-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cycle-card{padding:17px}.cycle-head{display:flex;justify-content:space-between;align-items:flex-start}.cycle-head h2{margin:2px 0 0}.eyebrow{font-size:10px;color:#8b847a}.cycle-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:15px 0}.cycle-metrics>div{background:#f5f2ed;border-radius:9px;padding:9px}.cycle-metrics span{display:block;color:#8b847a;font-size:9px}.cycle-metrics strong{font-size:13px}.cycle-trades{display:grid;gap:6px}.cycle-trades button{display:grid;grid-template-columns:100px 1fr 80px;gap:8px;text-align:left;border:1px solid var(--border);background:#fff;border-radius:8px;padding:8px;cursor:pointer}.cycle-trades em{text-align:right;color:#8b847a;font-style:normal}.settings-card{padding:20px}.settings-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.settings-actions{margin-top:18px;display:flex;justify-content:flex-end}.placeholder{padding:40px;text-align:center}.overlay{position:fixed;inset:0;background:rgba(0,0,0,.44);z-index:90}.drawer{position:fixed;right:0;top:0;height:100vh;height:100dvh;width:min(590px,100vw);background:#111;color:#f5f5f0;z-index:100;transform:translateX(100%);transition:transform .25s ease;overflow:hidden;border-left:1px solid #2c2c2c;display:grid;grid-template-rows:auto minmax(0,1fr)}.drawer.open{transform:translateX(0)}.drawer-header{display:flex;justify-content:space-between;align-items:flex-start;padding:18px 14px 14px;border-bottom:1px solid #242424}.drawer-header h2{font-size:17px;margin:0 0 4px}.drawer-header p{font-size:12px;color:#7f91ad;margin:0}.drawer-close{color:#9fb0c8;background:none;border:0;font-size:28px;cursor:pointer}.drawer form{min-height:0;overflow:hidden;padding:0;display:grid;grid-template-rows:minmax(0,1fr) auto}.drawer-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:0 14px 22px}.form-section{border-bottom:1px solid #242424;padding:16px 0;margin-bottom:0}.form-section h3{font-size:11px;color:#9bb0ca;letter-spacing:.04em;margin:0 0 12px}.field label{display:block;font-size:11px;color:#8da2bf;font-weight:600;margin-bottom:5px}.field input,.field select,.field textarea{width:100%;background:#1a1a1a;border:1px solid #343434;color:#f5f5f0;border-radius:10px;padding:10px 13px;font-size:13px;outline:none}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(211,163,74,.15)}.field.light label{color:#667086}.field.light input{background:#fff;color:#111;border-color:var(--border)}.form-grid{display:grid;gap:10px}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid.three{grid-template-columns:1fr 1fr 1fr}.strategy-pills{display:flex;flex-wrap:wrap;gap:5px;margin-top:13px}.pill{border:1px solid #343434;background:#181818;color:#78859b;padding:8px 11px;border-radius:9px;font-weight:700;font-size:12px;cursor:pointer}.pill.active{color:#f4d699;border-color:var(--green);background:#2d2619}.checkbox-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.checkbox-grid label{font-size:11px;color:#a4afc0;background:#181818;border:1px solid #2b2b2b;border-radius:9px;padding:9px}.calculation-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}.calculation-strip span{background:#181818;border:1px solid #2b2b2b;border-radius:9px;padding:9px;color:#7f91ad;font-size:10px}.calculation-strip strong{display:block;color:#fff;font-size:13px;margin-top:3px}.warning-box{background:#321b13;border:1px solid #78402d;color:#ffd2c4;border-radius:10px;padding:11px;margin-bottom:12px;font-size:11px}.warning-box strong{font-size:12px}.warning-box ul{margin:7px 0 0;padding-left:18px}.drawer-footer{position:static;width:auto;background:#111;border-top:1px solid #292929;padding:12px 14px;display:flex;justify-content:flex-end;align-items:center;gap:8px;z-index:2;box-shadow:0 -10px 24px rgba(0,0,0,.22)}.drawer-footer .btn-primary{min-width:140px}.drawer-footer .btn-secondary{min-width:110px}@media(max-width:1350px){.dashboard-main-grid{grid-template-columns:1fr 1.4fr 1fr}}@media(max-width:1000px){.dashboard-main-grid,.cycles-grid{grid-template-columns:1fr}.summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.settings-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.plan-bar{align-items:flex-start;gap:6px;flex-direction:column;padding:6px 10px}.top-links{flex-wrap:wrap}.app-header{padding:10px;grid-template-columns:1fr;gap:10px}.brand,.header-banner,.header-actions{height:auto;min-height:120px}.brand{justify-content:center;text-align:center}.brand-copy{align-items:center}.header-actions{min-height:120px}.header-banner{height:150px}.header-banner img{object-fit:cover}.summary-grid{grid-template-columns:repeat(2,1fr)}.summary-card{padding:12px}.page{padding:16px 10px}.page-header{align-items:flex-start;flex-direction:column}.filters{width:100%}.filters input,.filters select{width:50%}.form-grid.two,.form-grid.three,.settings-grid,.checkbox-grid,.calculation-strip{grid-template-columns:1fr}.cycle-metrics{grid-template-columns:repeat(2,1fr)}.cycle-trades button{grid-template-columns:80px 1fr}.cycle-trades em{display:none}}

.field-help{display:block;margin-top:5px;font-size:11px;line-height:1.35;color:#7f8ba3}.field-help.hidden{display:none}

.row-actions{display:flex;gap:5px}.row-action.roll-action{border-color:#d6b16c;background:#fbf2df;color:#85580b}.roll-summary{background:#181818;border:1px solid #2b2b2b;border-radius:10px;padding:12px;margin-bottom:12px;display:grid;gap:5px;font-size:12px}.roll-summary strong{color:#fff}.roll-summary span{color:#90a0b8}.roll-calcs{grid-template-columns:repeat(3,1fr)}
.row-action.cc-action{border-color:#d6b16c;background:#fbf2df;color:#85580b}
.dashboard-exposure-panel{margin-top:16px}

.row-action.manage-action{border-color:#c9a65e;background:#f7edd9;color:#7b520c;font-weight:700}
.workflow-message{margin-top:12px;padding:11px 12px;border:1px solid #5e513a;background:#241f17;color:#e7cf9c;border-radius:10px;font-size:11px;line-height:1.45}
.position-lifecycle-calcs{grid-template-columns:repeat(5,1fr)}
@media(max-width:720px){.position-lifecycle-calcs{grid-template-columns:1fr}}


/* Faster trade entry */
.watchlist-defaults-summary{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;padding:10px 11px;background:#181818;border:1px solid #2b2b2b;border-radius:10px;color:#90a0b8;font-size:11px}
.watchlist-defaults-summary strong{color:#f4d699}.watchlist-defaults-summary span{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#242424}.watchlist-defaults-summary span:first-child{background:transparent;padding-left:0}
.advanced-details{border-bottom:1px solid #242424}.advanced-details summary{cursor:pointer;list-style:none;padding:14px 0;color:#c7b07f;font-size:12px;font-weight:700}.advanced-details summary::-webkit-details-marker{display:none}.advanced-details summary:after{content:'+';float:right;color:#8da2bf;font-size:16px}.advanced-details[open] summary:after{content:'−'}.advanced-content{padding-top:4px}.quick-entry-section .field-help{max-width:260px}

/* Portfolio analytics and downloadable reports */
.analytics-page-header{align-items:flex-start}.analytics-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;max-width:760px}.analytics-toolbar select,.analytics-toolbar input{height:38px;padding:8px 10px;border:1px solid var(--border);background:#fff;border-radius:9px;font-size:12px}.analytics-custom-dates{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:11px}.analytics-export{white-space:nowrap}.analytics-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.analytics-summary-card{padding:15px 16px;min-height:94px}.analytics-summary-card .label{font-size:10px;color:#8b847a;margin-bottom:7px;text-transform:uppercase;letter-spacing:.035em}.analytics-summary-card .value{font-size:21px;font-weight:800}.analytics-summary-card .detail{font-size:10px;color:#8b847a;margin-top:5px}.analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.analytics-grid .panel{overflow:hidden}.analytics-wide{grid-column:1/-1}.analytics-table{min-width:920px;margin-top:12px}.compact-analytics-table{min-width:560px}.analytics-table th,.analytics-table td{padding:11px 12px}.analytics-table tbody tr:last-child td{border-bottom:0}.analytics-note{font-size:11px;color:#817a70;line-height:1.45;margin:14px 2px 0}.capital-chart{margin-top:14px;min-height:250px;border:1px solid #ebe6de;border-radius:11px;background:#fbfaf7;padding:12px;overflow-x:auto}.capital-chart svg{display:block;width:100%;min-width:720px;height:230px}.chart-grid-line{stroke:#e4ded5;stroke-width:1}.chart-axis-label{fill:#857e73;font-size:10px;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.chart-bar-average{fill:#d3a34a}.chart-bar-peak{fill:#2f2b25}.chart-legend{display:flex;gap:16px;align-items:center;margin-top:8px;color:#77736c;font-size:10px}.chart-legend span{display:flex;align-items:center;gap:5px}.chart-legend i{display:inline-block;width:10px;height:10px;border-radius:2px}.chart-legend .avg{background:#d3a34a}.chart-legend .peak{background:#2f2b25}.analytics-empty{padding:24px;text-align:center;color:#8b847a;font-size:12px}.metric-positive{color:#a66f12;font-weight:800}.metric-negative{color:var(--red);font-weight:800}
@media(max-width:1100px){.analytics-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.analytics-grid{grid-template-columns:1fr}.analytics-wide{grid-column:auto}.analytics-page-header{flex-direction:column;align-items:stretch}.analytics-toolbar{justify-content:flex-start;max-width:none}}
@media(max-width:720px){.analytics-summary-grid{grid-template-columns:1fr 1fr}.analytics-toolbar{display:grid;grid-template-columns:1fr}.analytics-custom-dates{display:grid;grid-template-columns:1fr auto 1fr}.analytics-toolbar select,.analytics-toolbar input,.analytics-export{width:100%}.capital-chart{padding:8px}}



/* Accessibility, recovery, and installability */
html{scroll-behavior:smooth}body{min-width:320px}.skip-link{position:fixed;left:12px;top:8px;z-index:1000;transform:translateY(-160%);background:#171717;color:#fff;padding:10px 14px;border-radius:8px;font-weight:800;font-size:12px;box-shadow:0 4px 18px rgba(0,0,0,.28)}.skip-link:focus{transform:translateY(0)}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.connection-status{display:inline-flex;align-items:center;gap:6px;color:#6f6a62;font-size:11px}.connection-status:before{content:'';width:7px;height:7px;border-radius:50%;background:#4f9a59;box-shadow:0 0 0 2px rgba(79,154,89,.12)}.connection-status.offline:before{background:#c6472d}.connection-status.installed:before{background:#d3a34a}.toast-region{position:fixed;right:18px;top:48px;z-index:500;display:grid;gap:8px;width:min(360px,calc(100vw - 36px));pointer-events:none}.toast{pointer-events:auto;background:#171717;color:#fff;border:1px solid #3b3b3b;border-radius:11px;padding:11px 13px;box-shadow:0 8px 28px rgba(0,0,0,.24);display:grid;grid-template-columns:1fr auto;gap:10px;align-items:start;font-size:12px;line-height:1.45;animation:toast-in .18s ease-out}.toast.success{border-color:#806126}.toast.error{border-color:#9c422d;background:#2c1712}.toast button{border:0;background:transparent;color:#c8c8c8;cursor:pointer;font-size:16px;line-height:1;padding:0}.toast.fade{opacity:0;transform:translateY(-4px);transition:.18s ease}.app-footer{display:flex;justify-content:space-between;gap:14px;padding:16px 20px 22px;color:#817a70;font-size:10px;border-top:1px solid var(--border)}.version-badge{display:inline-flex;padding:6px 9px;border-radius:999px;background:#171717;color:#f3cf87;font-size:10px;font-weight:800}.data-protection-card{margin-top:16px}.protection-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:16px}.protection-status-grid>div{background:#f7f4ef;border:1px solid #e7e0d6;border-radius:10px;padding:11px}.protection-status-grid span{display:block;color:#8b847a;font-size:9px;text-transform:uppercase;letter-spacing:.04em}.protection-status-grid strong{display:block;font-size:12px;margin-top:5px}.protection-actions{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.restore-table{min-width:720px}.restore-table th,.restore-table td{padding:10px 12px}.restore-table td:last-child{text-align:right}.recovery-notice{border:1px solid #dfb9af;background:#fff4f1;color:#8d3524;border-radius:10px;padding:11px 12px;margin:12px 0;font-size:11px;line-height:1.45}.integrity-ok{color:#2b7534;font-weight:800}.integrity-warning{color:#a33c28;font-weight:800}.noscript-warning{position:fixed;inset:auto 16px 16px;z-index:1000;background:#321b13;color:#ffd2c4;border:1px solid #78402d;border-radius:10px;padding:12px}.tabs{position:sticky;top:0;z-index:40}.tab:focus-visible,.btn:focus-visible,.link-button:focus-visible,.row-action:focus-visible,.pill:focus-visible,.drawer-close:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid rgba(211,163,74,.45);outline-offset:2px}.drawer{overscroll-behavior:contain}.drawer[aria-hidden="true"]{visibility:hidden}.overlay[aria-hidden="true"]{pointer-events:none}.table-wrap{scrollbar-gutter:stable}.mobile-card-label{display:none}
@keyframes toast-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}
@media(max-width:900px){.protection-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.app-footer{flex-direction:column}.tabs{justify-content:flex-start;scroll-snap-type:x proximity}.tab{flex:0 0 132px;scroll-snap-align:start}.header-actions .btn{min-height:44px}}
@media(max-width:680px){
  .plan-bar{position:relative}.connection-status{order:-1}.toast-region{right:10px;top:10px;width:calc(100vw - 20px)}.protection-status-grid{grid-template-columns:1fr 1fr}.protection-actions{display:grid;grid-template-columns:1fr}.protection-actions .btn,.protection-actions .file-button{width:100%}.app-footer{padding:14px 10px 90px}.tabs{height:48px;padding:0 8px}.tab{flex-basis:112px;font-size:11px}.page{padding-bottom:24px}.header-actions{position:fixed;left:10px;right:10px;bottom:10px;z-index:60;min-height:0;height:auto;padding:0;border:0;background:transparent;box-shadow:none}.header-actions .btn{width:100%;min-height:48px;box-shadow:0 8px 24px rgba(0,0,0,.26)}
  .table-wrap{overflow:visible}.table-wrap table:not(.capital-chart table){min-width:0;width:100%;display:block}.table-wrap thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.table-wrap tbody{display:grid;gap:10px}.table-wrap tr{display:block;border:1px solid var(--border);border-radius:11px;background:#fff;box-shadow:var(--shadow);overflow:hidden}.table-wrap td{display:grid;grid-template-columns:minmax(105px,40%) minmax(0,1fr);align-items:start;gap:10px;white-space:normal;padding:9px 11px;border-bottom:1px solid #eee8df;text-align:left!important}.table-wrap td:last-child{border-bottom:0}.table-wrap td:before{content:attr(data-label);font-size:9px;font-weight:800;color:#8b847a;text-transform:uppercase;letter-spacing:.035em}.table-wrap td[colspan]:before{content:''}.table-wrap td[colspan]{display:block;text-align:center!important}.table-wrap .row-actions{justify-content:flex-start;flex-wrap:wrap}.restore-table{min-width:0}.analytics-table,.compact-table{min-width:0}.capital-chart{overflow:auto}.capital-chart svg{min-width:680px}
}

/* Shared controls */
.file-button{display:inline-flex;align-items:center;justify-content:center}.btn:disabled{opacity:.48;cursor:not-allowed}.tabs .tab{min-width:110px}.theme-toggle{display:inline-flex;align-items:center;gap:6px;font-weight:700}.theme-toggle:before{content:'◐';font-size:13px;color:var(--green)}

/* Light appearance */
html[data-theme="light"]{color-scheme:light}
html[data-theme="light"] .drawer,html[data-theme="light"] .drawer-footer{background:#fff;color:#171717;border-color:#ded8cf}
html[data-theme="light"] .drawer-header,html[data-theme="light"] .form-section{border-color:#e5dfd6}
html[data-theme="light"] .drawer-header p,html[data-theme="light"] .drawer-close,html[data-theme="light"] .form-section h3,html[data-theme="light"] .field label,html[data-theme="light"] .field-help{color:#6f6a62}
html[data-theme="light"] .field input,html[data-theme="light"] .field select,html[data-theme="light"] .field textarea{background:#fff;color:#171717;border-color:#d8d1c7}
html[data-theme="light"] .checkbox-grid label,html[data-theme="light"] .calculation-strip span,html[data-theme="light"] .roll-summary,html[data-theme="light"] .watchlist-defaults-summary{background:#f7f4ef;color:#6f6a62;border-color:#ded8cf}
html[data-theme="light"] .calculation-strip strong,html[data-theme="light"] .roll-summary strong{color:#171717}
html[data-theme="light"] .roll-summary span{color:#6f6a62}
html[data-theme="light"] .pill{background:#fff;color:#6f6a62;border-color:#d8d1c7}
html[data-theme="light"] .pill.active{background:#f5ead5;color:#76500d;border-color:#d3a34a}
html[data-theme="light"] .advanced-details{background:#fff;border-color:#ded8cf}
html[data-theme="light"] .advanced-details summary{color:#76500d}

/* Dark appearance */
html[data-theme="dark"]{color-scheme:dark;--bg:#0f1012;--surface:#191b1f;--surface-2:#22252a;--text:#f3f0e9;--muted:#aaa59b;--border:#363941;--shadow:0 1px 5px rgba(0,0,0,.42)}
html[data-theme="dark"] body{background:var(--bg);color:var(--text)}
html[data-theme="dark"] .plan-bar{background:#111317;border-color:#30333a;color:#aaa59b}
html[data-theme="dark"] .link-button{color:#eee9df}html[data-theme="dark"] .danger-link{color:#ed8069}
html[data-theme="dark"] .app-header,html[data-theme="dark"] .brand,html[data-theme="dark"] .header-actions,html[data-theme="dark"] .tabs,html[data-theme="dark"] .card,html[data-theme="dark"] .summary-card{background:var(--surface);border-color:var(--border)}
html[data-theme="dark"] .brand-tagline,html[data-theme="dark"] .page-header p,html[data-theme="dark"] .card p,html[data-theme="dark"] .summary-card .label,html[data-theme="dark"] .eyebrow,html[data-theme="dark"] .cycle-metrics span,html[data-theme="dark"] .cycle-trades em,html[data-theme="dark"] .analytics-empty,html[data-theme="dark"] .app-footer{color:var(--muted)}
html[data-theme="dark"] .tab{color:#aaa59b}html[data-theme="dark"] .tab.active{color:#e7bb64}
html[data-theme="dark"] .filters input,html[data-theme="dark"] .filters select,html[data-theme="dark"] .field.light input{background:#14161a;color:var(--text);border-color:var(--border)}
/* Analytics period control refinement */
.analytics-toolbar #analyticsPeriod{min-width:128px;height:38px;}
html[data-theme="dark"] .analytics-toolbar select,html[data-theme="dark"] .analytics-toolbar input{background:#14161a;color:var(--text);border-color:var(--border);color-scheme:dark}
html[data-theme="dark"] .analytics-toolbar select option{background:#14161a;color:#f3f0e9}

html[data-theme="dark"] th{background:#202329;color:#aaa59b;border-color:var(--border)}
html[data-theme="dark"] td,html[data-theme="dark"] .detail-list>div{border-color:#30333a}
html[data-theme="dark"] tbody tr:hover{background:#202329}
html[data-theme="dark"] .row-action,html[data-theme="dark"] .cycle-trades button{background:#202329;color:var(--text);border-color:#42454d}
html[data-theme="dark"] .cycle-metrics>div,html[data-theme="dark"] .protection-status-grid>div{background:#22252a;border-color:#363941}
html[data-theme="dark"] .review-item{background:#2b1d19;border-color:#714335;color:var(--text)}
html[data-theme="dark"] .review-item span{color:#b8afa7}
html[data-theme="dark"] .ok-state{background:#17271b;color:#7bc787}
html[data-theme="dark"] .analytics-summary-card,html[data-theme="dark"] .capital-chart{background:#1d2025;border-color:#363941}
html[data-theme="dark"] .chart-grid-line{stroke:#3a3d44}html[data-theme="dark"] .chart-axis-label{fill:#aaa59b}html[data-theme="dark"] .chart-bar-peak{fill:#777d87}
html[data-theme="dark"] .version-badge{background:#e0b45c;color:#171717}
html[data-theme="dark"] .recovery-notice{background:#2d1915;color:#ffb9a9;border-color:#7e4638}
html[data-theme="dark"] .drawer,html[data-theme="dark"] .drawer-footer{background:#111;color:#f5f5f0;border-color:#2c2c2c}
html[data-theme="dark"] .drawer-header,html[data-theme="dark"] .form-section{border-color:#2b2d31}
html[data-theme="dark"] .field input,html[data-theme="dark"] .field select,html[data-theme="dark"] .field textarea{background:#1a1c20;color:#f5f5f0;border-color:#3a3d43}
html[data-theme="dark"] .advanced-details{background:#15171a;border-color:#34373d}
html[data-theme="dark"] .advanced-details summary{color:#e3bd70}
html[data-theme="dark"] .table-wrap tr{background:var(--surface);border-color:var(--border)}
html[data-theme="dark"] .table-wrap td{border-color:#30333a}
html[data-theme="dark"] .table-wrap td:before{color:#aaa59b}
@media(max-width:680px){.theme-toggle{min-height:28px}html[data-theme="dark"] .table-wrap tr{background:var(--surface)}}

/* Natural State Alpha header refinement: taller presentation without image distortion */
@media (min-width:721px){
  .brand,.header-banner,.header-actions{height:270px}
  .header-banner img{width:100%;height:100%;object-fit:cover;object-position:center center}
}

/* Full-width hero banner header override */
.hero-header{background:transparent;border-bottom:1px solid var(--border);padding:12px 18px;display:block}
.hero-header .hero-banner{position:relative;height:280px;width:100%;overflow:hidden;border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);background:#171717;padding:0}
.hero-header .hero-banner img{display:block;width:100%;height:100%;object-fit:cover;object-position:center center}
.hero-header .hero-actions{position:absolute;right:18px;bottom:18px;z-index:3;display:flex;justify-content:flex-end}
.hero-header .hero-actions .btn{min-width:160px;box-shadow:0 8px 24px rgba(0,0,0,.22)}
@media(max-width:720px){
  .hero-header{padding:10px}
  .hero-header .hero-banner{height:180px}
  .hero-header .hero-actions{right:10px;bottom:10px}
  .hero-header .hero-actions .btn{min-width:132px}
}

/* Local Yahoo Finance price refresh */
.price-refresh{font-weight:700;color:var(--green-dark)}
.price-refresh[disabled]{opacity:.55;cursor:wait}
.price-update-status{font-size:11px;color:var(--muted);white-space:nowrap}
html[data-theme="dark"] .price-refresh{color:#e5b44f}
@media(max-width:900px){.price-update-status{display:none}}

/* Trades filter and sort row */
.trade-toolbar{display:grid;grid-template-columns:repeat(6,minmax(125px,1fr)) auto;gap:8px;align-items:end;margin:0 0 12px;padding:12px 14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}
.trade-filter-control label{display:block;margin:0 0 5px;color:#77736c;font-size:9px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.trade-filter-control select{width:100%;height:38px;padding:8px 10px;background:#fff;color:#171717;border:1px solid var(--border);border-radius:9px;font-size:12px}
.trade-filter-clear{height:38px;white-space:nowrap}
.trade-filter-summary{grid-column:1/-1;color:var(--muted);font-size:10px}
html[data-theme="dark"] .trade-filter-control label{color:#aaa59b}
html[data-theme="dark"] .trade-filter-control select{background:#14161a;color:var(--text);border-color:var(--border)}
@media(max-width:1100px){.trade-toolbar{grid-template-columns:repeat(3,minmax(140px,1fr))}.trade-filter-clear{width:100%}}
@media(max-width:680px){.trade-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}.trade-filter-clear{grid-column:1/-1}.trade-filter-summary{grid-column:1/-1}}
@media(max-width:430px){.trade-toolbar{grid-template-columns:1fr}.trade-filter-clear,.trade-filter-summary{grid-column:auto}}

/* Phase 1 option builder */
.builder-page{padding-top:18px}.builder-page-header{align-items:flex-start}.builder-chain-status{display:inline-flex;align-items:center;min-height:34px;padding:8px 11px;border:1px solid var(--border);border-radius:999px;background:#fff;color:var(--muted);font-size:11px;font-weight:700}.builder-chain-status.loading{color:#76500d;border-color:#e6cea0;background:#fbf3e3}.builder-chain-status.success{color:#2b7534;border-color:#b9d9bf;background:#f0fbf2}.builder-chain-status.error{color:#a33c28;border-color:#dfb9af;background:#fff4f1}.builder-top-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:16px;align-items:stretch}.builder-controls,.builder-results{min-height:100%}.builder-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin-top:15px}.builder-form-grid .field.light select{width:100%;background:#fff;color:#171717;border:1px solid var(--border);border-radius:9px;padding:10px 11px;font-size:12px}.builder-control-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.builder-underlying-summary{display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:end;margin-top:14px;padding:12px 13px;border:1px solid #e7e0d6;border-radius:10px;background:#f7f4ef}.builder-underlying-summary span{font-size:10px;color:#8b847a;text-transform:uppercase;letter-spacing:.035em}.builder-underlying-summary strong{font-size:20px}.builder-underlying-summary small{grid-column:1/-1;color:#8b847a;font-size:10px}.builder-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:15px}.builder-metrics>div{min-height:78px;padding:11px;border:1px solid #e7e0d6;border-radius:10px;background:#f7f4ef}.builder-metrics span{display:block;min-height:24px;color:#8b847a;font-size:9px;text-transform:uppercase;letter-spacing:.035em}.builder-metrics strong{display:block;margin-top:4px;font-size:16px}.builder-leg-summary{margin-top:12px;padding:12px 13px;border:1px solid var(--border);border-radius:10px;color:#686159;background:#fff;font-size:11px;line-height:1.55}.builder-results .warning-box{margin-top:12px;margin-bottom:0}.builder-send-row{display:flex;justify-content:flex-end;margin-top:14px}.builder-chart-panel,.builder-chain-panel{margin-top:16px}.builder-payoff-chart{min-height:300px;margin-top:13px;padding:10px;border:1px solid #ebe6de;border-radius:11px;background:#fbfaf7;overflow-x:auto}.builder-payoff-chart svg{display:block;width:100%;min-width:720px;height:280px}.builder-empty-chart{display:flex;align-items:center;justify-content:center;min-height:278px;color:#8b847a;font-size:12px}.builder-grid-line{stroke:#e4ded5;stroke-width:1}.builder-zero-line{stroke:#77736c;stroke-width:1.3}.builder-breakeven-line{stroke:#c6472d;stroke-width:1;stroke-dasharray:5 4}.builder-payoff-line{stroke:#d3a34a;stroke-width:3;stroke-linejoin:round;stroke-linecap:round}.builder-axis-label,.builder-axis-title,.builder-breakeven-label{fill:#857e73;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:10px}.builder-axis-title{font-weight:700}.builder-breakeven-label{fill:#a33c28;font-weight:700}.builder-chain-title{align-items:flex-start}.builder-source-note{max-width:48%;text-align:right;color:#8b847a;font-size:10px;line-height:1.4}.builder-chain-table{min-width:920px;margin-top:12px}.builder-chain-table th,.builder-chain-table td{padding:10px 12px}.builder-chain-table tbody tr:last-child td{border-bottom:0}.builder-selected-row{background:#fbf3e3}.builder-selected-button{background:#171717;color:#f3cf87;border-color:#171717}
@media(max-width:1050px){.builder-top-grid{grid-template-columns:1fr}.builder-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.builder-form-grid{grid-template-columns:1fr}.builder-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.builder-control-actions{display:grid;grid-template-columns:1fr}.builder-control-actions .btn{width:100%}.builder-send-row .btn{width:100%}.builder-chain-title{align-items:flex-start;gap:8px;flex-direction:column}.builder-source-note{max-width:none;text-align:left}.builder-payoff-chart{padding:6px}}
html[data-theme="dark"] .builder-chain-status{background:#1d2025;border-color:#363941;color:#aaa59b}html[data-theme="dark"] .builder-chain-status.loading{background:#2d2619;border-color:#806126;color:#e7bb64}html[data-theme="dark"] .builder-chain-status.success{background:#17271b;border-color:#386641;color:#7bc787}html[data-theme="dark"] .builder-chain-status.error{background:#2d1915;border-color:#7e4638;color:#ffb9a9}html[data-theme="dark"] .builder-form-grid .field.light select{background:#14161a;color:var(--text);border-color:var(--border)}html[data-theme="dark"] .builder-underlying-summary,html[data-theme="dark"] .builder-metrics>div,html[data-theme="dark"] .builder-leg-summary,html[data-theme="dark"] .builder-payoff-chart{background:#1d2025;border-color:#363941}html[data-theme="dark"] .builder-underlying-summary span,html[data-theme="dark"] .builder-underlying-summary small,html[data-theme="dark"] .builder-metrics span,html[data-theme="dark"] .builder-leg-summary,html[data-theme="dark"] .builder-source-note{color:#aaa59b}html[data-theme="dark"] .builder-grid-line{stroke:#3a3d44}html[data-theme="dark"] .builder-zero-line{stroke:#858b95}html[data-theme="dark"] .builder-axis-label,html[data-theme="dark"] .builder-axis-title{fill:#aaa59b}html[data-theme="dark"] .builder-selected-row{background:#2d2619}html[data-theme="dark"] .builder-selected-button{background:#e0b45c;color:#171717;border-color:#e0b45c}

/* v7.4.2 option-chain controls */
.builder-chain-filters{display:grid;grid-template-columns:repeat(3,minmax(170px,230px)) 1fr;gap:10px;align-items:end;margin-top:14px;padding:12px;border:1px solid #e7e0d6;border-radius:11px;background:#f7f4ef}.builder-chain-filters .field.light label{color:#8b847a}.builder-chain-filters .field.light select{width:100%;background:#fff;color:#171717;border:1px solid var(--border);border-radius:9px;padding:9px 10px;font-size:11px}.builder-chain-filters select:disabled{opacity:.58;cursor:not-allowed}.builder-chain-count{justify-self:end;align-self:center;color:#8b847a;font-size:11px;font-weight:700;white-space:nowrap}html[data-theme="dark"] .builder-chain-filters{background:#1d2025;border-color:#363941}html[data-theme="dark"] .builder-chain-filters .field.light select{background:#14161a;color:var(--text);border-color:var(--border)}html[data-theme="dark"] .builder-chain-count{color:#aaa59b}@media(max-width:900px){.builder-chain-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.builder-chain-count{justify-self:start}}@media(max-width:620px){.builder-chain-filters{grid-template-columns:1fr}.builder-chain-count{justify-self:start}}

@media(max-width:520px){.drawer-footer{display:grid;grid-template-columns:1fr 1fr}.drawer-footer .btn{width:100%;min-width:0}.drawer-footer .btn:first-child:nth-last-child(3){grid-column:1/-1}.drawer-footer .btn-primary{grid-column:2}}


/* v7.4.4 sticky option-chain header */
.builder-chain-wrap{max-height:min(64vh,620px);margin-top:12px;overflow:auto;position:relative;overscroll-behavior:contain;scrollbar-gutter:stable}
.builder-chain-table{margin-top:0}
.builder-chain-table thead th{position:sticky;top:0;z-index:4;background:#f8f6f2;box-shadow:0 1px 0 var(--border)}
html[data-theme="dark"] .builder-chain-table thead th{background:#202329;box-shadow:0 1px 0 var(--border)}
@media(max-height:760px){.builder-chain-wrap{max-height:52vh}}
@media(max-width:720px){.builder-chain-wrap{max-height:58vh}}

/* Phase 2 strike-ranking engine */
.builder-decision-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}.builder-decision-strip>div{min-height:64px;padding:10px 11px;border:1px solid #e7e0d6;border-radius:10px;background:#fff}.builder-decision-strip span{display:block;color:#8b847a;font-size:9px;text-transform:uppercase;letter-spacing:.035em}.builder-decision-strip strong{display:block;margin-top:5px;font-size:14px}.builder-score-explanation{margin-top:9px;padding:10px 12px;border-left:3px solid #d3a34a;background:#fbf6ea;color:#686159;font-size:10px;line-height:1.5}.builder-model-note{margin-top:10px;padding:9px 11px;border:1px solid #e7e0d6;border-radius:9px;background:#fbfaf7;color:#746e65;font-size:10px;line-height:1.45}.builder-score-bands{display:flex;flex-wrap:wrap;gap:6px 12px;margin:8px 0 10px;color:#746e65;font-size:9px}.builder-score-bands span{white-space:nowrap}.builder-score-bands strong{color:#3f3b35}html[data-theme="dark"] .builder-score-bands{color:#aaa59b}html[data-theme="dark"] .builder-score-bands strong{color:#e1ddd4}.builder-chain-table{min-width:1690px}.builder-score-cell{display:grid;grid-template-columns:auto 1fr;gap:1px 6px;align-items:center;min-width:112px}.builder-score-cell strong{grid-row:1/3;font-size:18px;line-height:1}.builder-score-cell span{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em}.builder-score-cell small{grid-column:1/-1;display:inline-flex;width:max-content;margin-top:2px;padding:2px 5px;border-radius:999px;background:#ece8df;color:#5f5a52;font-size:8px;font-weight:800}.builder-score-cell.score-exceptional strong,.builder-score-cell.score-exceptional span{color:#1f632a}.builder-score-cell.score-strong strong,.builder-score-cell.score-strong span{color:#2b7534}.builder-score-cell.score-acceptable strong,.builder-score-cell.score-acceptable span{color:#8a650e}.builder-score-cell.score-aggressive strong,.builder-score-cell.score-aggressive span{color:#bd6a22}.builder-score-cell.score-avoid strong,.builder-score-cell.score-avoid span{color:#a33c28}
html[data-theme="dark"] .builder-decision-strip>div,html[data-theme="dark"] .builder-model-note{background:#1d2025;border-color:#363941}html[data-theme="dark"] .builder-decision-strip span,html[data-theme="dark"] .builder-model-note{color:#aaa59b}html[data-theme="dark"] .builder-score-explanation{background:#2d2619;color:#c6bdaa}html[data-theme="dark"] .builder-score-cell small{background:#30343b;color:#c8c3b9}html[data-theme="dark"] .builder-score-cell.score-exceptional strong,html[data-theme="dark"] .builder-score-cell.score-exceptional span{color:#92dc9c}html[data-theme="dark"] .builder-score-cell.score-strong strong,html[data-theme="dark"] .builder-score-cell.score-strong span{color:#7bc787}html[data-theme="dark"] .builder-score-cell.score-acceptable strong,html[data-theme="dark"] .builder-score-cell.score-acceptable span{color:#e7bb64}html[data-theme="dark"] .builder-score-cell.score-aggressive strong,html[data-theme="dark"] .builder-score-cell.score-aggressive span{color:#f0a45e}html[data-theme="dark"] .builder-score-cell.score-avoid strong,html[data-theme="dark"] .builder-score-cell.score-avoid span{color:#ff9d88}
@media(max-width:720px){.builder-decision-strip{grid-template-columns:1fr 1fr}}


/* V7.5.5 visible IV Rank */
.builder-iv-rank-field{padding:9px 10px;border:1px solid #d3a34a;border-radius:10px;background:#fbf6ea}.builder-iv-rank-field label{color:#8a650e!important;font-weight:800}.builder-iv-rank-field input{width:100%}html[data-theme="dark"] .builder-iv-rank-field{background:#2d2619;border-color:#806126}html[data-theme="dark"] .builder-iv-rank-field label{color:#e7bb64!important}


/* V7.5.6.10 visual refinement — decision hierarchy, compact trades, status clarity */
:root{--success:#2f7d43;--success-soft:#eaf5ed;--warning:#a66f12;--warning-soft:#fbf2df;--danger:#c6472d;--danger-soft:#f9e9e5;--info:#52606d;--info-soft:#edf1f4}

/* Dashboard: pair the two decision metrics and de-emphasize supporting statistics. */
.dashboard-summary-panel{border-color:transparent;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.dashboard-summary-panel .summary-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;align-content:start}
.dashboard-summary-panel .summary-card{border:0;box-shadow:none;background:#f7f4ef}
.summary-card-primary{grid-column:span 3;min-height:112px;padding:15px 16px;background:#fff!important;box-shadow:0 1px 5px rgba(0,0,0,.07)!important;border:1px solid #ebe4d9!important}
.summary-card-primary .label{font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.055em}
.summary-card-primary .value{font-size:24px;line-height:1.05;letter-spacing:-.025em;margin-top:3px}
.summary-submetric{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px;padding-top:9px;border-top:1px solid #eee7dd}
.summary-submetric span{font-size:9px;color:#77736c;text-transform:uppercase;letter-spacing:.035em}
.summary-submetric strong{font-size:14px;font-weight:850;white-space:nowrap}
.summary-card-secondary{grid-column:span 2;min-height:62px;padding:10px 11px}
.summary-card-secondary .label{font-size:8.5px;margin-bottom:4px;text-transform:uppercase;letter-spacing:.035em}
.summary-card-secondary .value{font-size:14px}
.value.green,.summary-submetric .green{color:var(--success)}
.value.red,.summary-submetric .red{color:var(--danger)}
.value.blue{color:var(--info)}

/* Reduce visual boxing in supporting areas. */
.dashboard-side-panel,.dashboard-exposure-panel{box-shadow:none;border-color:#e6e0d7}
.builder-metrics>div,.builder-decision-strip>div,.builder-underlying-summary{box-shadow:none;border-color:transparent;background:#f7f4ef}
.trade-toolbar{box-shadow:none;border-color:#e5dfd6;background:#f8f6f2}

/* Trades: denser ledger, frozen header, aligned numeric columns. */
#tradesPage .table-card{box-shadow:none;border-color:#e4ded5}
#tradesPage .table-wrap{max-height:68vh;overflow:auto;position:relative;scrollbar-gutter:stable}
#tradesPage table{min-width:1570px;font-variant-numeric:tabular-nums}
#tradesPage thead th{position:sticky;top:0;z-index:5;padding:8px 9px;background:#f7f4ef;box-shadow:0 1px 0 var(--border);font-size:8.5px}
#tradesPage td{padding:7px 9px;font-size:11px;line-height:1.2}
#tradesPage .ticker-cell{font-size:12px;letter-spacing:.015em}
#tradesPage .num-cell{text-align:right;font-variant-numeric:tabular-nums}
#tradesPage .strategy-badge,#tradesPage .status-badge{padding:3px 7px;font-size:9px}
#tradesPage .row-action{padding:4px 7px;font-size:10px}
#tradesPage .row-actions{gap:4px}
#tradesPage tbody tr:hover{background:#faf7f1}
.trade-row-closed{color:#6f6a62}
.trade-row-open .ticker-cell{color:#171717}

/* Status colors: brand gold is reserved for emphasis rather than every state. */
.status-badge{border:1px solid transparent}
.status-Open{background:var(--info-soft);color:#41505d;border-color:#d6dee4}
.status-Closed,.status-Expired,.status-Called-Away{background:var(--success-soft);color:#286b39;border-color:#cce4d2}
.status-Assigned,.status-Rolled{background:var(--warning-soft);color:#81590f;border-color:#ead5a8}
.status-Max-Loss{background:var(--danger-soft);color:#a53b28;border-color:#e6beb5}
.status-Cancelled{background:#efede9;color:#77716a;border-color:#ded9d1}
.warning-count{width:20px;height:20px;background:var(--danger-soft);color:var(--danger)}
.positive{color:var(--success)!important}.negative{color:var(--danger)!important}

/* Premium captured: compact progress bar plus exact percentage. */
.capture-cell{display:grid;grid-template-columns:minmax(50px,1fr) 70px;align-items:center;gap:7px;min-width:128px}.capture-value{display:flex;flex-direction:column;align-items:flex-end;line-height:1.05}.capture-value small{font-size:8px;color:#777;white-space:nowrap;margin-top:2px}
.capture-track{height:7px;border-radius:999px;background:#e8e4dd;overflow:hidden}
.capture-track span{display:block;height:100%;border-radius:inherit;background:#8c96a0;min-width:1px}
.capture-cell strong{text-align:right;font-size:10px;font-variant-numeric:tabular-nums;color:#60666d}
.capture-progress .capture-track span{background:#d3a34a}.capture-progress strong{color:#8a650e}
.capture-target .capture-track{background:#deede2}.capture-target .capture-track span{background:var(--success)}.capture-target strong{color:var(--success)}

/* Moneyness / cushion badges and sorting visual. */
.cushion-badge{display:inline-flex;align-items:center;justify-content:center;min-width:72px;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:800;white-space:nowrap;border:1px solid transparent;font-variant-numeric:tabular-nums}
.cushion-strong{background:var(--success-soft);color:#286b39;border-color:#cce4d2}
.cushion-medium{background:#f3f0e8;color:#645c4d;border-color:#dfd7c8}
.cushion-tight{background:var(--warning-soft);color:#81590f;border-color:#ead5a8}
.cushion-itm{background:var(--danger-soft);color:#a53b28;border-color:#e6beb5}

/* Builder: make the selected contract impossible to lose visually. */
.builder-selected-row{background:#fff8e9!important;box-shadow:inset 4px 0 0 #d3a34a,inset 0 1px 0 #ead7ad,inset 0 -1px 0 #ead7ad}
.builder-selected-row td{font-weight:650}
.builder-selected-row .ticker-cell{font-size:13px;color:#7a5108}
.builder-selected-button{background:#171717!important;color:#f3cf87!important;border-color:#171717!important;font-weight:850;box-shadow:0 1px 3px rgba(0,0,0,.16)}

/* Cleaner typography throughout the decision surfaces. */
.page-header h1{font-size:22px;letter-spacing:-.018em}
.card-title-row h2{font-size:14px;letter-spacing:-.01em}
.page-header p,.card p{line-height:1.45}
th{font-weight:850;letter-spacing:.055em}
.ticker-cell{font-weight:850}

html[data-theme="dark"] .dashboard-summary-panel .summary-card{background:#22252a}
html[data-theme="dark"] .summary-card-primary{background:#1d2025!important;border-color:#363941!important;box-shadow:none!important}
html[data-theme="dark"] .summary-submetric{border-color:#363941}
html[data-theme="dark"] .summary-submetric span{color:#aaa59b}
html[data-theme="dark"] .dashboard-side-panel,html[data-theme="dark"] .dashboard-exposure-panel,html[data-theme="dark"] #tradesPage .table-card{border-color:#363941}
html[data-theme="dark"] .trade-toolbar,html[data-theme="dark"] #tradesPage thead th{background:#202329;border-color:#363941}
html[data-theme="dark"] #tradesPage tbody tr:hover{background:#202329}
html[data-theme="dark"] .trade-row-closed{color:#aaa59b}
html[data-theme="dark"] .trade-row-open .ticker-cell{color:#f3f0e9}
html[data-theme="dark"] .status-Open{background:#252c33;color:#c3d0da;border-color:#3d4a55}
html[data-theme="dark"] .status-Closed,html[data-theme="dark"] .status-Expired,html[data-theme="dark"] .status-Called-Away,html[data-theme="dark"] .cushion-strong{background:#17271b;color:#7bc787;border-color:#386641}
html[data-theme="dark"] .status-Assigned,html[data-theme="dark"] .status-Rolled,html[data-theme="dark"] .cushion-tight{background:#2d2619;color:#e7bb64;border-color:#806126}
html[data-theme="dark"] .status-Max-Loss,html[data-theme="dark"] .cushion-itm{background:#2d1915;color:#ffb9a9;border-color:#7e4638}
html[data-theme="dark"] .status-Cancelled,html[data-theme="dark"] .cushion-medium{background:#26282d;color:#aaa59b;border-color:#41444b}
html[data-theme="dark"] .capture-track{background:#353941}
html[data-theme="dark"] .capture-target .capture-track{background:#26392b}
html[data-theme="dark"] .capture-cell strong{color:#c7c3bb}
html[data-theme="dark"] .capture-progress strong{color:#e7bb64}
html[data-theme="dark"] .capture-target strong{color:#7bc787}
html[data-theme="dark"] .builder-selected-row{background:#2d2619!important;box-shadow:inset 4px 0 0 #e0b45c,inset 0 1px 0 #554421,inset 0 -1px 0 #554421}
html[data-theme="dark"] .builder-selected-row .ticker-cell{color:#f2c86f}

@media(max-width:1000px){.dashboard-summary-panel .summary-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.summary-card-primary{grid-column:span 3}.summary-card-secondary{grid-column:span 2}}
@media(max-width:720px){.dashboard-summary-panel .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-card-primary,.summary-card-secondary{grid-column:span 1}.summary-card-primary{min-height:105px}.summary-card-primary .value{font-size:21px}#tradesPage .table-wrap{max-height:none}}


/* V7.5.6.11 layout refinement */
.dashboard-summary-panel .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.summary-card-primary,.summary-card-secondary{grid-column:span 1}
.summary-card-primary{min-height:114px}
.summary-card-secondary{min-height:64px}

/* Tickers table should match the denser trades-table rhythm. */
#watchlistPage .table-card{box-shadow:none;border-color:#e4ded5}
#watchlistPage .table-wrap{max-height:68vh;overflow:auto;position:relative;scrollbar-gutter:stable}
#watchlistPage table{min-width:1450px;font-variant-numeric:tabular-nums}
#watchlistPage thead th{position:sticky;top:0;z-index:5;padding:8px 9px;background:#f7f4ef;box-shadow:0 1px 0 var(--border);font-size:8.5px}
#watchlistPage td{padding:7px 9px;font-size:11px;line-height:1.2}
#watchlistPage .ticker-cell{font-size:12px;letter-spacing:.015em}
#watchlistPage .row-action{padding:4px 7px;font-size:10px}
#watchlistPage tbody tr:hover{background:#faf7f1}
html[data-theme="dark"] #watchlistPage .table-card{border-color:#363941}
html[data-theme="dark"] #watchlistPage thead th{background:#202329;border-color:#363941}
html[data-theme="dark"] #watchlistPage tbody tr:hover{background:#202329}

@media(max-width:1000px){.dashboard-summary-panel .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-card-primary,.summary-card-secondary{grid-column:span 1}}

/* Analytics layout pass: performance left, capital history right. */
.analytics-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch}
.analytics-performance-column{display:grid;grid-template-rows:auto 1fr;gap:16px;min-width:0}
.analytics-history-panel{min-width:0}
.analytics-monthly-panel{margin-top:16px}
.ticker-performance-table{min-width:0}
.ticker-performance-table th,.ticker-performance-table td{white-space:nowrap}
.history-table{min-width:0}
.analytics-history-panel .capital-chart{min-height:220px}
.analytics-history-panel .capital-chart svg{height:205px}
@media(max-width:1100px){.analytics-layout{grid-template-columns:1fr}.analytics-history-panel{grid-column:auto}}
@media(min-width:1101px){.analytics-summary-grid{gap:10px;margin-bottom:12px}.analytics-summary-card{min-height:82px;padding:12px 14px}.analytics-summary-card .value{font-size:19px}.analytics-table th,.analytics-table td{padding:8px 10px}.analytics-performance-column .panel{padding:14px}.analytics-history-panel{padding:14px}}

/* V7.5.6.16 settings cleanup */
.settings-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:stretch}
.settings-layout>.settings-card{min-width:0}
.trading-settings-card{padding:18px}
.settings-group{padding:14px 0;border-bottom:1px solid var(--border)}
.settings-group:first-of-type{padding-top:8px}
.settings-group:last-of-type{border-bottom:0}
.settings-group h3{font-size:10px;letter-spacing:.06em;color:#8b847a;margin:0 0 10px}
.settings-layout .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media(max-width:1000px){.settings-layout{grid-template-columns:1fr}}
@media(max-width:720px){.settings-layout .settings-grid{grid-template-columns:1fr}}

/* V7.5.6.18 simplified settings / equal-width controls */
.settings-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.trading-settings-card .settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.trading-settings-card .field{min-width:0}

.capture-negative .capture-track{background:#f1d9d4}.capture-negative .capture-track span{background:var(--danger)}.capture-negative strong,.capture-negative small{color:var(--danger)}

.assignment-cell{display:flex;flex-direction:column;gap:2px;min-width:145px}.assignment-cell strong{font-size:12px}.assignment-cell small{font-size:10px;color:#8b847a}.trade-table{}


/* ===== Web edition (naturalstatealpha.com/wheel): Payoff Lab inside the Builder, Live data card ===== */
#builderPayoffChart,#labPayoff{overflow:visible;padding:10px}
.builder-payoff-chart svg.pl-chart{display:block;width:100%;min-width:0;height:auto}
.pl-controls{display:flex;flex-wrap:wrap;gap:12px 22px;align-items:flex-end;margin:2px 4px 10px}
.pl-slider{flex:1 1 300px;display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted);min-width:0}
.pl-slider input{width:100%;accent-color:#3987e5}
.pl-ends{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}
.pl-range{display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.pl-range select{min-height:34px;padding:5px 8px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:inherit}
.pl-legend{display:flex;flex-wrap:wrap;gap:14px;font-size:12px;color:var(--muted);margin:0 4px 6px}
.pl-legend span{display:inline-flex;align-items:center;gap:6px}
.pl-legend i,.pl-tip i{display:inline-block;width:18px;height:3px;border-radius:2px}
.pl-tip i{width:10px;margin-right:6px;vertical-align:middle}
.pl-legend .pl-legend-spot{height:0;border-top:1px dashed var(--muted);border-radius:0}
.pl-chart-box{position:relative}
.pl-line-exp{fill:none;stroke:#b6842a;stroke-width:2.5;stroke-linejoin:round}
.pl-line-day{fill:none;stroke:#3987e5;stroke-width:2;stroke-linejoin:round}
.pl-sw-exp,.pl-dot-exp{background:#b6842a;fill:#b6842a}
.pl-sw-day,.pl-dot-day{background:#3987e5;fill:#3987e5}
.pl-fill-up{fill:rgba(42,125,80,.12)}
.pl-fill-down{fill:rgba(178,61,38,.10)}
.pl-label{fill:#77736c;font:11px Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;paint-order:stroke;stroke:#fbfaf7;stroke-width:4px;stroke-linejoin:round}
.pl-label.pl-strong{fill:var(--text)}
.pl-spot{stroke:#77736c;stroke-dasharray:4 4}
.pl-be{fill:#fbfaf7;stroke:var(--text);stroke-width:1.5}
.pl-xh{stroke:#77736c}
.pl-dot{stroke:#fbfaf7;stroke-width:2}
.pl-tip{position:absolute;pointer-events:none;z-index:2;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 10px;font-size:12px;min-width:180px;box-shadow:0 6px 18px rgba(0,0,0,.16)}
.pl-tip[hidden]{display:none}
.pl-tip-t{font-weight:600;margin-bottom:4px}.pl-tip-t span{color:var(--muted);font-weight:400}
.pl-tip-r{display:flex;justify-content:space-between;gap:12px;color:var(--muted)}.pl-tip-r b{font-weight:600}
.pl-pos{color:#2a7d50}.pl-neg{color:#b23d26}
.pl-stats{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:12px 4px 4px}
.pl-stats div{border:1px solid var(--border);border-radius:10px;padding:8px 10px;background:var(--surface);min-width:0}
.pl-stats span{display:block;font-size:11px;color:var(--muted)}
.pl-stats strong{display:block;font-size:16px;margin:2px 0;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.pl-stats em{display:block;font-style:normal;font-size:10.5px;line-height:1.35;color:var(--muted)}
.pl-note{font-size:11px;line-height:1.5;color:var(--muted);margin:8px 4px 2px}
@media(max-width:1000px){.pl-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:560px){.pl-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
html[data-theme="dark"] .pl-line-exp{stroke:#d3a34a}
html[data-theme="dark"] .pl-sw-exp,html[data-theme="dark"] .pl-dot-exp{background:#d3a34a;fill:#d3a34a}
html[data-theme="dark"] .pl-label{fill:#aaa59b;stroke:#1d2025}
html[data-theme="dark"] .pl-spot,html[data-theme="dark"] .pl-xh{stroke:#aaa59b}
html[data-theme="dark"] .pl-be{fill:#1d2025}
html[data-theme="dark"] .pl-dot{stroke:#1d2025}
html[data-theme="dark"] .pl-fill-up{fill:rgba(79,191,134,.13)}
html[data-theme="dark"] .pl-fill-down{fill:rgba(237,128,105,.11)}
html[data-theme="dark"] .pl-pos{color:#4fbf86}
html[data-theme="dark"] .pl-neg{color:#ed8069}
.live-data-card .live-data-help{font-size:12px;line-height:1.55;color:var(--muted);margin:10px 0 0}
#liveDataStatus{font-size:12.5px;line-height:1.5;margin:10px 0 0;color:var(--muted)}
#liveDataStatus[data-tone="ok"]{color:#2a7d50}
#liveDataStatus[data-tone="error"]{color:#b23d26}
#liveDataStatus[data-tone="warn"]{color:#9a6a12}
html[data-theme="dark"] #liveDataStatus[data-tone="ok"]{color:#4fbf86}
html[data-theme="dark"] #liveDataStatus[data-tone="error"]{color:#ed8069}
html[data-theme="dark"] #liveDataStatus[data-tone="warn"]{color:#e0b85f}
.plan-bar .nsa-home-link{color:inherit;font-weight:600;text-decoration:none}
.plan-bar .nsa-home-link:hover,.plan-bar .nsa-home-link:focus-visible{text-decoration:underline;text-underline-offset:3px}
/* ===== Payoff Lab tab ===== */
.lab-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr 1fr;gap:12px}
.lab-grid .field{min-width:0}
.builder-chain-status[data-tone="ok"]{color:#2a7d50}
.builder-chain-status[data-tone="error"]{color:#b23d26}
.builder-chain-status[data-tone="warn"]{color:#9a6a12}
html[data-theme="dark"] .builder-chain-status[data-tone="ok"]{color:#4fbf86}
html[data-theme="dark"] .builder-chain-status[data-tone="error"]{color:#ed8069}
html[data-theme="dark"] .builder-chain-status[data-tone="warn"]{color:#e0b85f}
.lab-page .card{margin-top:16px}
.lab-legs-scroll{overflow-x:auto}
table.lab-legs{width:100%;border-collapse:collapse;min-width:820px}
.lab-legs th{font-size:12px;font-weight:600;color:var(--muted);text-align:left;padding:0 6px 6px}
.lab-legs td{padding:4px 6px;vertical-align:top}
.lab-legs input,.lab-legs select{width:100%;min-height:36px;padding:6px 8px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:13px}
.lab-legs input[type=number]{text-align:right}
.lab-legs input[aria-invalid="true"]{border-color:#b23d26}
.lab-src{display:block;font-size:11px;color:var(--muted);margin-top:3px;min-height:15px}
.lab-dash{display:block;padding:8px 2px;color:var(--muted)}
.lab-empty{padding:26px 8px;text-align:center;color:var(--muted)}
.lab-rm{border:0;background:none;color:var(--muted);font-size:20px;line-height:1;padding:6px 8px;cursor:pointer;border-radius:6px}
.lab-rm:hover{color:#b23d26;background:var(--surface-2)}
.linkish{border:0;background:none;padding:0;color:#b6842a;font:inherit;font-size:11px;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
html[data-theme="dark"] .linkish{color:#e0b85f}
.lab-legs-foot{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.pl-stats.pl-stats-lab{grid-template-columns:repeat(3,minmax(0,1fr))}
.pl-table{margin:10px 4px 2px}
.pl-table summary{cursor:pointer;font-size:12.5px;color:#b6842a}
html[data-theme="dark"] .pl-table summary{color:#e0b85f}
.pl-table-scroll{overflow-x:auto;margin-top:8px}
.pl-dt{border-collapse:collapse;width:100%;min-width:420px;font-size:12.5px;font-variant-numeric:tabular-nums}
.pl-dt th,.pl-dt td{padding:6px 10px;border-bottom:1px solid var(--border);text-align:right}
.pl-dt th{color:var(--muted);font-weight:600}
.pl-dt td:first-child,.pl-dt th:first-child{text-align:left}
@media(max-width:900px){.lab-grid{grid-template-columns:1fr 1fr}.lab-grid .lab-start{grid-column:1 / -1}}
@media(max-width:560px){.pl-stats.pl-stats-lab{grid-template-columns:repeat(2,minmax(0,1fr))}.pl-stats.pl-stats-lab > div:last-child{grid-column:1 / -1}}
@media(max-width:640px){
  table.lab-legs{min-width:0}
  .lab-legs thead{position:absolute;left:-9999px}
  .lab-legs tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 10px;padding:12px 0;border-bottom:1px solid var(--border)}
  .lab-legs tbody tr:last-child{border-bottom:0}
  .lab-legs td{padding:0;display:flex;flex-direction:column;gap:4px;min-width:0}
  .lab-legs td[data-label]::before{content:attr(data-label);font-size:11.5px;color:var(--muted)}
  .lab-legs td[data-label="Price ($)"]{grid-column:span 2}
  .lab-legs td.lab-rm-cell{justify-content:flex-end;align-items:flex-end}
  .lab-legs td.lab-empty{grid-column:1 / -1}
}
