/* One visual contract for the Otto workspace and its body-mounted dialogs. */
body #app .cdx-marketing-page,body :is(.cdx-otto-dialog,.cdx-bid-review){--otto-ink:#172c38;--otto-muted:#647681;--otto-line:#dce5e9;--otto-accent:#17666c;--otto-soft:#f3f7f8;color:var(--otto-ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:13px;line-height:1.5;letter-spacing:normal}
body #app .cdx-marketing-page{background:#fff;border:1px solid #e1e7eb;border-radius:14px;box-shadow:0 3px 16px #152e4010;padding:22px;max-width:100%;min-width:0}
body #app .cdx-otto-tabs{display:flex;gap:4px;overflow-x:auto;border:0;border-bottom:1px solid var(--otto-line);padding:0 0 10px;margin:14px 0 24px;background:transparent}
body #app .cdx-otto-tabs a{display:flex;align-items:center;white-space:nowrap;flex:none;padding:9px 15px;border:0;border-radius:8px;font-size:13px;font-weight:600;color:var(--otto-muted);text-decoration:none}
body #app .cdx-otto-tabs a[aria-current=page]{color:var(--otto-accent);background:#e8f2f2;box-shadow:none}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench){background:#fff;border:0;border-radius:0;padding:0;margin:0;color:var(--otto-ink)}
body #app :is(.cdx-bid-heading h2,.cdx-otto-heading h1){font:650 26px/1.25 Inter,system-ui,sans-serif;letter-spacing:-.7px;margin:0 0 8px}
body #app :is(.cdx-bid-heading p,.cdx-otto-heading p){font-size:13px;line-height:1.65;color:var(--otto-muted);max-width:760px}
body #app .cdx-bid-eyebrow,.otto-eyebrow{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;font-weight:700;color:var(--otto-accent)}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) :is(input:not([type=checkbox]),select),body :is(.cdx-otto-dialog,.cdx-bid-review) :is(input:not([type=checkbox]),select,textarea){box-sizing:border-box;background:#fff;border:1px solid #cdd9df;border-radius:7px;color:var(--otto-ink);font:400 13px/1.4 Inter,system-ui,sans-serif;min-height:36px;padding:7px 10px;width:auto;max-width:100%;box-shadow:none;text-shadow:none}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) input:focus,body :is(.cdx-otto-dialog,.cdx-bid-review) input:focus{outline:2px solid #4f9caa;outline-offset:2px}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) button,body dialog:is(.cdx-otto-dialog,.cdx-bid-review) button:not(.menu button):not(.profile button){border:1px solid #cdd9df;border-radius:7px;background:#fff;color:var(--otto-ink);font:600 12px/1.4 Inter,system-ui,sans-serif;min-height:34px;padding:7px 11px;text-shadow:none;box-shadow:none;transform:none;text-transform:none;letter-spacing:normal;cursor:pointer;transition:background .12s,border-color .12s}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) button:hover:not(:disabled),body dialog:is(.cdx-otto-dialog,.cdx-bid-review) button:not(.menu button):not(.profile button):hover:not(:disabled){background:#edf4f5;border-color:#9fb8c0}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) button:is(.primary,#cdx-bid-analyze,#cdx-bid-apply-selected),body dialog:is(.cdx-otto-dialog,.cdx-bid-review) button:not(.menu button):not(.profile button):is(.primary,[type=submit]){background:var(--otto-accent);color:#fff;border-color:var(--otto-accent)}
body dialog:is(.cdx-otto-dialog,.cdx-bid-review) button:not(.menu button):not(.profile button).secondary{background:white;color:var(--otto-ink);border-color:#cdd9df}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) button:disabled,body dialog:is(.cdx-otto-dialog,.cdx-bid-review) button:not(.menu button):not(.profile button):disabled{opacity:.45;cursor:default}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) input[type=checkbox],body :is(.cdx-otto-dialog,.cdx-bid-review) input[type=checkbox]{width:16px;height:16px;min-height:0;accent-color:var(--otto-accent);margin:3px 0;flex:none}
body #app .cdx-bid-goals{grid-template-columns:repeat(auto-fit,minmax(135px,180px));gap:12px;margin:12px 0}
body #app .cdx-bid-goals :is(input,select){width:100%!important;min-width:0!important}
body #app #cdx-bid-settings{padding:4px 16px;background:var(--otto-soft);border:1px solid var(--otto-line);border-radius:10px;margin:16px 0}
body #app .cdx-bid-note{color:var(--otto-muted);font-size:12px!important}
body #app .cdx-bid-mode-badge{background:#edf7f4;border:0;color:#216c59;font-size:11px}
body #app :is(.cdx-bid-summary,.cdx-otto-stats){gap:10px;margin:18px 0}
body #app :is(.cdx-bid-summary,.cdx-otto-stats)>:is(button,div){border:1px solid var(--otto-line);border-radius:10px;padding:14px 16px;background:#fff;color:var(--otto-ink);min-height:80px}
body #app :is(.cdx-bid-summary,.cdx-otto-stats)>button.selected{outline:2px solid #267c85;outline-offset:-2px;background:#f1f8f8}
body #app :is(.cdx-bid-summary,.cdx-otto-stats) strong{font-size:25px;font-weight:650;line-height:1.2}
body #app .cdx-bid-toolbar{gap:10px;align-items:flex-end;margin:18px 0 12px}
body #app .cdx-bid-toolbar>label{flex:1;min-width:145px;max-width:250px;font-size:11px}
body #app .cdx-bid-toolbar>label:first-child{max-width:310px}
body #app .cdx-bid-bulk{flex-basis:100%;padding:10px 12px;background:#f1f7f7;border:1px solid #d4e4e5;border-radius:9px;position:sticky;top:0;z-index:3;box-shadow:0 3px 9px #172c3808}
body #app .cdx-bid-bulk #cdx-bid-selection{margin-left:auto;color:var(--otto-ink);font-weight:600;font-size:12px}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) table,body :is(.cdx-otto-dialog,.cdx-bid-review) table{font:12px/1.5 Inter,system-ui,sans-serif;border-collapse:collapse;width:100%;text-align:left;background:#fff;color:var(--otto-ink);border:0}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) th,body :is(.cdx-otto-dialog,.cdx-bid-review) th{font-size:10px;font-weight:650;color:#637682;padding:11px 12px;background:#f4f7f9;border:0;border-bottom:1px solid var(--otto-line);position:sticky;top:0;z-index:1;white-space:nowrap;letter-spacing:.15px}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) td,body :is(.cdx-otto-dialog,.cdx-bid-review) td{padding:12px;border:0;border-bottom:1px solid #e9eef1;vertical-align:middle;font-variant-numeric:tabular-nums;min-width:0}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) tr:hover td,body :is(.cdx-otto-dialog,.cdx-bid-review) tr:hover td{background:#f7fafb}
body #app :is(.cdx-bid-panel,.cdx-otto-workbench) td small,body :is(.cdx-otto-dialog,.cdx-bid-review) small{font:400 11px/1.5 Inter,system-ui,sans-serif;color:#74848d;margin-top:3px;display:block;white-space:normal}
body #app .cdx-bid-panel td:nth-child(2){min-width:170px;max-width:250px}
body #app .cdx-bid-panel td:nth-child(3){min-width:150px;max-width:220px}
body #app :is(.cdx-bid-table-scroll,.cdx-otto-table){border:1px solid var(--otto-line);border-radius:9px;max-height:650px;overflow:auto}
body #app .cdx-bid-panel .otto-campaign-link{padding:0;border:0;background:none;color:#17666c;text-align:left;font-size:12px;min-height:24px;line-height:1.45;font-weight:650;max-width:250px;overflow-wrap:anywhere;white-space:normal}
body #app .cdx-bid-edit{display:flex;gap:6px}.cdx-bid-edit input{width:85px!important;min-width:70px!important}
body #app .cdx-bid-pill,.cdx-otto-pill{border-radius:5px;font-size:10px;padding:4px 7px;line-height:1.4}
body #app .cdx-bid-reduce{background:#fff0e7;color:#985424}body #app .cdx-bid-increase{background:#e7f5ef;color:#256b4f}body #app .cdx-bid-hold{background:#eef2f5;color:#687b88}
body #app .otto-row-status{display:block;max-width:250px;margin-top:6px;font-size:11px;font-weight:600;color:#376b77;white-space:normal}
body #app .otto-row-status[data-state=notSent],body #app .otto-row-status[data-state=conflict]{color:#9b632a}
body #app .cdx-bid-job-group{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:11px 0;color:var(--otto-ink);font-size:12px}
body #app #cdx-bid-job{background:#f6f9fa;border:1px solid var(--otto-line);border-radius:10px;max-height:none;margin:18px 0;padding:14px 16px}
body #app #cdx-bid-job details>div{max-height:340px;overflow:auto}.otto-job-progress{height:5px;background:#dde8ec;border-radius:4px;overflow:hidden;margin:12px 0}.otto-job-progress>span{display:block;background:#288b7e;height:100%;transition:width .3s}.otto-job-counts{display:flex;flex-wrap:wrap;gap:16px;font-size:12px;color:#5c7581}.otto-job-counts strong{color:#1c3945;margin-right:5px}
body :is(.cdx-otto-dialog,.cdx-bid-review){width:min(1040px,calc(100vw - 36px));max-width:1040px;max-height:92dvh;padding:24px;border:1px solid #d9e3e9;border-radius:16px;background:#fff;box-shadow:0 25px 90px #102b3b40;margin:auto;overflow:auto}
body :is(.cdx-otto-dialog,.cdx-bid-review)::backdrop{background:#10243580;backdrop-filter:blur(4px)}
body :is(.cdx-otto-dialog,.cdx-bid-review)>header,body .otto-dialog-heading{width:100%;height:auto;max-width:none;margin:0 0 18px;padding:0 0 16px;border:0;border-bottom:1px solid var(--otto-line);background:transparent;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;box-shadow:none}
body :is(.cdx-otto-dialog,.cdx-bid-review) :is(h2,h3){font-family:inherit;color:var(--otto-ink);letter-spacing:-.35px;text-transform:none}
body :is(.cdx-otto-dialog,.cdx-bid-review) h2{font-size:22px;line-height:1.35;font-weight:650;margin:5px 0;overflow-wrap:anywhere}body :is(.cdx-otto-dialog,.cdx-bid-review) h3{font-size:15px;margin:14px 0}
body :is(.cdx-otto-dialog,.cdx-bid-review) p{font-size:12px;line-height:1.65;color:var(--otto-muted);margin:12px 0}
body :is(.cdx-otto-dialog,.cdx-bid-review) form{margin:0;padding:0;border:0;background:none;max-width:none;display:block}
body :is(.cdx-otto-dialog,.cdx-bid-review) label{font:500 11px/1.5 Inter,system-ui,sans-serif;color:#5c7380;display:flex;flex-direction:column;gap:5px;margin:0}
body :is(.cdx-otto-dialog,.cdx-bid-review) footer,body .cdx-bid-review-actions{width:auto;height:auto;margin:18px 0 0;padding:16px 0 0;display:flex;align-items:center;justify-content:flex-end;gap:10px;background:#fff;color:var(--otto-muted);border:0;border-top:1px solid var(--otto-line);box-shadow:none;position:sticky;bottom:-24px;z-index:2;font-size:11px;flex-wrap:wrap}
body .cdx-otto-dialog footer>span{flex:1;max-width:580px}body .cdx-otto-dialog .cdx-otto-table{max-height:44dvh;margin:12px 0;border:1px solid var(--otto-line);border-radius:8px}
body .cdx-otto-dialog .cdx-otto-form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.cdx-otto-dialog textarea{max-height:160px;resize:vertical}
body :is(.cdx-otto-dialog,.cdx-bid-review) .error{color:#ab3d38}.otto-desk-context{display:flex;flex-wrap:wrap;gap:14px;align-items:center;font-size:11px;color:#617982}.otto-desk-tools{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}.otto-desk-tools>label:first-child{flex:1;max-width:340px}.otto-bulk-editor{display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:10px;background:#edf5f6;border:1px solid #d5e5e6;border-radius:8px;font-size:12px}.otto-bulk-editor>span{margin-right:auto}.otto-bulk-editor>label{flex-direction:row!important;align-items:center}.otto-bulk-editor input{width:85px!important}.otto-bid-value{display:flex;align-items:center;gap:10px}.otto-bid-value input{width:92px!important}.otto-bid-value>span{font-size:11px;min-width:50px}.otto-down{color:#27725f}.otto-up{color:#b07429}.otto-warning{background:#fff7e9;border:1px solid #ebd8ac;border-radius:8px;padding:12px;color:#8b6323!important}
.otto-decision-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.otto-decision-metrics>div{padding:12px 15px;border:1px solid #dce5e9;border-radius:9px;background:#f8fafb;display:flex;flex-direction:column;gap:5px}.otto-decision-metrics span{font-size:11px;color:#647681}.otto-decision-metrics strong{font-size:21px;font-weight:650;line-height:1.3;font-variant-numeric:tabular-nums}.otto-decision-metrics small{font-size:11px}
body #app .otto-overview-campaigns{margin:20px 0}.otto-overview-campaigns h2{font-size:18px}.otto-overview-campaigns .cdx-otto-table{max-height:360px}.otto-overview-campaigns .otto-campaign-link{background:none;border:0;padding:0;font-weight:600;color:#17666c;cursor:pointer;text-align:left}.otto-overview-campaigns .otto-desk-tools{align-items:end}.otto-overview-campaigns .otto-desk-tools>div{margin-right:auto}.otto-overview-campaigns p{font-size:12px;color:#647681}
body #app .cdx-marketing-panel{border-color:#e0e7eb;border-radius:10px;box-shadow:none}body #app .cdx-marketing-kpi-dark{background:#193e4c}body #app .cdx-marketing-kpi:not(.cdx-marketing-kpi-dark){background:#f8fafb;border-color:#e0e7eb}
@media(max-width:760px){body #app .cdx-marketing-page{padding:14px;border-radius:10px}body #app .cdx-otto-tabs{margin:10px 0 18px}body #app .cdx-otto-tabs a{padding:8px 12px;font-size:12px}body #app :is(.cdx-bid-heading h2,.cdx-otto-heading h1){font-size:23px}.otto-decision-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}body :is(.cdx-otto-dialog,.cdx-bid-review){width:calc(100vw - 16px);padding:16px;max-height:96dvh;border-radius:12px}body .cdx-otto-dialog .cdx-otto-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body #app .cdx-bid-toolbar{display:flex}body #app .cdx-bid-toolbar>label:first-child{flex-basis:100%;max-width:none}body #app .cdx-bid-bulk{position:static;gap:6px}body #app .cdx-bid-bulk button{font-size:11px}body #app .cdx-bid-job-group{display:block}body .cdx-otto-dialog footer>span{flex-basis:100%}.otto-bulk-editor>span{flex-basis:100%}.otto-decision-metrics strong{font-size:19px}}
@media(prefers-reduced-motion:reduce){.otto-job-progress>span{transition:none}}
.otto-optimizer-quick{display:flex;gap:4px;border-left:1px solid #cbdde0;padding-left:10px}.otto-optimizer-quick button{font-size:11px!important;padding:6px 8px!important}body #app .cdx-marketing-product-cell .otto-campaign-link{display:block;border:0;background:none;color:#17666c;padding:2px 0;min-height:0;font:500 11px/1.5 system-ui;text-align:left;max-width:260px;overflow-wrap:anywhere}
body #app .cdx-otto-tabs{flex-wrap:nowrap;align-items:center;min-height:48px;scrollbar-width:thin}body #app .cdx-otto-tabs a{flex:0 0 auto;min-height:32px}
@media(max-width:760px){html:has(.cdx-marketing-page){scroll-padding-top:84px}body #app .cdx-marketing-page :is(button,a,input,select,summary){scroll-margin-top:84px}}
body #app #cdx-bid-targets{font-size:12px;font-weight:500;color:#5e7b84;margin-left:12px}body #app .cdx-bid-presets{display:flex;gap:7px;flex-wrap:wrap}
body #app .cdx-bid-panel td:nth-child(3),body #app .cdx-bid-panel .cdx-bid-reason{white-space:normal;overflow-wrap:anywhere;line-height:1.5}body #app .cdx-bid-panel .cdx-bid-reason{max-width:215px}
body #app .cdx-bid-table-scroll[data-report-frame]{block-size:auto;min-block-size:0;max-block-size:650px}body #app .cdx-bid-table-scroll[data-report-busy=true]{min-block-size:240px}
body #app .cdx-bid-panel #cdx-bid-error:empty{display:none;block-size:0;min-block-size:0;margin:0}body #app .cdx-bid-panel #cdx-bid-stamp{block-size:auto;min-block-size:0}

/* Legacy global :not(.menu button) rules also cover body-mounted dialogs. */
body dialog:is(.cdx-otto-dialog,.cdx-bid-review) a{color:var(--otto-accent);font-size:12px}
@media(max-width:760px){
 body .cdx-otto-desk .otto-decision-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0}
 body .cdx-otto-desk .otto-decision-metrics>div{padding:9px 8px}.cdx-otto-desk .otto-decision-metrics strong{font-size:16px}
 body .cdx-otto-desk .otto-bulk-editor{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px}
 body .cdx-otto-desk .otto-bulk-editor>span{grid-column:1/3;order:0}
 body .cdx-otto-desk [data-desk-reset]{grid-column:3;order:1;font-size:10px!important;padding:3px!important;min-height:28px!important}
 body .cdx-otto-desk [data-desk-percent]{order:2}
 body .cdx-otto-desk .otto-bulk-editor>label{grid-column:1/3;order:3;min-width:0;justify-content:space-between;font-size:10px}
 body .cdx-otto-desk [data-desk-set]{grid-column:3;order:4;font-size:10px!important;padding:4px!important}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]){max-height:46dvh}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) table{display:block;margin:0;overflow:visible}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) thead{display:block}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) tbody{display:block}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) tr{display:grid;grid-template-columns:26px minmax(0,1fr) minmax(0,1fr);padding:8px;border-bottom:1px solid var(--otto-line)}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) td{display:block;padding:5px;border:0;white-space:normal}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) td:nth-child(2){grid-column:2/4;overflow-wrap:anywhere}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) td:nth-child(3){grid-column:1/4}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) td:nth-child(4){grid-column:1/3}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) td[data-label]::before{content:attr(data-label);display:block;color:var(--otto-muted);font-size:10px;margin-bottom:3px}
 body .cdx-otto-desk .otto-bid-value{gap:5px;flex-wrap:wrap}.cdx-otto-desk .otto-bid-value input{width:80px!important}
}

@media(max-width:760px){
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) thead tr{display:block;padding:0}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) thead th:not(:first-child){display:none}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) thead th:first-child{display:flex;align-items:center;gap:8px}
 body .cdx-otto-desk .cdx-otto-table:has([data-desk-rows]) thead th:first-child::after{content:attr(data-label)}
}

body dialog:is(.cdx-otto-dialog,.cdx-bid-review){scroll-padding-block:60px 130px}
@media(max-width:760px){body .cdx-otto-desk footer{position:static}}

body #app .cdx-otto-job header{position:static;min-height:0;height:auto;padding:0;margin:0;border:0;background:none;box-shadow:none;width:auto}
