/* Shared contrast contracts for icon controls, independent of inherited text colors. */
:root{--control-bg:#edf5fa;--control-ink:#19465d;--control-border:#b9d3e1;--control-hover:#d5eaf5;--control-focus:#268bb5}
body.dark{--control-bg:#254c61;--control-ink:#edf8ff;--control-border:#547e95;--control-hover:#33657f;--control-focus:#7ed8fb}
body :is(dialog .close,.lead-close,.equipment-close,.privacy-close,#footer-list-close,.photo-close){display:grid;place-items:center;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:1px solid var(--control-border);border-radius:11px;background:var(--control-bg);color:var(--control-ink);font:400 26px/1 Arial,sans-serif;cursor:pointer;z-index:5;opacity:1;pointer-events:auto;isolation:isolate;transition:background .18s,border-color .18s,box-shadow .18s}
body :is(dialog .close,.lead-close,.equipment-close,.privacy-close,#footer-list-close,.photo-close):hover{background:var(--control-hover);box-shadow:0 3px 10px #153e5526}
body :is(dialog .close,.lead-close,.equipment-close,.privacy-close,#footer-list-close,.photo-close) svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;pointer-events:none}
body :is(.works-nav>button,.gallery-controls button,#equipment-prev,#equipment-next,#lightbox-prev,#lightbox-next,.service-gallery-prev,.service-gallery-next){background:var(--control-bg);color:var(--control-ink);border:1px solid var(--control-border)}
body :is(.works-nav>button,.gallery-controls button,#equipment-prev,#equipment-next,#lightbox-prev,#lightbox-next):hover:not(:disabled){background:var(--control-hover);color:var(--control-ink)}
body :is(.works-nav>button,.gallery-controls button,#equipment-prev,#equipment-next,#lightbox-prev,#lightbox-next):disabled{opacity:.5;cursor:default}
body .footer-discovery-count{background:var(--control-bg);color:var(--control-ink);border:1px solid var(--control-border)}
body .footer-discovery-chevron{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;background:var(--control-bg);color:var(--control-ink);border:1px solid var(--control-border);border-radius:50%;font:700 18px/1 Arial,sans-serif}
body :is(.footer-up,.selection-dismiss){color:var(--control-ink)}
body :is(.lead-badge,.lead-status,.lead-upload-toggle){color:#246b89}body.dark :is(.lead-badge,.lead-status,.lead-upload-toggle){color:#a9def4}
body :is(.lead-close,.equipment-close,.privacy-close,#footer-list-close,dialog .close,.works-nav>button,.gallery-controls button,.footer-discovery summary):focus-visible{outline:3px solid var(--control-focus);outline-offset:3px}
@media(prefers-reduced-motion:reduce){body :is(dialog .close,.lead-close,.equipment-close,.privacy-close,#footer-list-close){transition:none}}
body.dark .price-scenarios{background:#142f40;color:#e8f5fc}
body.dark .price-service-details>summary{background:#21495e;color:#e8f5fc}
body.dark .offer-question{color:#b9e8fa}
body.dark .offer-conditions>summary{color:#d3e9f5}
body.dark #quiz-reset{color:#c6e9f9}
body.dark .footer-discovery-count,body.dark .footer-discovery-chevron{background:var(--control-bg);color:var(--control-ink);border-color:var(--control-border)}
body.dark .lead-main .lead-kicker,body.dark .lead-task-details>summary,body.dark .lead-main details>summary,body.dark .lead-engineer>div>span{color:#b8def0}
body.dark .lead-engineer span:not(.lead-avatar){color:#b8def0}
body.dark :is(button,a).secondary:not(.shine){background:#21465b;color:#e5f3fa;border-color:#4b7389}
body.dark :is(button,a).secondary:not(.shine):hover{background:#2e5e78;color:#fff;border-color:#79a8bf}
body.dark .price-mode button:not([aria-pressed=true]){background:#21465b;color:#d8edf7;border-color:#4b7389}

/* Quiet header separators and outlines in both themes. */
body .donor-header{--header-rule:#dfe8ed;--header-outline:#cddce4}
body.dark .donor-header{--header-rule:rgba(160,186,201,.16);--header-outline:rgba(160,186,201,.25)}
body .donor-header .header-shell{border-color:var(--header-outline)}
body .donor-header .topbar,body .donor-header.is-compact:hover .topbar,body .donor-header.is-compact:focus-within .topbar{border-bottom-color:var(--header-rule)}
body .donor-header .header-contact{border-left-color:var(--header-rule)}
body .donor-header .location-divider{background:var(--header-rule)}
body .donor-header .messenger,body .donor-header .theme-toggle,body .donor-header .menu-toggle{border-color:var(--header-outline)}
body .donor-header .navline>nav>.header-calculator{border-color:var(--header-outline);box-shadow:inset 0 1px 0 #ffffff12}
body.dark .donor-header .header-cta{border-color:rgba(180,209,224,.32);box-shadow:0 6px 18px #081b292e,inset 0 1px 0 #ffffff26,inset 0 -1px 0 #0e527533}
body.dark .donor-header .theme-toggle,body.dark .donor-header .messenger{box-shadow:inset 0 1px 0 #ffffff08}
body .donor-header .theme-toggle:hover,body .donor-header .navline>nav>.header-calculator:hover{border-color:#8eaebb}
body.dark .donor-header .theme-toggle:hover,body.dark .donor-header .navline>nav>.header-calculator:hover{border-color:rgba(160,192,208,.42)}
/* Table headings must have their own dark surfaces, not inherit light backgrounds. */
body.dark table>caption{background:#1b3d50;color:#c9e2ef;border-color:#416478}
body.dark table>thead,body.dark table>thead>tr,body.dark table>thead>tr>:is(th,td){background:#23495e;color:#edf7fd;border-color:#466b80}
body.dark .guide-table-wrap{background:#132e3e;border-color:#466779}
body.dark .guide-table-wrap caption{background:#1b3d50;color:#c9e2ef}
body.dark .guide-table-wrap :is(th,td){border-color:#3d5c6f}
body.dark .guide-table-wrap tbody :is(th,td){color:#e0edf5}

/* Pagination hit areas stay transparent; only their three-pixel tracks are visible. */
body .works-nav .works-pagination>button,body .works-nav .works-pagination>button:hover,body .works-nav .works-pagination>button:active{appearance:none;-webkit-appearance:none;border:0;background:transparent;box-shadow:none;border-radius:0;padding:0}
body .works-nav .works-pagination>button:focus:not(:focus-visible){outline:none}
