/* Atlas-only layout: never inherit the garage's locked viewport. */
html:has(.atlas-main){height:auto!important;overflow-y:auto!important}
body:has(>.atlas-main){height:auto!important;min-height:100dvh;overflow:visible!important}
body:has(>.site-footer)>main.atlas-main{display:flex;flex-direction:column;flex:1 0 auto!important;height:auto!important;min-height:0;overflow:visible!important;padding:24px!important;min-width:0}
.atlas-top,.atlas-toolbar,.atlas-shell,.atlas-shell>*{min-width:0}
.atlas-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) minmax(200px,280px) auto;gap:12px}
.atlas-toolbar label,.atlas-visual-header label{font-size:14px;min-width:0}
.atlas-main select,.atlas-main select option,.atlas-toolbar input{font-family:inherit;font-size:16px;line-height:1.5}
.atlas-main select{height:48px;padding:10px 40px 10px 12px;min-width:0;max-width:100%}
.atlas-toolbar input,.atlas-toolbar .outline{height:48px}
.atlas-main .outline{font-size:14px}
.atlas-shell{flex:none;grid-template-columns:280px minmax(0,1fr) 300px;height:var(--atlas-shell-height,calc(100dvh - 320px));min-height:0;overflow:hidden}
.atlas-shell>.atlas-assemblies,.atlas-shell>.atlas-detail{min-height:0;max-height:100%;overflow:auto;overscroll-behavior:auto;overflow-wrap:anywhere}
.atlas-visual{height:100%;min-height:0;overflow:hidden}
.atlas-visual-header,.atlas-tools{flex:none}
.atlas-viewport{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:auto}
#atlasDrawing{margin-inline:auto;transition:none}
#atlasDrawing.enlarged{max-width:none}
.atlas-tools{font-size:14px}
.atlas-tools>span{font-size:13px;overflow-wrap:anywhere}
.atlas-part-detail .cta{white-space:normal;overflow-wrap:anywhere}
body:has(>.atlas-main)>.site-footer{flex:none;margin-top:auto}
@media(min-width:851px) and (max-width:1200px){
 .atlas-shell{grid-template-columns:220px minmax(0,1fr) 250px}
 .atlas-assemblies,.atlas-detail{padding:12px}
 .atlas-toolbar{grid-template-columns:minmax(160px,1fr) minmax(180px,240px) auto}
}
@media(max-width:850px){
 body:has(>.site-footer)>main.atlas-main{padding:16px!important}
 .atlas-top h1{font-size:28px}.atlas-top>p{font-size:14px}
 .atlas-toolbar{grid-template-columns:1fr 1fr}
 .atlas-toolbar .atlas-search,.atlas-toolbar>label:not(.atlas-search){grid-column:1/-1}
 .atlas-toolbar>a,.atlas-toolbar>#atlasReset{display:flex;justify-content:center}
 .atlas-context{font-size:13px;line-height:1.6;margin:12px 0}
 .atlas-shell{display:block;height:auto;flex:none;overflow:visible}
 .atlas-shell>.atlas-assemblies,.atlas-shell>.atlas-visual,.atlas-shell>.atlas-detail{height:auto;max-height:none;min-height:0}
 .atlas-shell[data-view="assemblies"]>.atlas-assemblies{max-height:65dvh;overflow:auto}
 .atlas-shell[data-view="parts"]>.atlas-detail{overflow:visible}
 .atlas-shell[data-view="diagram"]>.atlas-visual{overflow:hidden}
 .atlas-visual-header label{display:grid;gap:8px}
 .atlas-viewport{flex:none;height:clamp(240px,50dvh,560px);min-height:0;max-height:none}
 .atlas-visual-header h2{font-size:22px;line-height:1.3}
 .atlas-tools{padding:12px;display:grid;grid-template-columns:1fr 1fr}
 .atlas-tools>span{grid-column:1/-1}.atlas-tools .outline{width:100%}
 .atlas-mobile-tabs button{font-size:16px;min-height:44px}
}

@media(min-width:851px){body:has(>.site-footer)>main.atlas-main{padding-bottom:0!important}.atlas-shell{min-height:360px}}

/* Scale the diagram and its callouts together, bounded by the toolbar above and controls below. */
.atlas-viewport .diagram-board img{width:100%;height:auto;max-width:none;aspect-ratio:auto;object-fit:contain}

#sourcingOffers .offer strong{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;font-size:15px;line-height:1.5}#sourcingOffers .offer small{font-size:13px;line-height:1.5}#sourcingOffers .sourcing-note{font-size:13px}#sourcingOffers{margin-bottom:22px}#sourcingOffers h3{font-size:19px;margin-bottom:8px}.sourcing-state{border-left:2px solid var(--red);padding-left:10px}

.atlas-market{display:flex;align-items:center;gap:12px;font-size:14px;margin-bottom:12px}.atlas-market select{width:min(100%,300px)}@media(max-width:850px){.atlas-market{display:grid}.atlas-market select{width:100%}}
/* A compact purchase summary keeps the parts inspector focused. */
#sourcingOffers{margin:16px 0 22px}.purchase-summary{padding:16px 0;border-block:1px solid #343941;display:grid;gap:14px}.purchase-summary>div{display:grid;gap:5px}.purchase-summary span{font-size:14px;color:#aeb3bd}.purchase-summary strong{font-size:22px;font-weight:600}.seller-compare,.seller-shop{padding:12px 16px;border:1px solid #e53730;background:#d92d27;color:white;text-align:center;text-decoration:none;font:inherit;font-size:15px;cursor:pointer}.seller-compare{width:100%}.seller-dialog{width:min(820px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #41464e;border-radius:8px;background:#101215;color:#eee;overflow:auto;box-shadow:0 24px 100px #0009}.seller-dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}.seller-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:28px;border-bottom:1px solid #30343b}.seller-heading h2{font-size:26px;line-height:1.2;margin:10px 0}.seller-heading p{font-size:15px;color:#aeb3bd;margin:0}.seller-close{background:transparent;border:1px solid #454b55;color:#eee;padding:10px 14px;cursor:pointer;font:inherit;font-size:14px;flex:none}.seller-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:24px 28px}.seller-card{display:flex;flex-direction:column;gap:12px;background:#191c21;border:1px solid #343941;border-radius:5px;padding:20px;min-width:0}.seller-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.seller-card h3{font-size:17px;line-height:1.4;margin:0;overflow-wrap:anywhere}.seller-condition{font-size:13px;padding:3px 7px;border:1px solid #454b55;border-radius:3px;color:#c9cdd3;white-space:nowrap}.seller-price{font-size:26px;font-weight:600;line-height:1.3}.seller-card p{font-size:14px;margin:0;color:#b5bbc4;line-height:1.5}.seller-shop{margin-top:auto;display:block;background:#252a32;border-color:#555d69}.seller-shop:hover{background:#343b46;border-color:#eee}.seller-card small{font-size:13px;line-height:1.5;color:#aeb3bd}.seller-footnote{padding:0 28px 24px;margin:0;font-size:13px;line-height:1.6;color:#aeb3bd;max-width:none}@media(max-width:600px){.seller-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.seller-heading{padding:20px;gap:12px}.seller-heading h2{font-size:23px}.seller-grid{grid-template-columns:1fr;padding:20px}.seller-footnote{padding:0 20px 20px}}

/* Seller dialogs must not inherit the global hidden animation state. */
dialog.seller-dialog[open]{opacity:1;transform:none;visibility:visible}dialog.seller-dialog[open]::backdrop{background:#000b;backdrop-filter:blur(4px)}

/* Explicit top-layer geometry; opacity motion must never move the popup offscreen. */
dialog.seller-dialog[open]{position:fixed;inset:0;margin:auto;display:block;height:fit-content;max-height:calc(100dvh - 32px);opacity:1;visibility:visible;transform:none!important;translate:none!important;animation:seller-fade-in 240ms ease-out both}dialog.seller-dialog[open].popup-closing{animation:seller-fade-out 220ms ease-in both}@keyframes seller-fade-in{from{opacity:0}to{opacity:1}}@keyframes seller-fade-out{from{opacity:1}to{opacity:0}}

/* Keep catalog filters together, with matching labels and control heights. */
.atlas-toolbar{grid-template-columns:minmax(180px,1fr) minmax(180px,260px) minmax(180px,260px) auto}
.atlas-toolbar .atlas-market{display:grid;gap:6px;margin:0;align-items:initial}
.atlas-toolbar .atlas-market select{width:100%;height:48px}
@media(max-width:1100px) and (min-width:851px){.atlas-toolbar{grid-template-columns:minmax(160px,1fr) minmax(160px,200px) minmax(160px,200px) auto}}
@media(max-width:850px){.atlas-toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.atlas-toolbar .atlas-search{grid-column:1/-1}.atlas-toolbar>label:not(.atlas-search){grid-column:auto}.atlas-toolbar #atlasReset{grid-column:1/-1}}

/* Seller comparisons stay within the viewport; only the offers scroll. */
dialog.seller-dialog[open]{width:min(1040px,calc(100vw - 40px));height:auto;max-height:calc(100dvh - 40px);display:flex;flex-direction:column;overflow:hidden;box-sizing:border-box}
.seller-heading{flex:none;padding:20px 24px;gap:16px}.seller-heading h2{font-size:24px;margin:8px 0}.seller-grid{overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-gutter:stable;padding:20px 24px;gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}.seller-card{padding:16px;gap:8px}.seller-card h3{font-size:16px}.seller-price{font-size:23px}.seller-refresh:empty{display:none}.seller-shop{padding:10px 12px;margin-top:8px}.seller-footnote{flex:none;padding:12px 24px;border-top:1px solid #30343b;font-size:13px}.seller-card small,.seller-card p{font-size:14px}
@media(max-width:900px){.seller-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){dialog.seller-dialog[open]{width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.seller-heading{padding:16px}.seller-heading h2{font-size:21px}.seller-grid{grid-template-columns:1fr;padding:16px}.seller-footnote{padding:12px 16px}.seller-card{padding:14px}}
/* Compact, content-sized comparison with a bounded internal scroll region. */
dialog.seller-dialog[open]{inset:auto!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%)!important;margin:0!important;height:fit-content!important;min-height:0!important;max-height:min(760px,82dvh)!important;display:flex!important;flex-direction:column;overflow:hidden!important}
.seller-dialog .seller-grid{flex:0 1 auto;max-height:calc(min(760px,82dvh) - 190px);min-height:0;overflow-y:auto;align-content:start}
.seller-dialog .seller-heading,.seller-dialog .seller-footnote{flex:0 0 auto}
@media(max-width:560px){dialog.seller-dialog[open]{max-height:86dvh!important}.seller-dialog .seller-grid{max-height:calc(86dvh - 190px)}}

/* Consistent comparison rows and button baselines across every seller. */
.seller-dialog .seller-grid{grid-auto-rows:1fr;align-items:stretch}
.seller-dialog .seller-card{display:grid;grid-template-rows:minmax(2.8rem,auto) 2rem 2.6rem minmax(2.6rem,auto) 1.4rem 2.7rem;gap:6px;padding:16px;align-content:start}
.seller-dialog .seller-card-top{min-height:0;align-items:start}.seller-dialog .seller-price{align-self:start;margin:0;line-height:1.3}
.seller-dialog .seller-refresh{display:block!important;min-height:2.6rem;line-height:1.3}
.seller-dialog .seller-availability{line-height:1.3;margin:0}.seller-dialog .seller-checked{line-height:1.3}
.seller-dialog .seller-shop{margin:0;align-self:stretch;display:flex;align-items:center;justify-content:center;padding:8px 12px}

/* Tighter uniform cards: retain shared baselines without oversized empty rows. */
.seller-dialog .seller-card{grid-template-rows:2.4rem 1.8rem 2.2rem 2.2rem 1.2rem 2.6rem;gap:4px;padding:14px}
.seller-dialog .seller-refresh{min-height:0;line-height:1.2}.seller-dialog .seller-availability,.seller-dialog .seller-checked{line-height:1.2}.seller-dialog .seller-card-top h3{line-height:1.2}.seller-dialog .seller-grid{gap:12px}

/* Clear, consistent information hierarchy for seller comparisons. */
.seller-dialog .seller-card{grid-template-rows:minmax(2.4rem,auto) 3.2rem 2rem 2.6rem minmax(2.4rem,auto) 2.7rem;gap:6px;padding:16px;border-radius:7px}
.seller-dialog .seller-card-top{align-items:flex-start;gap:10px}
.seller-dialog .seller-condition{font-size:12px;line-height:1.4;padding:2px 7px;color:#c5cbd3;background:#24282e;border-color:#3c424b;border-radius:4px}
.seller-dialog .seller-price-block{display:flex;flex-direction:column;gap:2px;align-items:flex-start}
.seller-dialog .seller-price{font-size:25px;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.025em}
.seller-dialog .seller-price-note{font-size:12px;line-height:1.2;color:#aeb6c2}
.seller-dialog .seller-status-row{display:flex;align-items:flex-start}
.seller-dialog .seller-status{display:inline-flex;max-width:100%;padding:4px 8px;border:1px solid #414852;border-radius:4px;font-size:13px;line-height:1.3;color:#c4ccd6;background:#22272e}
.seller-dialog .seller-status--available{color:#b6e2c8;background:#1b3027;border-color:#345444}
.seller-dialog .seller-status--unavailable{color:#d0c0be;background:#2c2425;border-color:#514044}
.seller-dialog .seller-part-detail{display:flex;flex-direction:column;justify-content:center;gap:2px;min-width:0}
.seller-dialog .seller-part-detail span{font-size:12px;color:#9fa8b4;line-height:1.2}
.seller-dialog .seller-part-detail strong{font-size:14px;font-weight:500;line-height:1.3;letter-spacing:.025em;color:#d9dfe7}
.seller-dialog .seller-freshness{border-top:1px solid #303640;padding-top:8px;line-height:1.35;font-size:12px;color:#a9b2bf;align-self:stretch}
.seller-dialog .seller-shop{border-radius:4px;font-weight:500}

/* Compact shared rows keep every comparison aligned without large blank bands. */
.seller-dialog .seller-card{grid-template-rows:minmax(2.1rem,auto) 2.65rem 1.8rem 2.1rem minmax(2rem,auto) 2.6rem;gap:3px;padding:14px}
.seller-dialog .seller-grid{gap:10px;padding:16px 20px}
.seller-dialog .seller-price-block{gap:1px}
.seller-dialog .seller-status{padding:3px 7px}
.seller-dialog .seller-part-detail{gap:1px}
.seller-dialog .seller-freshness{padding-top:6px}
@media(max-width:560px){.seller-dialog .seller-grid{padding:12px}}

.seller-dialog .seller-empty{grid-column:1/-1;padding:24px 8px;text-align:center;color:#dce1e8}.seller-empty strong{font-size:18px;font-weight:500}.seller-empty p{font-size:14px;color:#a9b2bf;line-height:1.5;margin:8px 0 0}
.seller-direct-lookups{flex:0 0 auto;padding:12px 20px;border-top:1px solid #343941}.seller-direct-lookups p{margin:6px 0 10px;color:#b8bdc5;font-size:14px}.seller-direct-lookups>div{display:flex;flex-wrap:wrap;gap:8px}.seller-direct-lookups .outline{min-height:40px;padding:9px 14px}.seller-empty{grid-column:1/-1}.seller-empty [data-seller-retry]{margin-top:12px}.seller-dialog .seller-grid{max-height:calc(min(760px,82dvh) - 320px)}
@media(max-width:560px){.seller-direct-lookups{padding:12px 16px}.seller-direct-lookups>div{display:grid;grid-template-columns:1fr 1fr}.seller-direct-lookups .outline{text-align:center}.seller-dialog .seller-grid{max-height:calc(86dvh - 330px)}}
@media(max-height:550px){dialog.seller-dialog[open]{overflow-y:auto!important}.seller-dialog .seller-grid{flex:none;max-height:none;overflow:visible}.seller-direct-lookups{flex-shrink:0}}

/* Seller comparison: a single scroll surface and aligned, content-sized offers. */
dialog.seller-dialog[open]{width:min(940px,calc(100vw - 32px));max-height:calc(100dvh - 32px)!important;border-radius:14px;background:#111316}
.seller-dialog .seller-heading{padding:24px;gap:16px;align-items:flex-start}
.seller-dialog .seller-heading .eyebrow{font-size:12px;letter-spacing:.12em;color:#939ba7}
.seller-dialog .seller-heading h2{font-size:24px;margin:8px 0;line-height:1.25}
.seller-dialog .seller-heading p{font-family:monospace;font-size:14px;letter-spacing:.04em}
.seller-dialog .seller-close{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid #363c45;border-radius:8px;background:#1b1e23;font-size:28px;line-height:1}
.seller-dialog .seller-close:hover{background:#2b3038}
.seller-dialog .seller-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#525963 transparent}
.seller-dialog .seller-grid{display:grid;grid-template-columns:1fr;grid-auto-rows:auto;gap:10px;padding:20px 24px;max-height:none;overflow:visible;flex:none}
.seller-dialog .seller-card{display:grid;grid-template-columns:minmax(160px,1.3fr) minmax(135px,1fr) minmax(145px,1fr) 120px;grid-template-rows:auto auto;gap:8px 18px;padding:18px;align-items:center;background:#1a1d22;border:1px solid #303640;border-radius:9px}
.seller-dialog .seller-card-top{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:flex-start;gap:7px}
.seller-dialog .seller-card-top h3{font-size:16px;line-height:1.4;font-weight:600}
.seller-dialog .seller-condition{font-size:12px;padding:2px 7px}
.seller-dialog .seller-price-block{grid-column:2;grid-row:1;gap:4px}
.seller-dialog .seller-price{font-size:23px;line-height:1.25;white-space:nowrap}
.seller-dialog .seller-status-row{grid-column:3;grid-row:1;align-items:center}
.seller-dialog .seller-status{font-size:13px;padding:5px 8px;line-height:1.4}
.seller-dialog .seller-shop{grid-column:4;grid-row:1;min-height:42px;margin:0;padding:10px 12px;align-self:center;border-radius:7px;font-size:14px;font-weight:600;background:#292e37;border-color:#48515e;text-decoration:none}
.seller-dialog .seller-shop:hover{background:#393f4b;border-color:#8b95a5}
.seller-dialog .seller-freshness{grid-column:1/-1;grid-row:2;border:0;padding:0;font-size:12px;line-height:1.5;color:#99a3b1}
.seller-dialog .seller-part-detail:empty{display:none}
.seller-dialog .seller-part-detail:not(:empty){grid-column:1/-1;grid-row:3;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px}
.seller-dialog .seller-direct-lookups{padding:18px 24px 22px;border-top:1px solid #303640}
.seller-dialog .seller-direct-lookups>strong{font-size:14px;font-weight:600}
.seller-dialog .seller-direct-lookups p{font-size:14px;line-height:1.5;margin:6px 0 14px;color:#9da6b3}
.seller-dialog .seller-direct-lookups>div{display:flex;flex-wrap:wrap;gap:8px}
.seller-dialog .seller-direct-lookups a.outline{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-width:100px;min-height:40px;margin:0;padding:9px 14px;border:1px solid #3a414c;border-radius:7px;background:transparent;color:#dce1e8;font-size:14px;line-height:1.4;text-decoration:none}
.seller-dialog .seller-direct-lookups a.outline:hover{background:#252a32;border-color:#77818f}
.seller-dialog .seller-footnote{margin:0;padding:14px 24px;border-top:1px solid #303640;font-size:12px;line-height:1.5;color:#99a3b1}
.seller-dialog a:focus-visible,.seller-dialog button:focus-visible{outline:2px solid #e55b55;outline-offset:3px}
@media(max-width:720px){
 .seller-dialog .seller-card{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto auto;gap:12px;padding:16px}
 .seller-dialog .seller-card-top{grid-column:1;grid-row:1}
 .seller-dialog .seller-price-block{grid-column:2;grid-row:1;align-items:flex-end;text-align:right}
 .seller-dialog .seller-status-row{grid-column:1;grid-row:2}
 .seller-dialog .seller-shop{grid-column:2;grid-row:2;min-width:112px}
 .seller-dialog .seller-freshness{grid-row:3}
 .seller-dialog .seller-part-detail:not(:empty){grid-row:4}
}
@media(max-width:440px){
 dialog.seller-dialog[open]{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)!important}
 .seller-dialog .seller-heading{padding:18px}.seller-dialog .seller-heading h2{font-size:21px}
 .seller-dialog .seller-grid{padding:14px}.seller-dialog .seller-card{gap:12px 8px;padding:14px}
 .seller-dialog .seller-price{font-size:20px}.seller-dialog .seller-card-top h3{font-size:15px}
 .seller-dialog .seller-direct-lookups{padding:16px 18px}.seller-dialog .seller-direct-lookups>div{display:grid;grid-template-columns:1fr 1fr}
 .seller-dialog .seller-direct-lookups a.outline{min-width:0;width:100%;box-sizing:border-box}
 .seller-dialog .seller-footnote{padding:12px 18px}
}
