/* rd2 (Tim 10/20, revised: menu stays on the right, controls stay bottom-middle in our colors): 3D Pro's own estimator layout */
@media (min-width: 821px) {
  #viewSeg { left: auto !important; right: 18px !important; top: auto !important; bottom: 18px !important; transform: none !important; }
  .rd-card { margin: 8px 12px 6px !important; border: 1px solid #e2e8f0 !important; border-radius: 12px !important; background: #fff !important; box-shadow: 0 1px 3px rgba(15, 23, 42, .06) !important; }
  .rd-card .tb-logo { display: none !important; }
}
#sections { display: flex !important; flex-direction: column !important; }
/* start screen: ZIP first, card on the left */
#stateselected.rd-start { justify-content: flex-start !important; }
#stateselected.rd-start .inner-div { margin-left: max(24px, 7vw) !important; margin-right: auto !important; text-align: left !important; max-width: 430px !important; border-radius: 18px !important; padding: 30px 30px 24px !important; }
#stateselected.rd-start .inner-div .logo { margin: 0 0 14px !important; }
#stateselected.rd-start h1 { font-size: 30px !important; line-height: 1.15 !important; margin: 0 0 6px !important; text-align: left !important; }
#stateselected.rd-start .inner-div > p:not(.footer-text) { font-size: 16px !important; font-weight: 600 !important; margin: 0 0 12px !important; text-align: left !important; }
#stateselected.rd-start .form-check { display: none !important; }
#stateselected.rd-start .state-select { width: 100% !important; }
#stateselected.rd-start .design-btn { width: 100% !important; margin-top: 12px !important; }
#stateselected.rd-start .footer-text { text-align: left !important; }
.rd-zip label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 4px; color: #0f172a; }
.rd-zip input { width: 100%; height: 48px; border: 1.5px solid #cbd5e1; border-radius: 10px; padding: 0 14px; font-size: 18px; letter-spacing: 2px; }
.rd-zip input:focus { outline: none; border-color: #0f172a; }
.rd-zip .rd-msg { font-size: 12.5px; color: #b45309; margin-top: 6px; }
.rd-zip .rd-msg:empty { display: none; }
.rd-zip .rd-or { font-size: 12px; color: #64748b; margin: 10px 0 4px; }
@media (max-width: 820px) { #stateselected.rd-start .inner-div { margin-left: auto !important; } }
/* rd2b (Tim 10/20): 3D view / 2D drawing switch at the bottom; viewer controls in a dark 3D Pro panel */
#viewSeg { background: #fff !important; border: 1px solid #e2e8f0 !important; border-radius: 999px !important; padding: 4px !important; box-shadow: 0 6px 18px rgba(15, 23, 42, .12) !important; }
#viewSeg button { border-radius: 999px !important; padding: 8px 16px !important; font-weight: 600 !important; font-size: 13px !important; white-space: nowrap; }
#toolbar { background: #0f172a !important; border: 0 !important; box-shadow: 0 10px 24px rgba(15, 23, 42, .25) !important; }
#toolbar .tb { color: #e2e8f0 !important; background: transparent !important; border-radius: 10px !important; }
#toolbar .tb svg { stroke: currentColor !important; color: currentColor !important; }
#toolbar .tb span { color: #cbd5e1 !important; }
#toolbar .tb:hover { background: rgba(255, 255, 255, .08) !important; color: #fff !important; }
#toolbar .tb.on, #toolbar .tb.active { background: var(--brand, #c8102e) !important; color: #fff !important; }
#toolbar .tb.on span, #toolbar .tb.active span { color: #fff !important; }
#toolbar .div { background: rgba(255, 255, 255, .15) !important; }
/* rd2c: steps keep their full height in the scrolling list; start card sizes to its content */
#sections > .sec { flex-shrink: 0 !important; }
#stateselected.rd-start .inner-div, #stateselected.rd-start .inner-div * { box-sizing: border-box !important; }
#stateselected.rd-start .inner-div { overflow-x: hidden !important; height: auto !important; width: min(430px, calc(100vw - 32px)) !important; }
#stateselected.rd-start h1 { font-size: 28px !important; }
#stateselected.rd-start .inner-div { max-height: none !important; overflow-y: visible !important; }

/* rd3: one 3D / 2D button in the control bar */
body.rd-vs #viewSeg { display: none !important; }
/* rd3c (Tim): in the 2D drawing the control bar stays, with just the 3D view button */
#stage.is-2d #toolbar { display: flex !important; }
#stage.is-2d #toolbar > :not(#tbView) { display: none !important; }

/* rd5 (Tim 10/20): start card colors - dark by default, light or the account's own color */
#stateselected .rd-zip { margin: 12px 0 4px }
.rd-zip label span { font-weight: 500; opacity: .7 }
#stateselected.rd-dark .inner-div { background: var(--rd-card, #0f172a) !important; color: #e2e8f0; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 24px 60px rgba(2, 6, 23, .45) }
#stateselected.rd-light.rd-custom .inner-div { background: var(--rd-card) !important }
#stateselected.rd-dark .inner-div h1 { color: #fff !important }
#stateselected.rd-dark .inner-div p, #stateselected.rd-dark .inner-div label, #stateselected.rd-dark .form-check-label { color: #cbd5e1 !important }
#stateselected.rd-dark .footer-text { color: #94a3b8 !important }
#stateselected.rd-dark .footer-text strong { color: #e2e8f0 !important }
#stateselected.rd-dark .inner-div select, #stateselected.rd-dark .rd-zip input { background-color: rgba(255, 255, 255, .07) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .2) !important; color-scheme: dark }
#stateselected.rd-dark .inner-div select option { color: #0f172a; background: #fff }
#stateselected.rd-dark .rd-zip input::placeholder { color: #64748b }
#stateselected.rd-dark .rd-msg { color: #fca5a5 !important }
#stateselected.rd-dark .form-check-input { background-color: transparent; border-color: rgba(255, 255, 255, .45) }
#stateselected.rd-dark .form-check-input:checked { background-color: var(--brand, #c8102e); border-color: var(--brand, #c8102e) }
#stateselected.rd-dark .design-btn.disabled { background: #334155 !important; color: #94a3b8 !important; border-color: #334155 !important }

/* rd5 (Tim 10/20): special offer bar in 3D Pro's own style - white bar, red tag, countdown chips, dark pill button */
body .tb-ofr { background: #fff; color: #0f172a; border-bottom: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(15, 23, 42, .06) }
body .tb-ofr::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--brand, #c8102e) }
body .tb-ofr-in { gap: 10px; font-weight: 600; letter-spacing: 0 }
body .tb-ofr-lbl { display: inline-flex; align-items: center; background: var(--brand, #c8102e); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px }
body .tb-ofr-sep { display: none }
body .tb-ofr-hl { color: #0f172a; font-size: 18px; font-weight: 800; text-transform: none; text-shadow: none; letter-spacing: -.01em }
body .tb-ofr-ends { font-size: 12px; font-weight: 600; color: #64748b; margin-left: 8px; padding-left: 12px; border-left: 1px solid #e2e8f0 }
body .tb-ofr-cd { gap: 3px; align-items: center; margin-left: 2px }
body .tb-ofr-cd b { font-size: 14px; font-weight: 800; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 6px; min-width: 26px; text-align: center; color: #0f172a }
body .tb-ofr-cd small { font-size: 10px; font-weight: 700; color: #64748b; text-transform: lowercase; opacity: 1; margin-right: 5px }
body .tb-ofr-cd i { display: none }
body .tb-ofr-more { margin-left: 10px; background: #0f172a; color: #fff; text-decoration: none; border-radius: 999px; padding: 6px 14px; font-size: 11.5px; letter-spacing: .03em }
body .tb-ofr-more:hover { background: var(--brand, #c8102e); color: #fff }
@media (max-width: 820px) {
body .tb-ofr-lbl, body .tb-ofr-ends { display: none }
body .tb-ofr-hl { font-size: 14px }
body .tb-ofr-cd b { font-size: 12px; padding: 1px 4px; min-width: 20px }
body .tb-ofr-cd small { font-size: 9px; margin-right: 3px }
body .tb-ofr-more { padding: 4px 10px; font-size: 10px; margin-left: 6px }
}

/* rd5c: start card footer fits inside the card (no scrollbar); dark footer; lean pitches that don't fit */
#stateselected.rd-start .footer-text { margin: 20px -30px -24px !important; padding: 14px 30px !important }
#stateselected.rd-dark .footer-text { background: rgba(255, 255, 255, .04) !important; border-top: 1px solid rgba(255, 255, 255, .08) }
.pitchrad .pr.rd-nofit { opacity: .38; cursor: not-allowed }

/* rd6 (Tim 10/21): new default start-page background (no photo) - navy with a blueprint grid and a red glow.
   Accounts that upload their own background in CRM > 3D Estimator Settings still get their photo (inline style wins). */
#stateselected.overlay2 { background-color: #0b1220; background-image: radial-gradient(1100px 620px at 12% 108%, rgba(200, 16, 46, .38) 0%, rgba(200, 16, 46, 0) 60%), radial-gradient(900px 520px at 100% -10%, rgba(37, 99, 235, .22) 0%, rgba(37, 99, 235, 0) 60%), repeating-linear-gradient(0deg, rgba(148, 163, 184, .07) 0 1px, transparent 1px 44px), repeating-linear-gradient(90deg, rgba(148, 163, 184, .07) 0 1px, transparent 1px 44px), linear-gradient(160deg, #0f1a2e 0%, #0b1220 55%, #090f1b 100%); background-size: cover, cover, auto, auto, cover; background-position: center; background-repeat: no-repeat, no-repeat, repeat, repeat, no-repeat; }
#stateselected.rd-dark .p110-name { color: #ffffff !important; }

/* st2 (10/22 testing): no flash of the old start screen - the platform start screen stays hidden until rd2 has laid it out
   (and a tenant's colored card until its color is applied). Shown anyway after 4s in case the script fails. */
@keyframes st2show { to { visibility: visible; } }
#stateselected[data-platform="1"]:not(.rd-start) { background-image: none !important; }
#stateselected[data-platform="1"]:not(.rd-start) > *, #stateselected:not([data-card=""]):not([data-rd5]) .inner-div { visibility: hidden; animation: st2show 0s 4s forwards; }

/* sb1 (Tim 11/05): specials bar, premium - deep navy glass strip with a soft sheen, the offer in white with the
   number in the brand color, countdown in frosted cells and a white pill button. A tenant's own banner color still
   wins (topbar bn1); light tenant colors get dark text. */
body .tb-ofr { background: radial-gradient(120% 220% at 50% -60%, rgba(255, 255, 255, .10), transparent 55%), linear-gradient(90deg, #0a1426 0%, #12223f 50%, #0a1426 100%); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .06); box-shadow: 0 8px 22px rgba(2, 6, 23, .22) }
body .tb-ofr::before { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 2px; background: linear-gradient(90deg, transparent, var(--brand, #c8102e) 30%, var(--brand, #c8102e) 70%, transparent); opacity: .9 }
body .tb-ofr::after { content: ''; position: absolute; top: 0; bottom: 0; width: 140px; left: -160px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .09), transparent); animation: sb1-sheen 6.5s ease-in-out infinite; pointer-events: none }
@keyframes sb1-sheen { 0%, 62% { left: -160px } 100% { left: 110% } }
@media (prefers-reduced-motion: reduce) { body .tb-ofr::after { animation: none; display: none } }
body .tb-ofr-in { gap: 12px; font-weight: 600; position: relative; z-index: 1 }
body .tb-ofr-lbl { background: linear-gradient(180deg, color-mix(in srgb, var(--brand, #c8102e) 88%, #fff), var(--brand, #c8102e)); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; padding: 5px 11px 5px 10px; border-radius: 999px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand, #c8102e) 22%, transparent), 0 2px 6px rgba(0, 0, 0, .25) }
body .tb-ofr-lbl::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; margin-right: 7px; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: sb1-dot 2.2s ease-out infinite }
@keyframes sb1-dot { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .65) } 70%, 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0) } }
body .tb-ofr-hl { color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -.005em; text-transform: none; text-shadow: none }
body .tb-ofr-hl em { font-style: normal; color: color-mix(in srgb, var(--brand, #c8102e) 55%, #fff); }
body .tb-ofr-ends { font-size: 10.5px; font-weight: 700; color: rgba(255, 255, 255, .6); text-transform: uppercase; letter-spacing: .1em; margin-left: 6px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .14) }
body .tb-ofr-cd { gap: 4px; align-items: center }
body .tb-ofr-cd b { font-size: 13.5px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px; padding: 3px 7px; min-width: 28px; text-align: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); font-variant-numeric: tabular-nums }
body .tb-ofr-cd small { font-size: 9.5px; font-weight: 700; color: rgba(255, 255, 255, .55); text-transform: uppercase; letter-spacing: .06em; margin-right: 6px }
body .tb-ofr-more { margin-left: 6px; background: #fff; color: #0a1426; border: 0; border-radius: 999px; padding: 7px 15px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; text-transform: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transition: background .15s, color .15s, transform .15s }
body .tb-ofr-more:hover { background: var(--brand, #c8102e); color: #fff; transform: translateY(-1px) }
/* a tenant's light banner color: dark text */
body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk) { color: #0f172a; box-shadow: 0 6px 18px rgba(15, 23, 42, .10) }
body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk)::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent) }
body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk) .tb-ofr-hl { color: #0f172a }
body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk) .tb-ofr-hl em { color: var(--brand, #c8102e) }
body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk) .tb-ofr-ends, body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk) .tb-ofr-cd small { color: rgba(15, 23, 42, .6); border-left-color: rgba(15, 23, 42, .15) }
body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk) .tb-ofr-cd b { color: #0f172a; background: rgba(255, 255, 255, .7); border-color: rgba(15, 23, 42, .12) }
body .tb-ofr.tb-ofr-bg:not(.tb-ofr-dk) .tb-ofr-more { background: #0f172a; color: #fff }
@media (max-width: 820px) {
body .tb-ofr-hl { font-size: 14px }
body .tb-ofr-cd b { font-size: 12px; padding: 1px 5px; min-width: 22px }
body .tb-ofr-cd small { font-size: 8.5px; margin-right: 3px }
body .tb-ofr-more { padding: 5px 11px; font-size: 10.5px }
body .tb-ofr::after { display: none }
}

/* es1 (Tim 11/05): estimate summary - two columns: the building (sections with an icon, each line with its price) and
   the estimate (total first, payment split, breakdown, notes). Stacks on phones. */
#sumWrap { background: rgba(2, 6, 23, .55); backdrop-filter: blur(2px); padding: 20px }
#sumWrap #sumCard { width: min(1080px, 100%); max-width: 100%; max-height: min(92vh, 900px); border: 0; border-radius: 16px; background: #f6f7f9; box-shadow: 0 30px 80px rgba(2, 6, 23, .35) }
#sumWrap #sumHead { gap: 14px; padding: 16px 22px; background: #fff; border-bottom: 1px solid #e7e9ee }
#sumWrap #sumHead #sumLogo { max-height: 40px; max-width: 120px; object-fit: contain }
#sumWrap #sumHead .es-ht { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
#sumWrap #sumHead .st { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: #0f172a; text-transform: none }
#sumWrap #sumHead .es-sub { font-size: 12.5px; color: #64748b }
#sumWrap #sumHead .sx { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f1f5f9; color: #475569; font-size: 13px; padding: 0 }
#sumWrap #sumHead .sx:hover { background: #e2e8f0; color: #0f172a }
#sumWrap #sumBody { padding: 18px 22px 20px }
#sumWrap .es-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; align-items: start }
#sumWrap .es-card { background: #fff; border: 1px solid #e7e9ee; border-radius: 14px; padding: 6px 18px 14px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04) }
#sumWrap .es-ct { font-size: 13px; font-weight: 800; color: #0f172a; padding: 12px 0 6px; letter-spacing: .01em }
#sumWrap .es-side { position: sticky; top: 0 }
#sumWrap #sumBody .sumsec { margin: 0; padding: 12px 0 10px; border-top: 1px solid #f0f2f5 }
#sumWrap #sumBody .es-ct + .sumsec { border-top: 0 }
#sumWrap #sumBody .sumsec .sh { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 800; color: #0f172a; text-transform: none; letter-spacing: 0; border: 0; padding: 0 0 6px; margin: 0 }
#sumWrap #sumBody .es-ic { width: 26px; height: 26px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--brand, #c8102e) 10%, #fff); color: var(--brand, #c8102e) }
#sumWrap #sumBody .es-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round }
#sumWrap #sumBody .srow { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; gap: 10px; align-items: baseline; padding: 4px 0 4px 35px; border: 0; font-size: 12.5px }
#sumWrap #sumBody .srow .k { width: auto; color: #64748b; font-weight: 600 }
#sumWrap #sumBody .srow .w { color: #0f172a; font-weight: 600 }
#sumWrap #sumBody .srow .p { color: #0f172a; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap }
#sumWrap #sumBody .sumempty { padding: 2px 0 2px 35px; color: #94a3b8 }
#sumWrap .es-total { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 16px 12px; margin: 2px 0 12px; border-radius: 12px; background: linear-gradient(180deg, color-mix(in srgb, var(--brand, #c8102e) 7%, #fff), color-mix(in srgb, var(--brand, #c8102e) 13%, #fff)); border: 1px solid color-mix(in srgb, var(--brand, #c8102e) 22%, #fff) }
#sumWrap .es-total span { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #64748b }
#sumWrap .es-total b { font-size: 30px; font-weight: 900; letter-spacing: -.02em; color: var(--brand, #c8102e); font-variant-numeric: tabular-nums; line-height: 1.15 }
#sumWrap .es-total small { font-size: 11.5px; color: #64748b }
#sumWrap .es-total-q b { font-size: 19px; color: #0f172a }
#sumWrap .es-pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px }
#sumWrap .es-pay > div { border: 1px solid #e7e9ee; border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px }
#sumWrap .es-pay span { font-size: 11px; color: #64748b; font-weight: 600 }
#sumWrap .es-pay b { font-size: 15px; color: #0f172a; font-variant-numeric: tabular-nums }
#sumWrap .es-lines { border-top: 1px solid #f0f2f5; padding-top: 6px; margin-bottom: 10px }
#sumWrap .es-lines summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 800; color: #0f172a; padding: 6px 0 }
#sumWrap .es-lines summary::-webkit-details-marker { display: none }
#sumWrap .es-lines summary span { font-size: 11.5px; font-weight: 600; color: #94a3b8 }
#sumWrap .es-lines summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; transform: rotate(45deg); margin: -3px 2px 0 8px; transition: transform .15s }
#sumWrap .es-lines[open] summary::after { transform: rotate(-135deg); margin-top: 3px }
#sumWrap .es-lines summary { gap: 8px } .es-lines summary span { margin-left: auto }
#sumWrap .es-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 4px 0; color: #475569 }
#sumWrap .es-line b { color: #0f172a; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap }
#sumWrap .es-line.neg b { color: #15803d }
#sumWrap .es-line.np b { color: #b45309; font-weight: 600 }
#sumWrap .es-line.es-sum { border-top: 1px solid #e7e9ee; margin-top: 6px; padding-top: 8px; font-weight: 800; color: #0f172a }
#sumWrap .es-line.es-sum b { font-size: 14px }
#sumWrap .es-note { font-size: 11.5px; line-height: 1.5; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 9px 11px; margin-bottom: 12px }
#sumWrap .es-k { display: block; font-size: 12px; font-weight: 700; color: #0f172a; margin: 2px 0 6px }
#sumWrap #sumBody #sumNote { margin-top: 0; border-color: #e2e6ec; border-radius: 10px; font-size: 12.5px; min-height: 64px; background: #fbfcfd }
#sumWrap #sumBody .sumdisc { font-size: 10.5px; color: #94a3b8; margin-top: 10px }
#sumWrap #sumFoot { background: #fff; padding: 12px 22px; border-top: 1px solid #e7e9ee; justify-content: flex-end }
#sumWrap #sumFoot .squote { flex: none; min-width: 200px; border-radius: 10px }
@media (max-width: 860px) {
  #sumWrap { padding: 0 }
  #sumWrap #sumCard { max-height: 100vh; height: 100%; border-radius: 0 }
  #sumWrap #sumHead { padding: 12px 16px } #sumWrap #sumBody { padding: 12px 16px 16px }
  #sumWrap .es-grid { grid-template-columns: 1fr }
  #sumWrap .es-side { position: static; order: -1 }
  #sumWrap #sumBody .srow { grid-template-columns: minmax(90px, 38%) 1fr auto; padding-left: 0 }
  #sumWrap #sumBody .sumempty { padding-left: 0 }
  #sumWrap #sumFoot .squote { flex: 1; min-width: 0 }
}

/* es1b: style.css loads after this file, so these rules carry #sumWrap; the two columns stack when the card itself is narrow */
#sumWrap #sumBody { container-type: inline-size }
html body #sumWrap { z-index: 70 } /* above the specials bar (60) so the card header is never under it */
@container (max-width: 700px) {
  #sumWrap .es-grid { grid-template-columns: 1fr }
  #sumWrap .es-side { position: static; order: -1 }
}

/* es2 (Tim 11/05): rep prices in the summary - each one a button that turns into a price box */
#sumWrap #sumBody .srow .p { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px }
#sumWrap .es-pe { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #e2e6ec; background: #fff; color: #0f172a; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 999px; cursor: pointer; white-space: nowrap; line-height: 1.3 }
#sumWrap .es-pe svg { width: 12px; height: 12px; fill: none; stroke: #94a3b8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
#sumWrap .es-pe:hover { border-color: var(--brand, #c8102e); color: var(--brand, #c8102e) }
#sumWrap .es-pe:hover svg { stroke: currentColor }
#sumWrap .es-pe.np { color: #b45309; border-color: #fcd34d; background: #fffbeb; font-weight: 600 }
#sumWrap .es-pr { border: 0; background: none; color: #64748b; cursor: pointer; font-size: 14px; padding: 0 2px; line-height: 1 }
#sumWrap .es-pr:hover { color: var(--brand, #c8102e) }
#sumWrap .es-np { color: #b45309; font-weight: 600 }
#sumWrap .es-ed { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--brand, #c8102e); border-radius: 999px; padding: 1px 3px 1px 9px; background: #fff }
#sumWrap .es-ed .es-dl { color: #64748b; font-weight: 700 }
#sumWrap .es-ed input { width: 86px; border: 0; outline: 0; font: inherit; font-weight: 700; padding: 2px 0; background: transparent; -moz-appearance: textfield }
#sumWrap .es-ed input::-webkit-outer-spin-button, #sumWrap .es-ed input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0 }
#sumWrap .es-ed button { border: 0; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1 }
#sumWrap .es-ed .es-ok { background: var(--brand, #c8102e); color: #fff }
#sumWrap .es-ed .es-x { background: #f1f5f9; color: #475569 }

/* es3 (Tim 11/05): the summary is our own "build sheet" - one column: the building up top (name + big size), the price
   band, then numbered spec cards in two flowing columns (label over value), then notes. No icon rows, no side column. */
#sumWrap #sumCard { width: min(980px, 100%) }
#sumWrap #sumHead { border-bottom: 0; padding-bottom: 6px }
#sumWrap #sumHead .st { font-size: 20px; letter-spacing: -.02em }
#sumWrap #sumBody { padding: 8px 22px 22px; background: #fff }
#sumWrap .bs { display: flex; flex-direction: column; gap: 14px }
#sumWrap .bs-eb { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase }
#sumWrap .bs-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px 22px 18px 26px; border-radius: 14px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--brand, #c8102e) 35%, transparent), transparent 55%), linear-gradient(135deg, #0b1324, #17233b) }
#sumWrap .bs-hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--brand, #c8102e) }
#sumWrap .bs-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07; background-image: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 22px) }
#sumWrap .bs-ttl { position: relative; z-index: 1; min-width: 0 }
#sumWrap .bs-ttl .bs-eb { color: rgba(255, 255, 255, .62) }
#sumWrap .bs-ttl b { display: block; font-size: 24px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px }
#sumWrap .bs-dims { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 10px }
#sumWrap .bs-dims i { font-style: normal; color: rgba(255, 255, 255, .4); font-size: 18px; padding-bottom: 18px }
#sumWrap .bs-dim { text-align: center; min-width: 58px }
#sumWrap .bs-dim b { display: block; font-size: 34px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em }
#sumWrap .bs-dim b em { font-style: normal; font-size: 22px; color: color-mix(in srgb, var(--brand, #c8102e) 70%, #fff); margin-left: 1px }
#sumWrap .bs-dim span { display: block; margin-top: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .62) }
/* price band */
#sumWrap .bs-price { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border: 1.5px dashed color-mix(in srgb, var(--brand, #c8102e) 45%, #e2e8f0); border-radius: 14px; background: color-mix(in srgb, var(--brand, #c8102e) 4%, #fff) }
#sumWrap .bs-tot .bs-eb { color: var(--brand, #c8102e) }
#sumWrap .bs-tot b { display: block; font-size: 28px; font-weight: 900; color: #0f172a; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15 }
#sumWrap .bs-tot small { font-size: 11.5px; color: #64748b }
#sumWrap .bs-price-q .bs-tot b { font-size: 19px }
#sumWrap .bs-price-q p { margin: 0; max-width: 360px; font-size: 12.5px; color: #475569; line-height: 1.45 }
#sumWrap .bs-due { display: flex; gap: 10px }
#sumWrap .bs-due > div { background: #fff; border: 1px solid #e7e9ee; border-radius: 10px; padding: 8px 14px; min-width: 130px }
#sumWrap .bs-due span { display: block; font-size: 11px; color: #64748b; font-weight: 700 }
#sumWrap .bs-due b { font-size: 16px; color: #0f172a; font-variant-numeric: tabular-nums }
#sumWrap .bs-lines { border: 1px solid #e7e9ee; border-radius: 12px; padding: 0 16px; margin-top: -6px }
#sumWrap .bs-lines summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 0; font-size: 12.5px; font-weight: 800; color: #0f172a }
#sumWrap .bs-lines summary::-webkit-details-marker { display: none }
#sumWrap .bs-lines summary span { margin-left: auto; font-weight: 600; color: #94a3b8 }
#sumWrap .bs-lines summary::after { content: '+'; width: 20px; height: 20px; border-radius: 50%; background: #f1f5f9; color: #475569; display: inline-flex; align-items: center; justify-content: center; font-weight: 800 }
#sumWrap .bs-lines[open] summary::after { content: '\2212' }
#sumWrap .bs-lines-b { padding: 0 0 12px; columns: 2 280px; column-gap: 28px }
#sumWrap .bs-lines-b .es-line { break-inside: avoid }
#sumWrap .bs-fine { margin: 8px 0 0; font-size: 11.5px; color: #92400e }
/* spec cards */
#sumWrap .bs .bs-groups.es-card { background: none; border: 0; box-shadow: none; padding: 0; columns: 2 300px; column-gap: 14px }
#sumWrap #sumBody .bs .sumsec { break-inside: avoid; display: block; margin: 0 0 14px; padding: 0; border: 1px solid #e7e9ee; border-radius: 12px; background: #fff; overflow: hidden }
#sumWrap #sumBody .bs .sumsec .sh { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border: 0; border-bottom: 1px solid #f0f2f5; background: #fafbfc; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #334155 }
#sumWrap #sumBody .bs .bs-n { font-size: 11px; font-weight: 900; color: var(--brand, #c8102e); font-variant-numeric: tabular-nums; letter-spacing: 0; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--brand, #c8102e) 10%, #fff) }
#sumWrap #sumBody .bs .bs-rows, #sumWrap #sumBody .bs .sumsec:not(.bs-g) { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; padding: 12px 14px 14px }
#sumWrap #sumBody .bs .sumsec:not(.bs-g) .sh { grid-column: 1 / -1; margin: -12px -14px 0 }
#sumWrap #sumBody .bs .srow { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0; border: 0; min-width: 0; font-size: 13px }
#sumWrap #sumBody .bs .srow .k { width: auto; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8 }
#sumWrap #sumBody .bs .srow .w { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: #0f172a; text-align: left; justify-content: flex-start; overflow-wrap: anywhere }
#sumWrap #sumBody .bs .srow .w:empty { display: none }
#sumWrap #sumBody .bs .srow .p { margin-top: 3px; justify-content: flex-start }
#sumWrap #sumBody .bs .sumempty { padding: 0; color: #94a3b8 }
/* notes */
#sumWrap .bs-notes { border-top: 1px solid #f0f2f5; padding-top: 14px }
@media (max-width: 860px) {
  #sumWrap #sumBody { padding: 6px 14px 16px }
  #sumWrap .bs-hero { padding: 16px 16px 16px 20px }
  #sumWrap .bs-ttl b { font-size: 20px }
  #sumWrap .bs-dim b { font-size: 28px }
  #sumWrap .bs-dims { width: 100%; justify-content: flex-start }
  #sumWrap .bs .bs-groups.es-card, #sumWrap .bs-lines-b { columns: 1 }
  #sumWrap .bs-due { width: 100% } #sumWrap .bs-due > div { flex: 1; min-width: 0 }
}
/* es3b (Tim 11/05): a bigger logo in the Build Sheet header */
#sumWrap #sumHead #sumLogo { max-height: 64px; max-width: 200px; height: auto; width: auto }
@media (max-width: 860px) { #sumWrap #sumHead #sumLogo { max-height: 46px; max-width: 140px } }
#sumWrap #sumHead .es-tname { font-size: 15px; font-weight: 900; color: #0f172a; max-width: 220px; line-height: 1.15 } /* es3c: tenant name when it has no logo */

/* tb2 (Tim 11/24): the view controls are icons on their own - no bar behind them, no words under them. White line icons
   with a dark edge so they read on the scene; the one that is switched on is red. On the white 2D drawing they are dark. */
#stage #toolbar { background: transparent !important; box-shadow: none !important; border: 0 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; gap: 4px !important }
#stage #toolbar .tb, #stage #toolbar .tb:hover, #stage #toolbar .tb.on, #stage #toolbar .tb.active { background: transparent !important; box-shadow: none !important; border: 0 !important; min-width: 58px !important; padding: 6px 7px !important; gap: 4px !important }
#stage #toolbar .tb span { display: block !important; color: #fff !important; font-size: 11.5px !important; font-weight: 700 !important; letter-spacing: .01em; text-shadow: 0 0 2px rgba(15, 23, 42, .95), 0 0 3px rgba(15, 23, 42, .9), 0 1px 2px rgba(15, 23, 42, .8) } /* tb3 (Tim 11/24): the words are back under the icons so people know what each one is */
#stage #toolbar .tb.on span, #stage #toolbar .tb.active span { color: #ff6a62 !important }
#stage.is-2d #toolbar .tb span { color: #0f172a !important; text-shadow: none }
#stage #toolbar .tb svg { width: 29px !important; height: 29px !important; stroke: #fff !important; stroke-width: 1.9 !important; filter: drop-shadow(0 0 1.4px rgba(15, 23, 42, .95)) drop-shadow(0 1px 2px rgba(15, 23, 42, .7)); transition: transform .12s }
#stage #toolbar .tb:hover svg { transform: scale(1.18) }
#stage #toolbar .tb.on svg, #stage #toolbar .tb.active svg { stroke: #ff5148 !important }
#stage #toolbar .tb:disabled svg, #stage #toolbar .tb[disabled] svg { opacity: .45 }
#stage #toolbar .tb:focus-visible { outline: 2px solid #fff; outline-offset: 1px; border-radius: 8px }
#stage #toolbar .div { background: rgba(255, 255, 255, .5) !important; box-shadow: 0 0 2px rgba(15, 23, 42, .6) }
#stage.is-2d #toolbar .tb svg { stroke: #0f172a !important; filter: none }
#stage.is-2d #toolbar .tb.on svg { stroke: var(--brand) !important }
#stage.is-2d #toolbar .div { background: #cbd5e1 !important; box-shadow: none }
