/* Bid Buddy color system: blue daylight, rich navy, and orange. */
:root,.light,.default,[data-theme="light"],[data-theme="default"]{
 color-scheme:light;
 --accent:#39c2eb;--accent-foreground:#072534;--background:#f3f8fc;--foreground:#132b40;
 --border:#ccdeeb;--separator:#dce8f1;--default:#e6f0f7;--default-foreground:#17354d;
 --field-background:#ffffff;--field-border:#c1d7e6;--field-foreground:#132b40;--field-placeholder:#60798e;
 --focus:#079dcc;--muted:#536d83;--overlay:#ffffff;--overlay-foreground:#132b40;
 --surface:#ffffff;--surface-foreground:#132b40;--surface-secondary:#eaf3f9;--surface-secondary-foreground:#17354d;
 --surface-tertiary:#dcebf5;--surface-tertiary-foreground:#17354d;--segment:#ffffff;--segment-foreground:#17354d;
 --success:#15834e;--success-foreground:#ffffff;--danger:#bf3154;--danger-foreground:#ffffff;
 --warning:#b56813;--warning-foreground:#ffffff;--scrollbar:#9db9ce;
 --bb-orange:#ff8a2c;--bb-orange-hover:#ffa149;--bb-orange-foreground:#301607;
 --bb-hero:#102e41;--bb-hero-top:#184861;
 --bb-shell:#102e41;--bb-shell-top:#194b63;--bb-brand-blue:#44c4ec;--bb-brand-foreground:#f2faff;--bb-brand-muted:#bfd6e3;
 --bb-card-shadow:0 2px 5px #102e4105,0 9px 25px #102e410b;
 --bb-status-booked:#15834e;--bb-status-completed:#0879a1;--bb-status-cancelled:#bf3154;
 --radius:.5rem;--field-radius:.25rem;--button-radius:.25rem;--font-sans:var(--font-varela-round);
}
.dark,[data-theme="dark"]{
 color-scheme:dark;
 --accent:#39d8ff;--accent-foreground:#042431;--background:#061221;--foreground:#eef7ff;
 --border:#294561;--separator:#203b55;--default:#15334e;--default-foreground:#e7f4ff;
 --field-background:#08192c;--field-border:#31536f;--field-foreground:#eef7ff;--field-placeholder:#94b2c9;
 --focus:#39d8ff;--muted:#afc5da;--overlay:#0d2239;--overlay-foreground:#eef7ff;
 --surface:#0b1d32;--surface-foreground:#eef7ff;--surface-secondary:#102942;--surface-secondary-foreground:#e7f4ff;
 --surface-tertiary:#183851;--surface-tertiary-foreground:#eef7ff;--segment:#183851;--segment-foreground:#eef7ff;
 --success:#63f59a;--success-foreground:#062516;--danger:#ff7895;--danger-foreground:#2a0d17;
 --warning:#ffbf65;--warning-foreground:#32200b;--scrollbar:#355e7b;
 --bb-orange:#ff8a2c;--bb-orange-hover:#ffa149;--bb-orange-foreground:#301607;
 --bb-hero:#09243b;--bb-hero-top:#12435c;
 --bb-shell:#09243b;--bb-shell-top:#123e58;--bb-brand-blue:#39d8ff;--bb-brand-foreground:#eef7ff;--bb-brand-muted:#b8d2e5;
 --bb-card-shadow:0 4px 20px #000b1945;
 --bb-status-booked:#63f59a;--bb-status-completed:#39d8ff;--bb-status-cancelled:#ff7895;
 --radius:.5rem;--field-radius:.25rem;--button-radius:.25rem;--font-sans:var(--font-varela-round);
}

@font-face{font-family:'Varela Round';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/varela-round-400.ttf') format('truetype')}
/* Shared adapters for the existing application components. */
:root,.light,.default,[data-theme="light"],[data-theme="default"],.dark,[data-theme="dark"]{
 --font-varela-round:'Varela Round',system-ui,-apple-system,'Segoe UI',sans-serif;
 --body:var(--font-sans);--display:var(--font-sans);--bb-body:var(--font-sans);--bb-display:var(--font-sans);
 --paper:var(--background);--card:var(--surface);--ink:var(--foreground);--ink2:var(--muted);--ink-2:var(--muted);--ink-3:var(--muted);
 --line:var(--border);--line2:var(--separator);--blue:var(--accent);--blue-ink:var(--accent-foreground);--blue-d:var(--accent-foreground);
 --blue-wash:color-mix(in oklch,var(--accent) 14%,var(--surface));--blue-l:var(--blue-wash);--orange:var(--bb-orange);--orange-d:var(--bb-orange-foreground);--orange-l:color-mix(in oklch,var(--bb-orange) 14%,var(--surface));
 --green:var(--success);--green-l:color-mix(in oklch,var(--success) 15%,var(--surface));--red:var(--danger);--red-l:color-mix(in oklch,var(--danger) 12%,var(--surface));--amber:var(--warning);--yellow:var(--warning);--dark:var(--foreground);--mid:var(--muted);--gray:var(--muted);--bg:var(--background);--white:var(--surface);--shadow:var(--bb-card-shadow);
}
@media screen{
 html{color-scheme:light;background:var(--background);color:var(--foreground);font-family:var(--font-sans);font-synthesis:weight;scrollbar-color:var(--scrollbar) var(--background)}
 html.dark,html[data-theme="dark"],.dark,[data-theme="dark"]{color-scheme:dark}
 body,html body:has(>main),html[data-assessment-screen="home"] body{background:var(--background)!important;color:var(--foreground);font-family:var(--font-sans)!important}
 body :is(h1,h2,h3,h4,button,input,select,textarea,a,summary),.mono,.bd-row .r,.bd-foot .r,.line-total,.sec-sum,.bqty,.bamt,.qtybox input,.pricecell,.ef-meta,.sum-row .v,.bb-cat-stats>div>strong{font-family:var(--font-sans)!important}
 :focus-visible{outline:3px solid var(--focus)!important;outline-offset:3px}::selection{color:var(--accent-foreground);background:var(--accent)}
 body :is(button,[role="button"],.bb-primary,.bb-secondary,.bb-backup,.ah-btn,.ops-button,.bb-nav-link,.hd-ticket-button,.supply-button){border-radius:var(--button-radius)!important}
 body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),select,textarea){border-radius:var(--field-radius)!important;border-color:var(--field-border)!important;background:var(--field-background)!important;color:var(--field-foreground)!important;caret-color:var(--field-foreground)}
 body :is(input,textarea)::placeholder{color:var(--field-placeholder)!important;opacity:1}
 body :is(input,select,textarea):disabled{color:var(--muted)!important;background:var(--surface-secondary)!important}
 input[type="checkbox"],input[type="radio"],input[type="range"]{accent-color:var(--accent)}
 /* Existing surface selectors include dialogs created after page load. */
 html body :is(.panel,.bd-sec,.bd-foot,.bb-settings-card,.bb-account,.bb-tools-card,.line,.margin,.field,.ah-card,.ah-section,.ah-draft-card,.bb-cat-row,.bb-cat-price-panel,.bb-cat-notes,.bb-cat-linked,.bb-cat-kit-picker,.ops-stock-card,.ops-stock-planning,.ops-breakdown,.ops-table-wrap,.assessment-sheet,.send-card,.summary-top,.summary-meta,.summary-preview-wrap,.email-card,.wa-tool-options,.wa-layer-menu,.address-suggestions,.share-card,.share-line,.share-upload-zone){border-color:var(--border)!important;border-radius:var(--radius)!important;background:var(--surface)!important;color:var(--surface-foreground)!important;box-shadow:none}
 html body:has(>main)>main{background:var(--surface);color:var(--surface-foreground);border-color:var(--border);border-radius:var(--radius);box-shadow:none}
 html body:has(>main)>main :is(p,label,th){color:var(--muted)}
 html body:has(>main)>main th{background:var(--surface-secondary);border-color:var(--separator)}
 html body:has(>main)>main td{color:var(--foreground);border-color:var(--separator)}
 html body:has(>main) .links button{color:var(--foreground)}html body:has(>main) .status{color:var(--danger)}
 html body :is(.panel-hd,.addbar,.line-ctl,.bd-sec-hd,.cat-controls,.ops-tabs,.bb-cat-dialog-head,.bb-order-head,.bb-tool-head,.bb-jobber-head,.bb-cat-dialog-foot,.bb-order-foot,.bb-tool-foot,.bb-jobber-foot,.ah-table-head){border-color:var(--separator)!important;background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important}
 html body :is(.bb-cat-fields dt,.bb-cat-notes p,.bb-cat-linked p,.bb-cat-stats>div>span,.ops-caption,.ops-section-head p,.ah-section-head p,.ah-meta,.ah-empty,.bb-page-sub,.bb-breadcrumb,.bb-account-body p,.bb-settings-body p,.hd-empty,.hd-metric-label,.hd-metric-sub){color:var(--muted)!important}
 html body :is(.bb-cat-row,.ah-list-item,.ah-upcoming-row,.ah-received-row,.ops-stock-row,.hd-feed-row,.hd-upcoming-row){border-color:var(--separator)!important}
 html body :is(.bb-cat-dialog,.bb-order-dialog,.bb-tool-dialog,.bb-jobber-dialog){background:var(--overlay)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important;box-shadow:none}
 dialog::backdrop{background:color-mix(in oklch,var(--foreground) 38%,transparent)}
 /* Blue work actions; orange assessment actions are defined below. */
 html body :is(.bb-primary,.addbtn.hero,.ah-btn-primary,.ops-button.primary,.bb-tool-button.primary,.bb-order-button.primary,.bb-cat-action.primary,.bb-jobber-button.primary,.qbtn.pri,.btn-pri,.summary-action.save,.summary-action.send,.share-submit){background:var(--accent)!important;border-color:var(--accent)!important;color:var(--accent-foreground)!important;box-shadow:none!important}
 html body:has(>main)>main :is(button[type="submit"],#submit,.primary){background:var(--accent);border-color:var(--accent);color:var(--accent-foreground)}
 html body:has(>main)>main #submit:hover{background:color-mix(in oklch,var(--accent) 87%,var(--foreground));border-color:var(--accent)}
 html body :is(.bb-secondary,.bb-backup,.abtn,.addbtn,.ah-btn-secondary,.ops-button,.bb-cat-action,.bb-tool-button,.bb-order-button,.bb-jobber-button,.btn-ghost,.summary-action,.hdr-btn,.assessment-home-back,.hd-ticket-button,.supply-button){background:var(--default)!important;border-color:var(--border)!important;color:var(--default-foreground)!important}
 html body :is(.bb-workflow button.active,.ops-tabs button[aria-selected="true"],.chip.on,.chip.sel,.tab.active,[data-cattype].on,.hd-filter[aria-pressed="true"]){background:var(--accent)!important;border-color:var(--accent)!important;color:var(--accent-foreground)!important}
 html body :is(.bb-cat-action.danger,.bb-tool-button.danger,.bb-order-button.danger){background:color-mix(in oklch,var(--danger) 12%,var(--surface))!important;border-color:var(--danger)!important;color:var(--danger)!important}
 html body :is(.bb-cat-action,.ops-button,.bb-secondary,.ah-btn-secondary,.bb-tool-button,.bb-order-button):hover:not(:disabled){filter:brightness(.96)}
 /* Navigation retains the compact semantic surfaces; the brand header is paired below. */
 html body :is(.bb-aux-menu,.bb-bottom-nav,.ah-tabbar,.foot,.qs-navigation,.mobile-menu-inner,.bb-session,.bb-menu-account){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important;box-shadow:none!important}
  html body :is(.bb-session-identity>span,.bb-session-identity strong,.bb-session-links a){color:var(--muted)!important}
 html body :is(.bb-bottom-nav .bb-nav-link,.ah-tabbar a){color:var(--foreground)!important;background:transparent!important;border-color:var(--border)!important}
 html body :is(.bb-desktop-links .bb-nav-link.active,.bb-bottom-nav .bb-nav-link.active,.ah-tabbar a.active,.topbar .qs-navigation .tab.active){color:var(--accent-foreground)!important;background:var(--accent)!important;box-shadow:none!important}
 html body :is(.bb-bottom-nav .bb-nav-link.active svg,.ah-tabbar a.active svg){color:var(--accent-foreground)!important;background-color:var(--accent-foreground)!important}
 html body :is(.bb-bottom-nav .bb-nav-link svg,.ah-tabbar a svg)::before{background:transparent!important}
 html body .qs-hamburger span{background:var(--bb-brand-foreground)}
 html body .topbar .qs-navigation :is(.tab,.app-menu-secondary a,.qs-navigation-heading){color:var(--foreground)!important}
 html body .password-field .password-toggle{color:var(--foreground);background:transparent}html body .password-field .password-toggle:hover{background:var(--default)}
 /* Landing pages keep their current structure and truthful data. */
 html body .hd-surface{--paper:var(--background);--card:var(--surface);--ink:var(--foreground);--ink-soft:var(--muted);--ink-muted:var(--muted);--rule:var(--border);--air:var(--accent);--link:var(--accent-foreground);--orange:var(--bb-orange);color:var(--foreground)}
 html body :is(.hd-main,.hd-quick,.hd-metrics,.hd-pipeline,.hd-upcoming,.hd-attention,.hd-recent,.hd-quotes,.ah-quick,.ah-received,.ah-draft,.ql-body,.ql-card,.ql-row){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body :is(.hd-ticket,.hd-ticket-top,.hd-ticket-stub,.hd-plain){border-radius:var(--radius)!important;background:var(--bb-hero)!important;filter:none!important}
 html body :is(.hd-ticket-top,.hd-ticket-stub,.hd-plain,.sum-total,.line.section){color:#eef7ff!important}
 html body :is(.hd-ticket-count,.hd-ticket-note){border-radius:var(--radius)!important}
 html body .hd-ticket-button.hd-solid{background:var(--accent)!important;color:var(--accent-foreground)!important}
 html body .hd-ticket-button.hd-glass{background:color-mix(in oklch,var(--accent) 20%,var(--accent-foreground))!important;color:#eef7ff!important}
 html body .ops-surface{--ops-rule:var(--border);--ops-muted:var(--muted);--ops-teal:var(--accent);color:var(--foreground)}
 html body :is(.bb-workflow,.reason-bar,.info-bar,.ph,.pb,.diff-gate,.af-global,.af-box,.loc-btn,.reason-card,.reason-group,.assessment-intro,.assessment-progress){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important}
 html body :is(.sh,.reason-group summary,.loc-btn .lnm,.assessment-intro h1,.ph-title,.inf label){color:var(--foreground)!important}
 html body :is(.loc-btn.active,.loc-btn.completed,.native-choice:has(input:checked) .chip,.reason-chip.sel){border-color:var(--accent)!important;background:color-mix(in oklch,var(--accent) 15%,var(--surface))!important;color:var(--foreground)!important}
 html body :is(.sum-total,.line.section){background:var(--bb-hero)!important;border-color:var(--border)!important}
 html body .line.section{
  --field-background:color-mix(in srgb,var(--bb-hero) 88%,white);
  --field-foreground:var(--bb-brand-foreground);--field-placeholder:var(--bb-brand-muted);--field-border:#6c93a9;
 }
 html body #view-builder .line.section .line-top{display:grid;grid-template-columns:20px 32px minmax(0,1fr) 44px;gap:6px;padding:10px}
 html body #view-builder .line.section .line-name{width:100%;min-width:0;padding:9px 10px;border:1px solid var(--field-border)!important;font-weight:600}
 html body #view-builder .line.section .sec-sum{grid-column:3;grid-row:2;color:var(--bb-brand-muted);font-size:13px;line-height:1.4;white-space:normal}
 html body #view-builder .line.section .iconbtn{grid-column:4;grid-row:1}
 html body #view-builder .line.section .grip{color:var(--bb-brand-muted)}
 html body #view-builder .line.section .chev{color:var(--bb-brand-foreground)}
 html body #view-shopping #shop-title{font-size:16px;font-weight:600;line-height:1.5;letter-spacing:0;overflow-wrap:anywhere;max-width:64ch}
 html body #view-shopping .shead{gap:16px;align-items:flex-start}
 html body #view-shopping .shead>div:first-child{min-width:0;flex:1 1 280px}
 html body #view-shopping .shead .eyebrow{font-size:11px;line-height:1.5;margin-bottom:6px}
 html body #view-shopping :is(.shead,.supgroup,.shop-row){background:var(--surface);color:var(--surface-foreground);border-color:var(--separator)}
 html body #view-shopping :is(.supgroup-hd,.shop-row.head){background:var(--surface-secondary);color:var(--surface-secondary-foreground);border-color:var(--separator)}
 html body #view-shopping .shop-row .buy{color:var(--bb-link-ink)}
 html body #view-shopping .shop-row .h{font-size:11px;letter-spacing:.025em}
 html body #connection-panel{background:var(--surface);color:var(--surface-foreground);border-color:var(--border);border-left-color:var(--accent)}
 html body #connection-panel[data-status="error"]{border-left-color:var(--danger)}
 html body #connection-diagnostic{background:var(--surface-secondary);color:var(--surface-secondary-foreground)}
 html body #view-builder .section-add-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 12px 12px}
 html body #view-builder .section-add-actions button{flex:1;min-width:0;min-height:44px;padding:9px 10px;background:#ffffff10;color:var(--bb-brand-foreground);border:1px solid #6c93a9;font-size:14px;line-height:1.3;font-weight:600}
 html body #view-builder .section-add-actions button:hover{background:#ffffff20}
 html body #overlay .picker-location:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:14px 20px;background:var(--surface-secondary);color:var(--surface-secondary-foreground);border-bottom:1px solid var(--separator)}
 html body #overlay .picker-location label{font-size:13px;font-weight:600}
 html body #overlay .picker-location select{width:100%;min-width:0;min-height:44px;padding:9px 12px;border:1px solid var(--field-border)}
 html body #overlay .picker-location small{font-size:13px;line-height:1.5;color:var(--muted)!important}
 html body :is(.info-bar input,.field input){min-height:44px}
 html body :is(.bb-jobber-message.error,.bb-order-message.error,.bb-tool-message.error,.assessment-action-notice){color:var(--danger)!important}
 html body :is(.bb-session-links a,.share-header h1,.share-header p,.share-header small){color:var(--foreground)!important}
 html body.share-page::before{background:var(--background)}
 html body :is(.bb-save-error,.summary-message.error){background:color-mix(in oklch,var(--danger) 10%,var(--surface));color:var(--foreground);border-color:var(--danger);border-radius:var(--radius)}
}

/* Readable semantic text and the current landing/dialog selectors. */
:root,.light,.default,[data-theme="light"],[data-theme="default"],.dark,[data-theme="dark"]{
 --bb-link-ink:color-mix(in oklch,var(--accent) 35%,var(--foreground));
 --bb-muted-ink:color-mix(in oklch,var(--muted) 94%,var(--foreground));
 --blue-ink:var(--bb-link-ink);--blue-d:var(--bb-link-ink);--ink2:var(--bb-muted-ink);--ink-2:var(--bb-muted-ink);--ink-3:var(--bb-muted-ink);
}
@media screen{
 :focus-visible{box-shadow:0 0 0 1px var(--foreground)!important}
 html body .hd-surface{background:var(--background)!important;--link:var(--bb-link-ink);--ink-soft:var(--bb-muted-ink);--ink-muted:var(--bb-muted-ink)}
 html body :is(.hd-nums,.hd-panel,.hd-studio-current,.hd-studio-band,.hd-studio-nav,.ah-panel,.ah-draft-row,.ah-received-row,.ah-upcoming-row,.ah-retry,.bb-calendar,.bb-cal-grid,.bb-cal-agenda,.bb-cal-day,.bb-cal-details,.bb-cal-recurrence,.ops-stock-dialog,.ops-stock-detail-card,.ops-stock-job){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important;box-shadow:none}
 html body :is(.hd-num:hover,.ah-draft-row:hover,.ah-received-row:hover,.ah-upcoming-row:hover,.bb-cal-day:hover,.ops-stock-job:hover){background:var(--surface-secondary)!important}
 html body :is(.bb-cal-dialog,.ops-stock-dialog){background:var(--overlay)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important;box-shadow:none}
 html body :is(.bb-cal-head,.bb-cal-foot,.ops-stock-dialog>header,.ops-stock-dialog>footer){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body .bb-calendar{--cal-ink:var(--foreground);--cal-muted:var(--bb-muted-ink);--cal-line:var(--border);--cal-blue:var(--bb-link-ink)}
 html body :is(.bb-cal-button,.bb-cal-icon-button,.ops-stock-dialog [data-stock-close]:not(.ops-button)){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body .bb-calendar .bb-cal-day.outside{background:var(--surface-secondary)!important}
 html body .bb-calendar .bb-cal-day.outside:hover{background:var(--surface-tertiary)!important}
 html body .bb-calendar .bb-cal-day.outside.selected{background:color-mix(in oklch,var(--accent) 20%,var(--surface))!important}
 html body :is(.bb-calendar,.bb-cal-dialog) :is(.bb-cal-button,.bb-cal-icon-button):hover:not(:disabled){background:var(--surface-tertiary)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body :is(.bb-calendar,.bb-cal-dialog) .bb-cal-button.primary:hover:not(:disabled){background:color-mix(in oklch,var(--accent) 90%,var(--surface))!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body :is(.bb-calendar,.bb-cal-dialog) .bb-cal-button.danger{background:color-mix(in oklch,var(--danger) 12%,var(--surface))!important;color:color-mix(in oklch,var(--danger) 60%,var(--foreground))!important;border-color:color-mix(in oklch,var(--danger) 55%,var(--border))!important}
 html body :is(.bb-calendar,.bb-cal-dialog) .bb-cal-button.danger:hover:not(:disabled){background:color-mix(in oklch,var(--danger) 18%,var(--surface))!important;color:color-mix(in oklch,var(--danger) 60%,var(--foreground))!important;border-color:var(--danger)!important}
 html body .bb-calendar .bb-cal-agenda-event:hover{background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--accent)!important}
 html body :is(.bb-calendar,.bb-cal-dialog) .bb-cal-button.primary{background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body #bb-cal-fields :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),select,textarea),html body #view-calendar .bb-cal-filter select{border:1px solid color-mix(in oklch,var(--foreground) 45%,var(--field-background))!important}
 html body :is(.bb-cal-button.primary,.hd-studio-continue,.hd-qa.hd-primary){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body :is(.bb-cal-view-toggle,.bb-cal-weekdays){background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body :is(.bb-cal-view-toggle [aria-pressed="true"],.hd-studio-nav [aria-current="page"],.ops-stock-job[aria-pressed="true"]){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important;box-shadow:none}
 html body #assessmentHome .ah-tabbar a[aria-current="page"]{background:var(--accent)!important;color:var(--accent-foreground)!important}
 html body #assessmentHome .ah-tabbar a[aria-current="page"] svg{color:var(--accent-foreground)!important;background-color:var(--accent-foreground)!important}
 html body :is(.hd-studio-band p,.ah-section-head p,.bb-page-sub,.bb-breadcrumb,.bb-cat-fields dt,.bb-cat-notes p,.bb-cat-linked p,.bb-cat-stats>div>span,.ops-caption,.ops-section-head p,.ops-stock-detail,.ops-stock-planning-result p,.ops-use-item>span,.bb-cal-heading p,.ah-meta,.ah-empty){color:var(--bb-muted-ink)!important}
 html body :is(.ops-stock-card,.ops-stock-dialog) :is(h2,h3,h4,strong,label,output){color:var(--foreground)!important}
 html body :is(.ah-section-head a,.ah-retry,.hd-linkbtn,.ah-pill-booked){color:var(--bb-link-ink)!important}
 html body .ops-stock-projection{background:var(--surface-secondary)!important;color:var(--bb-muted-ink)!important;border-radius:var(--radius)}
 html body :is(.bb-cal-message.error,.bb-cal-error,.ops-stock-message.error){color:var(--danger)!important;background:color-mix(in oklch,var(--danger) 10%,var(--surface))!important}
}
@media screen{
 html body :is(#view-savedquotes,.ops-saved-search,.ops-saved-card,.ops-quote-nav button,.bb-cal-agenda-event,.bb-cal-dialog-body,.bb-cal-details){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body :is(.bb-cal-dialog-head,.bb-cal-dialog-footer){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body .bb-cal-dialog{--cal-ink:var(--foreground);--cal-muted:var(--bb-muted-ink);--cal-line:var(--border);--cal-blue:var(--bb-link-ink)}
 html body :is(.ops-quote-nav button[aria-current="page"],.bb-cal-day.selected){background:color-mix(in oklch,var(--accent) 20%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--accent)!important}
 html body .bb-cal-day.today .bb-cal-day-number{background:var(--accent);color:var(--accent-foreground)}
 html body :is(.bb-cal-agenda-time,.ops-saved-card h3,.ops-saved-card strong){color:var(--foreground)!important}
 html body .line.section .line-name{color:#eef7ff!important}
 html body .ops-saved-card :is(p,small){color:var(--bb-muted-ink)!important}
}
@media screen{
 html body :is(.bb-booking-sync,.bb-cal-sync-detail,.bb-cal-sync-conflict){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important;box-shadow:none}
 html body :is(.bb-booking-sync,.bb-cal-sync-detail,.bb-cal-sync-conflict) :is(p,strong,small,span){color:var(--surface-secondary-foreground)!important}
 html body :is(.bb-booking-sync,.bb-cal-sync-detail,.bb-cal-sync-conflict) :is(button,a){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important;border-radius:var(--button-radius)!important;min-height:44px}
 html body :is(.bb-booking-sync,.bb-cal-sync-detail,.bb-cal-sync-conflict) :is(button,a):hover:not(:disabled){background:var(--surface-tertiary)!important;color:var(--surface-tertiary-foreground)!important}
 html body :is(.bb-booking-sync[data-state="error"],.bb-booking-sync[data-state="conflict"],.bb-booking-sync[data-state="unknown"],.bb-cal-sync-conflict){background:color-mix(in oklch,var(--warning) 10%,var(--surface))!important;border-color:color-mix(in oklch,var(--warning) 50%,var(--border))!important;color:var(--foreground)!important}
 html body .bb-booking-sync[data-state="synced"]{background:color-mix(in oklch,var(--success) 10%,var(--surface))!important;border-color:color-mix(in oklch,var(--success) 50%,var(--border))!important;color:var(--foreground)!important}
 html body :is(.ops-saved-toolbar,.qtybox,.bb-orders,.bb-order-views,.assessment-card,.assessment-notes,.section-jump){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important;box-shadow:none}
 html body .ops-surface .bb-order-row{background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body :is(.bb-order-banner,.bb-order-totals,.ops-stock-planning-result,#app-notice,#cat-banner,#linked-assessment){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body #ops-inventory-cards.ops-stock-grid{background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body :is(.bb-order-row-actions button,.bb-order-filter,.iconbtn,.qbtn,.chip){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 /* Touch can retain :hover after a tap. It must never mask a saved selection. */
 @media (hover:hover) and (pointer:fine){
  html body :is(.bb-order-row-actions button,.bb-order-filter,.iconbtn,.qbtn,.chip):hover:not(:disabled):not(.sel,.on,[aria-pressed="true"]){background:var(--surface-tertiary)!important;color:var(--surface-tertiary-foreground)!important}
 }
 html body :is(.bb-order-filter[aria-pressed="true"],.chip.on,.chip.sel){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body #view-catalog [data-cattype]{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body #view-catalog [data-cattype].on{background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body .ops-surface .ops-tabs button{color:var(--default-foreground)!important;background:var(--default)!important;border-color:var(--border)!important}
 html body .ops-surface .ops-tabs button[aria-selected="true"]{background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body :is(.ops-section-head h2,.ops-section-head h3,.ops-stock-planning-result strong,.bb-orders-heading h3,.bb-order-row strong,.bb-order-banner strong,.bb-order-totals strong,.bb-cat-open,.bb-cat-open strong,.bb-cat-stats strong,.line-total,.assessment-card b,.assessment-card>div,.section-jump label){color:var(--foreground)!important}
 html body :is(.bb-orders-heading p,.bb-order-row small,.bb-order-totals span,.ops-stock-planning-result>div>span,.assessment-card small,#saved-count,#linked-assessment-note){color:var(--bb-muted-ink)!important}
 html body .assessment-card:hover{background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--accent)!important}
 html body :is(.badge.b-custom,.ah-pill-incomplete){background:color-mix(in oklch,var(--warning) 12%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--border)!important}
 html body #bb-catalog-table-wrap,html body #cat-table{background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body #cat-table :is(thead,th){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body #cat-table :is(td,tr){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important}
 html body #cat-table tr:hover td{background:var(--surface-secondary)!important}
 html body #assessment-reference,html body #qs-ref-head{background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important}
 html body #assessment-reference :is(.qs-ref-reason,.qs-ref-callout,.qs-ref-photos>summary,.qs-ref-location,.qs-ref-photo-card,.qs-ref-location-tabs){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body #assessment-reference :is(h2,h3,h4,dd,p,strong,b,summary,.qs-ref-location-tools>span){color:var(--foreground)!important}
 html body #assessment-reference :is(dt,.qs-ref-photo-intro,small){color:var(--bb-muted-ink)!important}
 html body #assessment-reference .qs-ref-pill{background:color-mix(in oklch,var(--accent) 14%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--border)!important}
 html body #assessment-reference .qs-ref-pill.warning{background:color-mix(in oklch,var(--warning) 12%,var(--surface))!important;color:var(--foreground)!important}
 html body :is(.bb-address-option,.bb-nearby-option,.bb-jc-option,.address-option):is(:hover,[aria-selected="true"]) :is(span,small){color:var(--foreground)!important}
 html body :is(.ops-metrics,.ops-metric,.ops-use-selected,.bb-cat-job-price,.bd-empty){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body :is(.ops-breakdown-nav button,.ops-job-filters button,.bb-cat-order){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important;border-radius:var(--button-radius)!important}
 html body :is(.ops-breakdown-nav button[aria-current="page"],.ops-job-filters button[aria-pressed="true"],#printbtn){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body :is(.ops-metric strong,.ops-stock-planning-result strong>span,.bb-cat-job-price h4,.bb-cat-job-price strong,.assessment-page-title h2,#shop-title,#shop-total){color:var(--foreground)!important}
 html body :is(.ops-metric>span,.ops-metric small,.ops-stock-job small,.ops-stock-job-time,.ops-stock-job-time b,.ops-stock-planning-result small,.bb-cat-job-price span,.bb-cat-job-price p,#qs-ref-context){color:var(--bb-muted-ink)!important}
 html body #qs-ref-photos>summary{background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--separator)!important}
 html body #assessment-reference :is(.qs-ref-airflow,.qs-ref-note,.qs-ref-tag,.qs-ref-location>summary){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body #assessment-reference .qs-ref-location>summary :is(span,small,strong){color:var(--foreground)!important}
 html body .assessment-location>summary{background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--separator)!important}
 html body .assessment-location>summary :is(span,small,strong){color:var(--foreground)!important}
 html body #assessment-reference .qs-ref-btn{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important;border-radius:var(--button-radius)!important}
 html body #assessment-reference .qs-ref-btn:hover{background:var(--surface-tertiary)!important;color:var(--surface-tertiary-foreground)!important}
 html body #assessment-reference .qs-ref-qty{background:var(--surface-tertiary)!important;color:var(--surface-tertiary-foreground)!important}
 html body .ops-breakdown .bd-empty b{color:var(--surface-secondary-foreground)!important}
 html body #ops-stock-use .ops-stock-job[aria-pressed="true"] :is(span,strong,small,time,b){color:var(--accent-foreground)!important}
 html body .badge-stk.stk-ok{background:color-mix(in oklch,var(--success) 15%,var(--surface))!important;color:var(--foreground)!important}
 html body #bb-cat-detail-kind{color:var(--bb-muted-ink)!important}
 html body #bb-cat-detail-close{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important;border-radius:var(--button-radius)!important}
 html body #bb-cat-detail-close:hover{background:var(--surface-tertiary)!important;color:var(--surface-tertiary-foreground)!important}
 html body.bb-assessment-app .loc-btn.active .lst{color:var(--foreground)!important}
 html body #cust.cust{--ink:#0e1f2c;--ink2:#435965;--ink-2:#435965;--ink-3:#607581;--paper:#fff;--card:#fff;--muted:#607581;--line:#e0e8ef;--line2:#edf3f6;--blue:#30b8e8;--blue-ink:#0e7ba0;--blue-d:#0e7ba0;--blue-wash:#e3f4fb;--orange:#fb8c24;--orange-d:#b96314;background:#fff!important;color:#0e1f2c!important}
 html body #cust :is(.cust-hd,.qt .secrow td){background:#0e1f2c!important;color:#fff!important}
 html body #cust .cust-hd :is(.co,.meta){color:#fff!important}
 html body #cust .cust-body{background:#fff!important;color:#0e1f2c!important}
 html body #cust .cust-foot{background:#f7f9fa!important;color:#435965!important}
}
/* Customer copies retain their existing light print palette regardless of app theme. */
@media print{
 :root,.dark,[data-theme="dark"]{--body:'Varela Round',system-ui,sans-serif;--display:var(--body);--bb-body:var(--body);--bb-display:var(--body);--paper:#fff;--card:#fff;--ink:#0e1f2c;--ink2:#435965;--ink-2:#435965;--ink-3:#607581;--line:#e0e8ef;--line2:#edf3f6;--muted:#607581;--blue:#30b8e8;--blue-ink:#0e7ba0;--blue-d:#0e7ba0;--blue-wash:#e3f4fb;--orange:#fb8c24;--green:#237a4f;--green-l:#eaf6ef;--red:#b53d2a;--amber:#8a5b00}
 .bb-save-feedback,.bb-save-error,.bb-save-mark,.assessment-action-notice{display:none!important}
}
@media screen{
 html body .hd-cta.hd-primary{background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body .hd-cta.hd-second{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body #hd-notifications{--ink:var(--foreground);--ink-soft:var(--bb-muted-ink);--ink-muted:var(--bb-muted-ink);--rule:var(--separator);--card:var(--overlay);background:var(--overlay)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important}
 html body .hd-ticket-stub::before{content:none;display:none}
}
@media screen{
 html body :is(button,a,input,select,textarea,summary,[role="button"]):focus-visible:not(:disabled):not([aria-disabled="true"]){outline:3px solid var(--focus)!important;outline-offset:3px;box-shadow:0 0 0 1px var(--foreground)!important}
}
@media screen{
 html body :is(.bb-jobber-body,.bb-jobber-preview,.bb-tool-body,.bb-order-body,.bb-inventory-body){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important}
 html body :is(.bb-jobber-footer,.bb-tool-footer,.bb-order-footer,.bb-tool-header,.bb-order-header){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body :is(.bb-jobber-line,.bb-jobber-account,.bb-jobber-preview) :is(strong,h3,h4){color:var(--foreground)!important}
 html body :is(.bb-jobber-line,.bb-jobber-account,.bb-jobber-preview) :is(p,small,span){color:var(--bb-muted-ink)!important}
}
@media screen{
 html body .bb-tools{background:var(--overlay)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important;font-family:var(--font-sans)!important;box-shadow:none}
 html body :is(.bb-tools-head,.bb-tools-footer){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body :is(.bb-tools-body,.bb-order-receive-line,.bb-order-document,.bb-map-preview-row,.bb-scan-result){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important}
 html body :is(.bb-tools,.bb-jobber-body,.bb-jobber-total) :is(h2,h3,strong,label){color:var(--foreground)!important}
 html body .bb-tools :is(p,small){color:var(--bb-muted-ink)!important}
 html body .bb-tools .bb-tool-button.primary{background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body #hd-notifications{--link:var(--bb-link-ink)}
 html body #hd-close-notifications{background:var(--default)!important;color:var(--default-foreground)!important}
}
@media screen{
 html body .bb-cal-dialog-head :is(p,small,span){color:var(--bb-muted-ink)!important}
 html body .bb-cal-dialog-head h2{color:var(--foreground)!important}
 html body .bb-cal-dialog-head>button{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body :is(.modal,.modal-hd,.modal-body,.modal-foot,.invstats,.statcard,.ops-stock-list,.cat-controls){border-radius:var(--radius)!important;background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--border)!important;box-shadow:none}
 html body :is(.modal-hd,.modal-foot){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important}
 html body .modal :is(h2,h3,h4,strong,label){color:var(--foreground)!important}
 html body .modal :is(p,small,.cfield>label){color:var(--bb-muted-ink)!important}
 html body .modal .closex{background:var(--default)!important;color:var(--default-foreground)!important}
 html body :is(.cat-controls .search,.ops-saved-search,.modal-search){background:var(--field-background)!important;color:var(--field-foreground)!important;border-color:var(--field-border)!important;border-radius:var(--field-radius)!important}
 html body :is(.ops-stock-open,.ops-stock-row-count,.statcard .n){color:var(--foreground)!important}
 html body .ops-stock-open:is(:hover,:focus-visible){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important}
 html body .ops-stock-open:is(:hover,:focus-visible) :is(.ops-stock-row-name,.ops-stock-row-count){color:var(--surface-secondary-foreground)!important}
 html body :is(.ops-stock-row-count small,.statcard .l){color:var(--bb-muted-ink)!important}
}
@media screen{
 body :is(p,small,label,span,th,td,dt,dd,strong,output),.eyebrow,.brand,.bd-row .h{font-family:var(--font-sans)!important}
 html body .bb-theme-toggle{display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;background:var(--default)!important;color:var(--default-foreground)!important;border:1px solid var(--border);font:inherit;cursor:pointer}
 .bb-theme-toggle svg{width:20px;height:20px;flex:none}.bb-theme-toggle .bb-theme-state{margin-left:auto;font-size:12px}
 html body .bb-theme-toggle[aria-pressed="true"]{background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)}
 .bb-theme-account{display:flex;justify-content:flex-end;margin-bottom:16px}
 .bb-appearance-settings .bb-theme-toggle{width:100%;max-width:360px}
 html body #view-builder .ctl label{color:var(--bb-muted-ink)!important}
 html body #view-builder .toggle{color:var(--bb-muted-ink)!important}
 html body #view-builder .linkedit{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body #assessmentMenu button:not([data-bb-theme-toggle]){background:var(--surface)!important;color:var(--foreground)!important;border-color:var(--border)!important}
 html body #assessmentMenu .bb-menu-account>summary{background:var(--surface)!important;color:var(--foreground)!important}
 html body .bb-menu-account>.bb-session{background:var(--surface)!important;color:var(--foreground)!important;border-color:var(--separator)!important}
 html body .bb-session .bb-session-identity strong{color:var(--foreground)!important}
 html body .bb-session-identity>span:first-child,html body .bb-session #bb-sync{color:var(--bb-muted-ink)!important}
 html body :is(.bb-session-actions>a,.bb-session-actions>button,.bb-session-links>a){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body .bb-session .bb-session-links>a{color:var(--default-foreground)!important}
 html body .bb-session-actions>#bb-signout{color:color-mix(in oklch,var(--danger) 60%,var(--foreground))!important}
 html body .bb-cal-details dd{color:var(--foreground)!important}
 html body .bb-cal-details dt{color:var(--bb-muted-ink)!important}
 html body #app-menu-toggle{min-width:44px!important;min-height:44px!important}
 html body :is(.bb-address-predictions,.bb-nearby-addresses,.bb-jc-panel){background:var(--overlay)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important;box-shadow:none}
 html body :is(.bb-address-option,.bb-nearby-option,.bb-jc-option,.address-option,.bb-address-match-choice){background:var(--surface)!important;color:var(--foreground)!important;border-color:var(--separator)!important}
 html body :is(.bb-address-option,.bb-nearby-option,.bb-jc-option,.address-option,.bb-address-match-choice):is(:hover,[aria-selected="true"]){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body :is(.bb-address-option,.bb-nearby-option,.bb-jc-option,.address-option) strong{color:var(--foreground)!important}
 html body :is(.bb-address-option,.bb-nearby-option,.bb-jc-option,.address-option) :is(span,small){color:var(--bb-muted-ink)!important}
 html body :is(.bb-address-search-status,.bb-location-status,.bb-address-match-status,.bb-jc-hint,.bb-jc-team,.bb-jc-team-status){color:var(--bb-muted-ink)!important}
 html body :is(.bb-address-search-status,.bb-location-status,.bb-address-match-status).error{color:color-mix(in oklch,var(--danger) 60%,var(--foreground))!important}
 html body :is(.bb-nearby-heading,.bb-nearby-note,.bb-address-attribution,.address-attribution){background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--separator)!important}
 html body .bb-nearby-heading strong{color:var(--foreground)!important}
 html body :is(.bb-location-button,.bb-address-dismiss){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important;min-height:44px}
 html body .bb-jc-property{color:var(--bb-link-ink)!important}
 html body :is(.address-helper span,.address-privacy){color:var(--bb-muted-ink)!important}
 html body .address-helper span.error{color:color-mix(in oklch,var(--danger) 60%,var(--foreground))!important}
 html body .address-helper button{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important;min-height:44px}
 html body :is(.bb-address-attribution span,.gmp-attribution){font-family:Roboto,Arial,sans-serif!important;color:var(--bb-muted-ink)!important}
}
/* Assessment panels also contain legacy inline styles and dynamically rendered tools. */
@media screen{
 body.bb-assessment-app{
  --white:var(--surface);--bg:var(--surface-secondary);--dark:var(--foreground);--mid:var(--bb-muted-ink);--gray:var(--bb-muted-ink);
  --blue-l:color-mix(in oklch,var(--accent) 14%,var(--surface));--orange-l:color-mix(in oklch,var(--accent) 14%,var(--surface));
  --red-l:color-mix(in oklch,var(--danger) 12%,var(--surface));--yellow-l:color-mix(in oklch,var(--warning) 12%,var(--surface));--green-l:color-mix(in oklch,var(--success) 12%,var(--surface));
 }
 html body.bb-assessment-app :is(.parts-sec,.parts-body,.parts-tab-panel,.sub-sec,.photo-card,.photo-item,.pitch-finder,.util-draw-card,.util-draw-body,.stud-history,.assessment-draft-tools,.assessment-utilities,.utility-measurements,.utility-annotation){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important;box-shadow:none}
 html body.bb-assessment-app :is(.parts-header,.parts-tabs,.photo-card-header,.util-draw-header,.pitch-finder-hdr,.panel-collapse-footer,.utility-annotation>summary,.assessment-draft-tools>summary){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body.bb-assessment-app .utility-annotation{border:1px solid var(--separator);overflow:hidden}
 html body.bb-assessment-app .utility-annotation>summary{min-height:44px;padding:10px 12px;line-height:1.5;cursor:pointer}
 html body.bb-assessment-app :is(.parts-header-title,.parts-header-caret,.parts-header-ico,.part-lbl,.parts-header>span,.util-draw-title,.pitch-finder-hdr>span,.loc-notes-title,.stud-other-label,.utility-presence label,.utility-measurements label,.utility-annotation>summary){color:var(--foreground)!important}
 html body.bb-assessment-app :is(.parts-header,.utility-annotation>summary,.assessment-draft-tools>summary):hover{background:var(--surface-tertiary)!important}
 html body.bb-assessment-app .parts-tab{background:var(--segment)!important;color:var(--segment-foreground)!important;border-color:var(--separator)!important}
 html body.bb-assessment-app .parts-tab.active{background:var(--accent)!important;color:var(--accent-foreground)!important;border-bottom-color:var(--accent)!important}
 html body.bb-assessment-app .parts-tab:not(.active):hover{background:var(--default)!important;color:var(--default-foreground)!important}
 html body.bb-assessment-app .part-row{background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body.bb-assessment-app .part-row:is(:hover,.sel){background:color-mix(in oklch,var(--accent) 14%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--accent)!important}
 html body.bb-assessment-app .part-row .part-lbl{color:var(--foreground)!important}
 html body.bb-assessment-app :is(.part-qty,.part-other-inp){background:var(--field-background)!important;color:var(--field-foreground)!important;border-color:var(--field-border)!important}
 html body.bb-assessment-app #panels :is(.part-qty,.utility-measurements input[type="number"]){min-height:44px;border:1px solid color-mix(in oklch,var(--foreground) 45%,var(--field-background))!important}
 html body.bb-assessment-app :is(.chip,.tech-chip,.reason-chip,.reason-sub-chip,.loc-notes-chip,.d-btn,.stud-spacing-option){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body.bb-assessment-app :is(.chip,.tech-chip,.reason-chip,.reason-sub-chip,.loc-notes-chip,.d-btn,.stud-spacing-option).sel,
 html body.bb-assessment-app .native-choice:has(input:checked)>:is(.chip,.tech-chip,.reason-chip,.reason-sub-chip){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body.bb-assessment-app :is(.reason-group-hdr,.reason-group-body,.loc-notes-section,.progress-card,.pitch-readout,.airflow-card,.af-result,.assessment-draft-tools-body){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body.bb-assessment-app :is(.reason-group-label,.reason-group-hdr,.reason-group-body,.loc-notes-section,.progress-card,.pitch-readout,.airflow-card,.af-result) :is(strong,b,label,output){color:var(--foreground)!important}
 html body.bb-assessment-app :is(.util-draw-hint,.util-legend,.pitch-hint,.pitch-hint-flip,.pitch-label,.stud-hint,.stud-history,.loc-notes-hint,.loc-notes-sublbl,.af-title,.af-unit,.af-desc,.af-result p,.runtime-strip,.assessment-draft-hint,.foot-stat,.fr-lbl,.unit-lbl,.assessment-utilities p){color:var(--bb-muted-ink)!important}
 html body.bb-assessment-app .pitch-hint{opacity:1}
 html body.bb-assessment-app :is(.pitch-secondary>[id^="pfCat-"],.af-pct){color:var(--foreground)!important}
 html body.bb-assessment-app .pitch-finder [id^="pfInstruct-"] strong{color:var(--bb-link-ink)!important}
 html body.bb-assessment-app :is(.diff-tag,.diff-badge,.req-tag,.done-tag,.saved-tag,.info-badge,.warn-badge,.req-notice,.runtime-issue){background:var(--surface-tertiary)!important;color:var(--foreground)!important;border-color:var(--border)!important}
 html body.bb-assessment-app :is(.photo-zone,.photo-drop,.wa-upload-zone){background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--border)!important}
 html body.bb-assessment-app :is(.photo-zone,.photo-drop,.wa-upload-zone) :is(strong,b,span,p){color:var(--foreground)!important}
 html body.bb-assessment-app :is(.ph-close,.ph-collapse,.panel-collapse-footer button,.util-draw-clear,.pitch-flip-btn,.photo-overlay-btn,.photo-markup-btn,.photo-del-btn,.chg-lnk,.runtime-strip button,.runtime-issue button){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body.bb-assessment-app :is(.save-loc-btn,.pitch-save-btn){background:var(--success)!important;color:var(--success-foreground)!important;border-color:var(--success)!important}
 html body.bb-assessment-app :is(.photo-btn-cam,.photo-btn-gal,.pf-upload-btn,.pitch-cat.active,.pitch-flip-btn.active,.reason-group-badge,.photo-loc-tag){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body.bb-assessment-app .pvt-btn{background:var(--segment)!important;color:var(--segment-foreground)!important;border-color:var(--separator)!important}
 html body.bb-assessment-app .pvt-btn.active{background:var(--accent)!important;color:var(--accent-foreground)!important}
 /* Reuse semantic surfaces around images; photo pixels and annotation color swatches retain their colors. */
 html body.bb-assessment-app :is(.wall-annotator,.wa-options,.wa-object-list,.wa-visibility-options,.wa-scale-options,.wa-shape-controls,.wa-scale-body,.wa-mode-hint,.wa-selection-bar){background:var(--surface)!important;color:var(--surface-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important;box-shadow:none}
 html body.bb-assessment-app :is(.wa-layer-bar,.wa-stamp-bar,.wa-ctrl-bar,.wa-legend-bar,.wa-vis-bar,.wa-edit-actions,.wa-utility-tools,.wa-options-heading,.markup-topbar,.markup-toolbar){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body.bb-assessment-app :is(.wa-fs-topbar,.wa-tool-dock){background:color-mix(in oklch,var(--overlay) 94%,transparent)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;box-shadow:none}
 html body.bb-assessment-app :is(.wa-layer-lbl,.wa-leg,.wa-scale-options summary span,.wa-shape-controls p,.wa-object-list p,.wa-mode-hint){color:var(--bb-muted-ink)!important}
 html body.bb-assessment-app :is(.wa-scale-options summary,.wa-scale-body,.wa-shape-controls,.wa-options-heading,.wa-selection-bar) :is(strong,b,label,output,span){color:var(--foreground)!important}
 html body.bb-assessment-app :is(.wa-size-label,.wa-label-size,.wa-vis-chk,.wa-options-heading>strong,.markup-title){color:var(--foreground)!important}
 html body.bb-assessment-app :is(.wa-layer-btn,.wa-stamp-btn,.wa-ctrl-btn,.wa-object-row button,.wa-shape-controls button,.wa-remove-item,.wa-options-heading button,.wa-preview-edit,.tool-btn,.markup-cancel,.markup-undo){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body.bb-assessment-app :is(.wa-layer-btn.active,.wa-stamp-btn.sel,.wa-ctrl-btn.active,.wa-object-select[aria-pressed="true"],.wa-ctrl-btn.primary,.tool-btn.active,.markup-done){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body.bb-assessment-app :is(.wa-ctrl-btn.warn,.wa-remove-item){background:color-mix(in oklch,var(--danger) 14%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--danger)!important}
 html body.bb-assessment-app .wa-scale-options summary{color:var(--foreground)!important}
 html body.bb-assessment-app :is(.email-panel,.send-sheet,.summary-top,.summary-meta,.summary-help,.email-body,.send-body){background:var(--overlay)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important}
 html body.bb-assessment-app :is(.email-panel header,.email-panel footer,.send-head,.send-actions,.summary-actions,.email-preview,.office-email-status,.email-caution){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important}
 html body.bb-assessment-app :is(.email-panel,.send-sheet,.summary-top,.summary-meta,.summary-help) :is(h1,h2,h3,strong,b,label){color:var(--foreground)!important}
 html body.bb-assessment-app :is(.email-intro,.email-hint,.email-panel header p,.summary-help p,.send-progress){color:var(--bb-muted-ink)!important}
 html body.bb-assessment-app :is(.email-office,.email-cancel,.email-panel header button,.office-email-status button,.send-head button,.send-actions button:not(.primary)){background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body.bb-assessment-app :is(.email-send,.send-actions .primary){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body.bb-assessment-app :is(#quickPhotoModal,#saveLocModal,#backupModal)>div{background:var(--overlay)!important;color:var(--overlay-foreground)!important;border-color:var(--border)!important;border-radius:var(--radius)!important}
 html body.bb-assessment-app :is(#quickPhotoModal,#saveLocModal,#backupModal)>div>div:first-child{background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important}
 html body.bb-assessment-app :is(#quickPhotoModal,#saveLocModal,#backupModal) :is(span,p,strong,li,label){color:var(--foreground)!important}
 html body.bb-assessment-app :is(#quickPhotoModal,#saveLocModal,#backupModal) button{background:var(--default)!important;color:var(--default-foreground)!important;border-color:var(--border)!important}
 html body.bb-assessment-app :is(#qpSaveButton,[onclick^="backupSession"],#saveLocModal [onclick*="later"]){background:var(--accent)!important;color:var(--accent-foreground)!important;border-color:var(--accent)!important}
 html body.bb-assessment-app .main>div:has(>#af-global),html body.bb-assessment-app .main>div:has(>div>#af-global){background:var(--surface-secondary)!important;color:var(--surface-secondary-foreground)!important;border-color:var(--separator)!important;border-radius:var(--radius)!important}
 html body.bb-assessment-app .main>div:has(>div>#af-global) :is(div,span){color:var(--bb-muted-ink)!important}
 html body.bb-assessment-app .af-classify{background:var(--surface-tertiary)!important;color:var(--foreground)!important}
}
/* An important layer lets this one button rule override the older panel selectors. */
@layer bb-button-corners{
 @media screen{body :is(button,[role="button"],.bb-primary,.bb-secondary,.bb-backup,.ah-btn,.ops-button,.bb-nav-link,.hd-ticket-button,.supply-button,.bb-session-actions>a,.bb-session-links>a){border-radius:var(--button-radius)!important}}
}
@media print{.bb-theme-toggle,.bb-theme-account,.bb-appearance-settings{display:none!important}}

@media print{
 :root,:root.dark,:root[data-theme="dark"]{
  color-scheme:light;
  --accent: oklch(76.48% 0.0948 225.87);
  --accent-foreground: oklch(15% 0.0190 225.87);
  --background: oklch(97.02% 0.0000 225.87);
  --border: oklch(90.00% 0.0000 225.87);
  --danger: oklch(65.32% 0.2328 22.38);
  --danger-foreground: oklch(99.11% 0 0);
  --default: oklch(94.00% 0.0000 225.87);
  --default-foreground: oklch(21.03% 0.0059 225.87);
  --field-background: oklch(100.00% 0.0000 225.87);
  --field-border: transparent;
  --field-foreground: oklch(21.03% 0.0000 225.87);
  --field-placeholder: oklch(55.17% 0.0000 225.87);
  --focus: oklch(76.48% 0.0948 225.87);
  --foreground: oklch(21.03% 0.0000 225.87);
  --muted: oklch(55.17% 0.0000 225.87);
  --overlay: oklch(100.00% 0.0000 225.87);
  --overlay-foreground: oklch(21.03% 0.0000 225.87);
  --scrollbar: oklch(87.10% 0.0000 225.87);
  --segment: oklch(100.00% 0.0000 225.87);
  --segment-foreground: oklch(21.03% 0.0000 225.87);
  --separator: oklch(92.00% 0.0000 225.87);
  --success: oklch(73.29% 0.1935 147.45);
  --success-foreground: oklch(21.03% 0.0059 147.45);
  --surface: oklch(100.00% 0.0000 225.87);
  --surface-foreground: oklch(21.03% 0.0000 225.87);
  --surface-secondary: oklch(95.24% 0.0000 225.87);
  --surface-secondary-foreground: oklch(21.03% 0.0000 225.87);
  --surface-tertiary: oklch(93.73% 0.0000 225.87);
  --surface-tertiary-foreground: oklch(21.03% 0.0000 225.87);
  --warning: oklch(78.19% 0.1585 68.97);
  --warning-foreground: oklch(21.03% 0.0059 68.97);
  --radius: 0.125rem;
  --field-radius: 0.25rem;
  --button-radius: 0.25rem;
  --font-sans: var(--font-varela-round);
 }
}

/* Readable type and deliberate component hierarchy in both themes. */
@media screen{
 html body{font-size:16px;line-height:1.5}
 html body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea){font-size:16px!important;line-height:1.4;min-height:44px}
 html body :is(.bb-primary,.bb-secondary,.bb-backup,.addbtn,.abtn,.qbtn,.chip,.ah-btn,.ops-button,.bb-cat-action,.bb-cal-button,.bb-tool-button,.bb-order-button,.bb-jobber-button,.hd-ticket-button,.btn-pri,.btn-ghost){font-size:15px!important;line-height:1.35}
 html body :is(.bb-page-sub,.ah-hero p,.ops-hero p,.hd-studio-band p,.bb-cal-heading p,.hd-ticket-address,.hd-ticket-note){font-size:16px!important;line-height:1.55}
 html body :is(.field label,.ctl label,.inf label,.fr>label,.fr-lbl,.sec-lbl,.bb-cat-fields dt,.bb-cat-stats>div>span,.bb-cat-dialog-head>span,.ops-kicker,.bd-sec-hd>span){font-size:13px!important;line-height:1.45;letter-spacing:.025em}
 html body :is(.sh,.reason-group summary,.reason-group-hdr,.tech-chip,.d-btn,.native-choice,.part-row,.pc-name,.parts-tabs button,.loc-btn .lnm){font-size:15px!important;line-height:1.4}
 html body :is(.bb-cat-fields dd,.bb-cat-notes p,.bb-cat-linked p,.bb-cat-linked li,.bb-cat-kit-picker p,.ops-caption,.ops-section-head p,.ops-stock-detail,.ops-stock-planning-result p,.ops-stock-projection,.ah-meta,.ah-empty,.ah-record-content span,.ah-booking-time,.hd-d,.hd-date,.hd-studio-sub,.bb-cal-detail-note,.bb-cal-dialog #bb-cal-detail-note){font-size:14px!important;line-height:1.5}
 html body :is(.ah-record-content strong,.ops-stock-name,.bb-cat-row h3,.ops-saved-card h3){font-size:16px!important;line-height:1.4}
 html body #view-builder .labor-compact-name>span{font-size:15px!important}
 html body #view-builder :is(.labor-compact-name>small,.labor-compact-qty,.labor-options-meta>small){font-size:13px!important;line-height:1.4}
 html body :is(.line-name,.bd-row .l,.bb-cat-stats>div>strong){font-size:15px!important}
 html body :is(.hdr-s,.topbar .brand small){font-size:12.5px!important;letter-spacing:0!important;text-transform:none!important}
 html body :is(.bb-bottom-nav .bb-nav-link,.ah-tabbar a){font-size:12px!important;line-height:1.3}
 html body :is(.bb-breadcrumb,.bb-breadcrumb button,.bb-cal-weekdays,.bb-cal-detail-grid dt,.bb-cal-dialog-head>span){font-size:13px!important}
 html body :is(.bb-cal-detail-grid dd,.bb-cal-form label,.bb-cal-field-label){font-size:16px!important}
 html body :is(.bb-page-head h1,.ah-hero h1){font-size:clamp(30px,4vw,38px)!important;line-height:1.18}
 html body :is(.panel-hd h2,.bb-cal-dialog-head h2,.bb-cat-dialog-head h3){font-size:clamp(23px,3vw,29px)!important;line-height:1.25}
 html body :is(.bid-buddy-name,.hdr-t){color:var(--bb-link-ink)!important}
 html body :is(.bid-buddy-name>span,.hdr-t>span){color:var(--bb-orange)!important}
 html body :is(.topbar,.hdr){border-bottom:1px solid var(--border)!important}
 html body .hd-band{background:radial-gradient(ellipse at 85% 5%,#39d8ff20,transparent 60%),linear-gradient(115deg,var(--bb-hero),var(--bb-hero-top))!important}
 html body .hd-band h1{color:#eef7ff!important}
 html body .hd-main{background:transparent!important}
 html body :is(.hd-ticket,.hd-ticket-top,.hd-ticket-stub,.hd-plain){background:var(--bb-hero)!important;border:1px solid #2a5370!important;color:#eef7ff!important}
 html body .hd-ticket-stub{border-top:0!important}
 html body .hd-ticket{overflow:hidden}
 html body :is(.hd-ticket-name,.hd-ticket-time,.hd-ticket-when,.hd-ticket-stub,.hd-plain h2){color:#eef7ff!important}
 html body :is(.hd-ticket-note,.hd-ticket-address,.hd-ticket-then,.hd-ticket-count){color:#bbd9ea!important}
 html body :is(.hd-studio-band){border:1px solid var(--border)!important}
 html body .hd-studio-band{border-left:0!important;border-right:0!important}
 html body :is(.hd-studio-current,.hd-panel,.bb-calendar,.panel,.bb-cat-dialog,.bb-cal-dialog,.ops-stock-dialog){box-shadow:var(--shadow)!important}
 html body :is(.ph,.reason-group-hdr,.assessment-location>summary){background:var(--surface-secondary)!important;border-color:var(--border)!important;color:var(--foreground)!important}
 html body :is(.mobile-menu-inner,.qs-navigation){border-left:1px solid var(--border)!important}
 html body :is(.mobile-menu-inner a,.topbar .qs-navigation .tab,.topbar .app-menu-secondary a){color:var(--bb-link-ink)!important}
 html body :is(.mobile-menu-inner a:hover,.topbar .qs-navigation .tab:hover,.topbar .app-menu-secondary a:hover){background:linear-gradient(110deg,color-mix(in oklch,var(--accent) 16%,var(--surface)),color-mix(in oklch,var(--bb-orange) 14%,var(--surface)))!important}
 html body .topbar .qs-navigation .tab.active{color:var(--bb-orange)!important;background:color-mix(in oklch,var(--bb-orange) 12%,var(--surface))!important}
 html body :is([data-bb-new-assessment],#assessmentHomeNew,#assessmentMenu button[onclick*="newDraft"],[data-cal-dialog-action="start-assessment"],[data-cal-action="new"],[data-cal-agenda-book]){
  background:var(--bb-orange)!important;border:1px solid var(--bb-filled-border)!important;color:var(--bb-orange-foreground)!important;
  box-shadow:inset 0 1px 0 #ffffff40,0 5px 18px #9e5e2c12!important;font-size:15.5px!important;font-weight:700!important;
 }
 html body :is([data-bb-new-assessment],#assessmentHomeNew,#assessmentMenu button[onclick*="newDraft"],[data-cal-dialog-action="start-assessment"],[data-cal-action="new"],[data-cal-agenda-book]):hover:not(:disabled){background:var(--bb-orange-hover)!important;filter:none!important}
 html body :is([data-bb-new-assessment],#assessmentHomeNew,[data-cal-dialog-action="start-assessment"]):active:not(:disabled){box-shadow:inset 0 2px 5px #4a1e0030!important;translate:0 1px}
 html body :is(.hd-cta.hd-primary,.hd-qa.hd-primary){background:var(--accent)!important;color:var(--accent-foreground)!important;border:1px solid var(--accent)!important;box-shadow:0 5px 18px #39d8ff16!important}
 html body :is(.bb-cal-dialog-head,.bb-cat-dialog-head,.bb-jobber-head){border-top:2px solid var(--accent)!important}
 html[data-theme="dark"] body{--shadow:var(--bb-card-shadow);background:radial-gradient(ellipse at 100% 0%,#0b31472a,transparent 40%),var(--background)!important}
 html[data-theme="dark"] body :is(.bb-bottom-nav,.ah-tabbar,.foot){background:#081a2d!important;border-color:#274963!important}
 html[data-theme="dark"] body :is(.bb-desktop-links .bb-nav-link.active,.bb-bottom-nav .bb-nav-link.active,.ah-tabbar a[aria-current="page"]){background:color-mix(in oklch,var(--accent) 17%,var(--surface))!important;color:var(--accent)!important;box-shadow:inset 0 2px var(--accent)!important}
 html[data-theme="dark"] body :is(.bb-bottom-nav .bb-nav-link.active svg,.ah-tabbar a[aria-current="page"] svg){color:var(--accent)!important;background-color:currentColor!important}
 html[data-theme="dark"] body :is(.photo-zone,.photo-zone.empty,.wa-upload,.pf-upload,.af-global,.sub-sec,.reason-card,.reason-group,.parts-tabs,.progress-card,.bb-settings-card,.bb-tools-card,.bb-account,.bb-cat-row,.ops-stock-row,.hd-quote-row,.hd-studio-row){background:var(--surface)!important;color:var(--foreground)!important;border-color:var(--border)!important}
 html[data-theme="dark"] body :is(.parts-tabs button,.photo-zone p,.wa-upload p,.pf-upload p,.assessment-draft-tools-body p,.runtime-strip,.share-subtitle,.bb-jc-status,.bb-address-status,.loc-btn .lst){color:var(--muted)!important}
 html[data-theme="dark"] body :is(.parts-tabs button.active,.tech-chip.sel,.d-btn.active,.d-btn.sel){background:color-mix(in oklch,var(--accent) 16%,var(--surface))!important;color:var(--accent)!important;border-color:var(--accent)!important}
 html[data-theme="dark"] body :is(.hd-studio-nav a,.hd-studio-nav button,.bb-workflow button:not(.active),.hd-quick button){color:var(--muted)!important}
 html[data-theme="dark"] body :is(.bb-cal-toolbar,.bb-cal-empty,.bd-empty,.ah-quick,.hd-studio-nav){background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--border)!important}
 html[data-theme="dark"] body :is(.bb-cal-empty h3,.bb-cal-empty b,.bb-cal-empty p,.bd-empty b,.hd-v,.hd-l,.hd-studio-current h2,.hd-studio-current strong){color:var(--foreground)!important}
 html[data-theme="dark"] body :is(.ah-quick span,.ah-quick svg,.hd-linkbtn,.hdr-btn){color:var(--accent)!important}
 html[data-theme="dark"] body :is(.bb-cal-view-toggle [aria-pressed="true"],.bb-workflow button.active,.ops-tabs button[aria-selected="true"]){background:color-mix(in oklch,var(--accent) 18%,var(--surface))!important;color:var(--accent)!important;border-color:var(--accent)!important}
 html[data-theme="dark"] body :is(.bb-cat-action.danger,.bb-tool-button.danger,.bb-order-button.danger,.bb-cal-button.danger){color:var(--danger)!important}
 html[data-theme="dark"] :focus-visible{outline:2px solid var(--focus)!important;box-shadow:0 0 0 4px #39d8ff20!important}
 @media(max-width:600px){
  html body .hd-cta{font-size:16px!important;min-height:60px}
  html body .hd-sync{font-size:12.5px}
  html body .foot :is(button,a){font-size:14px!important;line-height:1.3}
  html body .ah-quick b{font-size:14px!important}
  html body .ah-booking-slot small{font-size:12px!important}
  html body .ah-upcoming-row{grid-template-columns:82px minmax(0,1fr) auto}
 }
}

@media screen{
 html body :is(.bb-bottom-nav .bb-nav-link.active svg,#assessmentHome .ah-tabbar a[aria-current="page"] svg){background-color:currentColor!important;color:var(--bb-link-ink)!important}
 html body :is(.bb-bottom-nav .bb-nav-link.active::before,#assessmentHome .ah-tabbar a[aria-current="page"]::before){background:var(--blue-wash)!important}
 html body :is(.bb-bottom-nav .bb-nav-link svg,#assessmentHome .ah-tabbar a svg){width:22px!important;height:22px!important}
 html[data-theme="dark"] body :is(.bb-bottom-nav .bb-nav-link.active svg,#assessmentHome .ah-tabbar a[aria-current="page"] svg){color:var(--accent)!important;background-color:currentColor!important}
}

/* Final legacy adapters: breakdowns, expanded controls and field metadata. */
@media screen{
 html body :is(#view-labor,#view-materials) .bd-sec-hd{background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--separator)!important}
 html body :is(#view-labor,#view-materials) .bd-sec-hd .st{color:var(--bb-link-ink)!important}
 html body :is(#view-labor,#view-materials) :is(.bd-row .nm small,.bd-row [data-label]::before,.ops-metric>span,.ops-metric small){color:var(--muted)!important;font-size:13px!important;line-height:1.45}
 html body #view-builder :is(.line-total,.ef-meta){font-size:14px!important;line-height:1.45}
 html body :is(.ops-stock-open,.parts-header-title,.parts-tab){font-size:15px!important;line-height:1.4}
 html body :is(.unit-lbl,.ops-stock-id,.ops-stock-planning-off,.ops-stock-planning-off small,.bb-cat-price-panel>div>span,.bb-cat-price-panel label){font-size:13px!important;line-height:1.5;color:var(--muted)!important}
 html body #view-catalog.ops-surface :is(.bb-cat-open small,.bb-cat-work,.bb-cat-row-footer>span,.ops-catalog-caption){font-size:13px!important;line-height:1.5;color:var(--muted)!important}
 html body :is([data-bb-new-assessment],#assessmentHomeNew,[data-cal-dialog-action="start-assessment"],[data-cal-action="new"],[data-cal-agenda-book]) svg{color:var(--bb-orange-foreground)!important}
 html[data-theme="dark"] body #view-builder :is(.qtybox,.qtybox input){background:var(--field-background)!important;border-color:var(--field-border)!important;color:var(--foreground)!important}
 html[data-theme="dark"] body #view-builder .qtybox button{background:var(--surface-secondary)!important;color:var(--accent)!important}
 html[data-theme="dark"] body #view-builder .qtybox button:hover{background:var(--surface-tertiary)!important}
 html[data-theme="dark"] body #view-inventory .ops-stock-row :is([data-stock-minus],[data-stock-plus]){background:var(--surface-secondary)!important;border-color:var(--field-border)!important;color:var(--accent)!important}
 html[data-theme="dark"] body #view-inventory .ops-stock-row :is([data-stock-minus],[data-stock-plus]):hover:not(:disabled){background:var(--surface-tertiary)!important;border-color:var(--accent)!important}
 html[data-theme="dark"] body #view-builder .linkbtn{background:color-mix(in oklch,var(--accent) 13%,var(--surface))!important;color:var(--accent)!important;border-color:var(--field-border)!important}
 html[data-theme="dark"] body #view-builder .linkbtn:is(.on,:hover){background:var(--surface-tertiary)!important;border-color:var(--accent)!important}
 html[data-theme="dark"] body #assessmentHome .ah-tabbar a[aria-current="page"]{background:color-mix(in oklch,var(--accent) 17%,var(--surface))!important;color:var(--accent)!important;box-shadow:inset 0 2px var(--accent)!important}
 @media(min-width:361px) and (max-width:680px){
  html body .ops-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body .ops-metric{padding:15px!important}
  html body .ops-metric:nth-child(2){border-right:0!important}
  html body .ops-metric:last-child{grid-column:1/-1;border-top:1px solid var(--separator)!important}
  html body .ops-metric strong{font-size:28px!important;line-height:1.15;overflow-wrap:normal}
 }
}

/* Rich brand surfaces keep the working controls and navigation compact. */
@media screen{
 html body :is(.topbar,.hdr){
  background:linear-gradient(110deg,color-mix(in srgb,var(--bb-shell) 90%,transparent),color-mix(in srgb,var(--bb-shell-top) 74%,transparent)),url('/brand-blueprint.webp') right 48%/cover,var(--bb-shell)!important;
  color:var(--bb-brand-foreground)!important;border-bottom:1px solid #52bee334!important;border-radius:0!important;
  box-shadow:0 4px 18px #031a2a18!important;
 }
 html body :is(.topbar .bid-buddy-name,.hdr .hdr-t){color:var(--bb-brand-blue)!important}
 html body :is(.topbar .bid-buddy-name>span,.hdr .hdr-t>span){color:var(--bb-orange)!important}
 html body :is(.topbar .brand small,.hdr .hdr-s){color:var(--bb-brand-muted)!important}
 html body :is(.topbar .bb-desktop-links .bb-nav-link,.hdr .bb-desktop-links .bb-nav-link){color:var(--bb-brand-muted)!important;background:transparent!important;border-color:transparent!important}
 html body :is(.topbar .bb-desktop-links .bb-nav-link,.hdr .bb-desktop-links .bb-nav-link):hover{color:var(--bb-brand-foreground)!important;background:#ffffff12!important}
 html body :is(.topbar .bb-desktop-links .bb-nav-link.active,.hdr .bb-desktop-links .bb-nav-link.active){color:var(--bb-brand-blue)!important;background:#39c8ee17!important;box-shadow:inset 0 -2px var(--bb-brand-blue)!important}
 html body :is(.topbar #app-menu-toggle,.topbar>.topbar-inner>.fsbtn,.hdr .hdr-right>.hdr-btn,.hdr .assessment-home-back){color:var(--bb-brand-foreground)!important;background:#ffffff0b!important;border:1px solid #b1d7eb33!important;box-shadow:inset 0 1px #ffffff08!important}
 html body :is(.topbar #app-menu-toggle,.topbar>.topbar-inner>.fsbtn,.hdr .hdr-right>.hdr-btn,.hdr .assessment-home-back):hover{background:#ffffff1b!important;border-color:#7cd3f166!important}
 html body .topbar .topbar-inner>button#hd-bell{background:#39c8ee16!important;color:var(--bb-brand-blue)!important;border-color:#62cbed4d!important}
 html body .topbar .topbar-inner>button#hd-bell:hover{background:#39c8ee28!important}
 html body .topbar #hd-bell-count{border-color:var(--bb-shell)!important}
 html body :is(.panel,.bd-sec,.bd-foot,.bb-settings-card,.bb-account,.bb-tools-card,.bb-calendar,.bb-cat-dialog,.bb-cal-dialog,.ops-stock-dialog,.statcard,.ops-saved-card,.assessment-intro){box-shadow:var(--bb-card-shadow)!important}
 html body :is(.panel-hd,.bd-sec-hd,.parts-header,.pitch-finder-hdr,.util-draw-header){background:var(--surface-secondary)!important;border-bottom-color:var(--separator)!important}
 html body :is(.ph,.assessment-location>summary){background:var(--surface-secondary)!important;border-color:var(--border)!important}
 html body :is(.ph-title,.panel-hd h2){color:var(--foreground)!important}
 html body .ops-hero{
  padding:22px 24px!important;gap:20px;border-radius:var(--radius)!important;
  background:linear-gradient(112deg,color-mix(in srgb,var(--bb-shell) 88%,transparent),color-mix(in srgb,var(--bb-shell-top) 65%,transparent)),url('/brand-blueprint.webp') right center/cover,var(--bb-shell)!important;
  color:var(--bb-brand-foreground)!important;border:1px solid #3d90b451!important;box-shadow:var(--bb-card-shadow)!important;
 }
 html body .ops-hero :is(h1,h2){color:var(--bb-brand-foreground)!important;margin:0 0 8px!important}
 html body .ops-hero p{color:var(--bb-brand-muted)!important;margin:0!important}
 html body .ops-hero .ops-kicker{color:var(--bb-brand-blue)!important}
 html body .ops-hero .ops-button:not(.primary){color:var(--bb-brand-foreground)!important;background:#ffffff0d!important;border-color:#b1d7eb3b!important}
 html body .ops-hero .ops-button:not(.primary):hover{background:#ffffff1b!important;color:var(--bb-brand-foreground)!important}
 html body .bb-cal-toolbar{
  background:linear-gradient(112deg,color-mix(in srgb,var(--bb-shell) 88%,transparent),color-mix(in srgb,var(--bb-shell-top) 65%,transparent)),url('/brand-blueprint.webp') right center/cover,var(--bb-shell)!important;
  color:var(--bb-brand-foreground)!important;border-color:#3d90b451!important;
 }
 html body .bb-cal-toolbar .bb-cal-heading{background:transparent!important;border:0!important}
 html body .bb-cal-toolbar .bb-cal-heading h2{color:var(--bb-brand-foreground)!important}
 html body .bb-cal-toolbar .bb-cal-heading p{color:var(--bb-brand-muted)!important}
 html body .bb-cal-toolbar .bb-cal-heading-icon{color:var(--bb-brand-blue)!important;background:#39c8ee19!important;border:1px solid #62cbed36}
 html body .bb-cal-toolbar .bb-cal-view-toggle{background:#061c2d66!important;border-color:#6fb9db33!important}
 html body .bb-cal-toolbar .bb-cal-view-toggle button{color:var(--bb-brand-muted)!important;background:transparent!important}
 html body .bb-cal-toolbar .bb-cal-view-toggle [aria-pressed="true"]{color:var(--accent-foreground)!important;background:var(--accent)!important;border-color:var(--accent)!important}
 html body .bb-cal-toolbar .bb-cal-view-toggle button:hover:not([aria-pressed="true"]){color:var(--bb-brand-foreground)!important;background:#ffffff12!important}
 html body :is(.bb-cal-dialog-head,.bb-cat-dialog-head,.bb-jobber-head,.bb-order-head,.bb-tool-head,.bb-tools-head){background:linear-gradient(112deg,var(--bb-shell),var(--bb-shell-top))!important;color:var(--bb-brand-foreground)!important;border-color:#3d90b451!important}
 html body :is(.bb-cal-dialog-head,.bb-cat-dialog-head,.bb-jobber-head,.bb-order-head,.bb-tool-head,.bb-tools-head) :is(h2,h3,strong){color:var(--bb-brand-foreground)!important}
 html body :is(.bb-cal-dialog-head,.bb-cat-dialog-head,.bb-jobber-head,.bb-order-head,.bb-tool-head,.bb-tools-head) :is(p,small,span){color:var(--bb-brand-muted)!important}
 html body :is(.bb-cal-dialog-head,.bb-cat-dialog-head,.bb-jobber-head,.bb-order-head,.bb-tool-head,.bb-tools-head)>button{background:#ffffff0f!important;color:var(--bb-brand-foreground)!important;border-color:#b1d7eb33!important}
 html[data-theme="dark"] body :is(.panel,.bd-sec,.bd-foot,.bb-settings-card,.bb-account,.bb-tools-card,.bb-calendar,.bb-cat-dialog,.bb-cal-dialog,.ops-stock-dialog,.statcard,.ops-saved-card,.assessment-intro){box-shadow:var(--bb-card-shadow)!important}
 @media(max-width:680px){html body .ops-hero{padding:20px 18px!important;gap:16px}}
}

@media screen{
 html body .ops-breakdown :is(.bd-sec,.bd-foot,.bd-empty){border-radius:var(--radius)!important;border-color:var(--border)!important}
 html body .ops-breakdown .bd-foot .fl.grand .r{color:var(--accent)!important}
 html body #app-menu-panel .bb-theme-toggle[aria-pressed="true"] :is(span,svg){color:var(--accent-foreground)!important}
}

/* Legacy quote controls must pair their text with a surface from the same theme. */
@media screen{
 html:is(.dark,[data-theme="dark"]){--field-border:#557792}
 html:is(.dark,[data-theme="dark"]) body :is(.search,.modal-search,.qtybox){
  background:var(--field-background)!important;color:var(--field-foreground)!important;border-color:var(--field-border)!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(.payrates,.formula,.sec-bullets,.bb-material-price-preview,.bb-cat-empty,.bb-settings-snapshot>div){
  background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--border)!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(.formula b,.bb-material-price-preview dd,.bb-settings-snapshot dd){color:var(--foreground)!important}
 html:is(.dark,[data-theme="dark"]) body .bb-settings-snapshot dt{color:var(--muted)!important}
 html:is(.dark,[data-theme="dark"]) body :is(.pick,.sec-bullet){color:var(--foreground)!important;border-color:var(--separator)!important}
 html:is(.dark,[data-theme="dark"]) body :is(.pick,.sec-bullet):hover{background:var(--surface-tertiary)!important}
 html:is(.dark,[data-theme="dark"]) body :is(.qtybox button,.addmini,.kitbtn,.linkedit){
  background:var(--surface-secondary)!important;color:var(--accent)!important;border-color:var(--field-border)!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(.qtybox button,.addmini,.kitbtn,.linkedit):hover:not(:disabled){
  background:var(--surface-tertiary)!important;color:var(--foreground)!important;
 }
 html:is(.dark,[data-theme="dark"]) body #view-builder :is(.field label,.line-name .sub,.sum-row .k){color:var(--muted)!important}
 html:is(.dark,[data-theme="dark"]) body #view-builder :is(.sum-row,.takeoff-item){border-color:var(--separator)!important}
 html:is(.dark,[data-theme="dark"]) body #takeoff .takeoff-item:last-child{background:var(--surface-secondary)!important;color:var(--foreground)!important}
 html:is(.dark,[data-theme="dark"]) body :is(.takeoff-item .tq,.badge.b-labor){
  background:var(--surface-tertiary)!important;color:var(--accent)!important;
 }
 html:is(.dark,[data-theme="dark"]) body .badge.b-material{background:#3b2b20!important;color:#ffbf81!important}
 html:is(.dark,[data-theme="dark"]) body .badge.b-kit{background:#302c4b!important;color:#d2c1ff!important}
 html:is(.dark,[data-theme="dark"]) body #view-builder .ef-seg:not(.on){background:var(--field-background)!important;box-shadow:inset 0 0 0 1px var(--field-border)}
 html:is(.dark,[data-theme="dark"]) body :is(input,select,textarea):focus-visible{
  outline:2px solid var(--focus)!important;outline-offset:3px;border-color:var(--focus)!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(.field,.search,.modal-search,.qtybox):focus-within{
  border-color:var(--focus)!important;box-shadow:0 0 0 2px #39d8ff33!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(input,textarea)::placeholder{color:var(--field-placeholder)!important;opacity:1}
 html:is(.dark,[data-theme="dark"]) body :is(input,select,textarea):disabled,
 html:is(.dark,[data-theme="dark"]) body #view-builder .qtybox input:disabled{
  background:var(--surface-secondary)!important;color:var(--muted)!important;-webkit-text-fill-color:var(--muted);opacity:1;
 }
 html:is(.dark,[data-theme="dark"]) body :is(input,textarea)[readonly]{
  background:var(--surface-secondary)!important;color:var(--muted)!important;-webkit-text-fill-color:var(--muted);
 }
 html:is(.dark,[data-theme="dark"]) body :is(input,select,textarea):is([aria-invalid="true"],:user-invalid){border-color:var(--danger)!important}
 html:is(.dark,[data-theme="dark"]) body select :is(option,optgroup){background:var(--field-background);color:var(--field-foreground)}
 html:is(.dark,[data-theme="dark"]) body input:autofill{
  -webkit-text-fill-color:var(--field-foreground);caret-color:var(--field-foreground);box-shadow:inset 0 0 0 1000px var(--field-background)!important;
 }
}

/* Received assessment requests and inventory review panels share the active theme. */
@media screen{
 html body .bb-purchase-empty{color:var(--muted)}
 html:is(.dark,[data-theme="dark"]) body #view-assessments .assessment-request{
  background:var(--surface-secondary)!important;color:var(--foreground)!important;border-color:var(--border)!important;
 }
 html:is(.dark,[data-theme="dark"]) body #view-assessments .assessment-request>b{color:var(--foreground)!important}
 html:is(.dark,[data-theme="dark"]) body #view-assessments .assessment-request :is(small,label){color:var(--muted)!important}
 html:is(.dark,[data-theme="dark"]) body #view-assessments :is(.assessment-location,.assessment-photo-grid figure){border-color:var(--border)!important}
 html:is(.dark,[data-theme="dark"]) body #view-assessments .ac-chip{
  background:var(--surface-tertiary)!important;color:var(--accent)!important;
 }
 html:is(.dark,[data-theme="dark"]) body #view-assessments .assessment-disclaimer{
  background:color-mix(in srgb,var(--warning) 10%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--warning)!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(.bb-purchases-section,.bb-purchase-row,.bb-receipt-line,.bb-receipt-review,.bb-receipt-review pre){
  background:var(--surface)!important;color:var(--foreground)!important;border-color:var(--border)!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(.bb-receipt-line,.bb-receipt-review){background:var(--surface-secondary)!important}
 html:is(.dark,[data-theme="dark"]) body :is(.bb-purchases-heading h3,.bb-purchase-row strong,.bb-receipt-review pre){color:var(--foreground)!important}
 html:is(.dark,[data-theme="dark"]) body :is(.bb-purchase-row small,.bb-purchase-empty,.bb-tools-note,.bb-tools-status,.bb-tools-busy){color:var(--muted)!important}
 html:is(.dark,[data-theme="dark"]) body :is(.bb-purchase-row button,.bb-icon-button){
  background:var(--surface-secondary)!important;color:var(--accent)!important;border-color:var(--field-border)!important;
 }
 html:is(.dark,[data-theme="dark"]) body :is(.bb-purchases-heading button,.bb-text-button){color:var(--accent)!important}
 html:is(.dark,[data-theme="dark"]) body .bb-tools .bb-tools-status.error{
  background:color-mix(in srgb,var(--danger) 10%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--danger)!important;
 }
 html:is(.dark,[data-theme="dark"]) body .bb-tools .bb-tools-status.success{
  background:color-mix(in srgb,var(--success) 10%,var(--surface))!important;color:var(--foreground)!important;border-color:var(--success)!important;
 }
}
