#estimator {color:#fff;font:16px/1.5 system-ui,sans-serif;}
#estimator * {box-sizing:border-box;}
#estimator button,#estimator input {font:inherit;}
#estimator button {cursor:pointer;min-height:44px;border:1px solid #b8c6d0;border-radius:8px;padding:9px 14px;background:#fff;color:#183c56;}
#estimator button:focus-visible,#estimator input:focus-visible,#estimator summary:focus-visible {outline:3px solid #d49500;outline-offset:3px;}
#estimator button:disabled {opacity:.6;cursor:wait;}
#estimator h1 {font-size:28px;margin:0 0 8px;}
#estimator h2 {font-size:23px;margin:0;}
#estimator p {margin:8px 0 16px;}
#estimator .est-intro {padding:12px 0 20px;}
#estimator summary {cursor:pointer;}
#estimator .est-toolbar {color:#202830;position:sticky;top:0;z-index:81;display:flex;gap:16px;align-items:center;justify-content:space-between;background:#f2f6f9;padding:12px;border:1px solid #cad6df;border-radius:10px;box-shadow:0 3px 12px #0002;}
#estimator .est-toolbar label {flex:1;font-size:13px;font-weight:600;}
#estimator input[type=search] {display:block;width:100%;padding:10px;border:1px solid #a8b9c5;border-radius:6px;background:white;color:#202830;}
#estimator #est-review,#estimator #est-save {background:#174f75;color:white;border-color:#174f75;}
#estimator #est-review strong {display:block;font-size:20px;}
#estimator #est-status {min-height:24px;margin:8px 0;font-size:14px;}
#estimator .est-card {flex:0 0 130px;max-width:130px;border-radius:9px;margin:4px 0;}
#estimator .est-card.is-added {background:#ffffff30;box-shadow:inset 0 0 0 2px #123d59;}
#estimator .est-pick {width:100%;height:100%;padding:4px;border:0;background:transparent;color:#fff;}
#estimator .est-pick img {max-width:100%;object-fit:contain;}
#estimator figcaption {font-size:14px;line-height:1.3;margin-top:8px;}
#estimator .est-badge {display:inline-block;background:#123d59;color:#fff;border-radius:20px;padding:3px 9px;font-size:12px;margin-top:8px;}
#estimator [hidden] {display:none!important;}
#estimator dialog {position:fixed;border:0;background:#fff;color:#202830;padding:24px;box-shadow:0 12px 60px #0005;max-height:90dvh;overflow:auto;}
#estimator dialog::backdrop {background:#091c30a8;}
#estimator dialog header {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;}
#estimator dialog header button {font-size:24px;}
#estimator #est-panel {inset:0 0 0 auto;margin:0;width:min(440px,100%);height:100dvh;max-height:100dvh;border-radius:16px 0 0 16px;}
#estimator #est-picker {width:min(460px,calc(100% - 24px));border-radius:14px;}
#estimator #est-picker-image {height:140px;max-width:100%;object-fit:contain;display:block;margin:0 auto 18px;}
#estimator fieldset {border:0;padding:0;margin:0 0 16px;}
#estimator legend {font-size:13px;color:#52616d;}
#estimator .est-option {display:flex;align-items:center;gap:10px;padding:12px 8px;border-bottom:1px solid #e1e7eb;cursor:pointer;}
#estimator input[type=number] {width:80px;padding:8px;border:1px solid #a8b9c5;border-radius:6px;}
#estimator dialog footer {display:flex;gap:12px;align-items:center;justify-content:space-between;margin-top:24px;flex-wrap:wrap;}
#estimator .est-entry {padding:14px 0;border-bottom:1px solid #dbe3e9;}
#estimator .est-entry h3 {font-size:17px;margin:0 0 6px;}
#estimator .est-entry p {font-size:14px;color:#52616d;margin:4px 0 12px;}
#estimator .est-actions {display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px;}
#estimator .est-actions a {color:#174f75;text-decoration:underline;}
#estimator #est-error {color:#a32121;}
@media(max-width:600px) {
 #estimator .est-toolbar {gap:8px;padding:8px;}
 #estimator #est-review {font-size:12px;padding:8px;}
 #estimator #est-review strong {font-size:17px;}
 #estimator #est-panel {inset:0;margin:0;width:100%;height:100dvh;max-height:100dvh;border-radius:0;padding-top:max(18px,env(safe-area-inset-top));padding-bottom:max(18px,env(safe-area-inset-bottom));}
 #estimator dialog {padding:18px;}
}
@media(prefers-reduced-motion:reduce) {#estimator .cb-item img {transition:none;transform:none;}}
/* Keep the toolbar attached to the viewport despite the site's horizontal overflow rule. */
html:has(#estimator), body:has(#estimator) {overflow-x:clip;}
#estimator #est-panel {max-width:100%;}
#estimator {background:#3498db;padding:12px;border-radius:12px;}
#estimator a,#estimator a:visited {color:#174f75;text-decoration:underline;border-bottom:0;}

#estimator .est-intro a,#estimator .est-intro a:visited {color:#fff;}

/* Place the figure beside its choices, keeping actions in the initial view. */
#estimator #est-picker {width:min(540px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:18px;}
#estimator #est-picker header {margin-bottom:10px;}
#estimator #est-picker header h2 {font-size:21px;line-height:1.2;}
#estimator #est-picker header button {flex:0 0 44px;width:44px;height:44px;padding:0;}
#estimator #est-form {display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;}
#estimator #est-question {grid-column:1 / -1;margin:0;}
#estimator #est-picker-image {grid-column:1;grid-row:2;width:88px;height:130px;margin:0;align-self:center;}
#estimator #est-options {grid-column:2;grid-row:2;min-width:0;margin:0;}
#estimator #est-options legend {position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
#estimator #est-options .est-option {min-height:44px;padding:9px 0;gap:8px;line-height:1.3;}
#estimator #est-options input {flex-shrink:0;}
#estimator .est-quantity-row {grid-column:1 / -1;display:flex;align-items:center;gap:12px;}
#estimator #est-error {grid-column:1 / -1;margin:0;}
#estimator #est-error:empty {display:none;}
#estimator #est-form footer {grid-column:1 / -1;margin:0;padding-top:12px;border-top:1px solid #e1e7eb;}
@media(max-width:380px) {
 #estimator #est-form {grid-template-columns:60px minmax(0,1fr);gap:10px;}
 #estimator #est-picker-image {width:60px;height:110px;}
 #estimator #est-picker {padding:14px;}
}

#estimator .est-search-field {flex:1;min-width:0;}
#estimator .est-search-input {position:relative;}
#estimator #est-search {padding-right:44px;}
#estimator #est-search::-webkit-search-cancel-button {appearance:none;-webkit-appearance:none;}
#estimator #est-search-clear {position:absolute;right:0;top:0;bottom:0;width:44px;min-height:44px;padding:0;border:0;background:transparent;font-size:24px;}

#estimator .est-entry-summary {display:grid;grid-template-columns:minmax(0,280px) 90px;align-items:center;justify-content:start;gap:12px;}
#estimator .est-entry-image {grid-column:2;grid-row:1;display:block;width:90px;height:110px;object-fit:contain;justify-self:start;}
#estimator .est-entry-details {grid-column:1;grid-row:1;min-width:0;overflow-wrap:anywhere;}

@media(max-width:380px) {
 #estimator .est-entry-summary {grid-template-columns:minmax(0,1fr) 70px;gap:12px;}
 #estimator .est-entry-image {width:70px;height:105px;}
}

#estimator .est-entry-details .est-actions {margin-top:8px;gap:8px;}
#estimator .est-entry-details p {margin:3px 0 6px;}
#estimator .est-entry-details .est-actions button {padding:7px 10px;}
#estimator #est-panel > p {font-size:14px;line-height:1.4;margin-bottom:8px;}

body:has(#est-panel[open]) {overflow:hidden;}

.est-print-document {display:none;}
@media print {
 @page {margin:15mm;}
 html:has(#estimator),body:has(#estimator) {overflow:visible!important;height:auto!important;width:auto!important;position:static!important;background:#fff!important;}
 body:has(#estimator) > :not(.est-print-document) {display:none!important;}
 body:has(#estimator) > .est-print-document {display:block!important;color:#000;background:#fff;font:11pt/1.4 Arial,sans-serif;}
 .est-print-document h1 {font-size:19pt;margin:0 0 8pt;}
 .est-print-document h2 {font-size:13pt;margin:0 0 5pt;}
 .est-print-document p {margin:4pt 0 10pt;}
 .est-print-row {display:flex;align-items:center;gap:14pt;padding:10pt 0;border-bottom:1px solid #bbb;break-inside:avoid;page-break-inside:avoid;}
 .est-print-row img {width:45pt;height:65pt;object-fit:contain;flex-shrink:0;}
 .est-print-row div {min-width:0;overflow-wrap:anywhere;}
 .est-print-document > h2 {margin-top:16pt;break-after:avoid;}
 dialog::backdrop {display:none!important;}
}
