body { height:100vh; height:100dvh; }
.udvar-popup-header,.sandbox-sources { box-sizing:border-box; font-family:"IBM Plex Sans","Segoe UI",Arial,sans-serif; }
.sandbox-switch { display:inline-flex; gap:3px; padding:3px; border:1px solid #668297; border-radius:6px; background:#162b3b; }
.sandbox-switch button { min-height:36px; padding:7px 12px; border:0; border-radius:3px; background:transparent; color:#fff; font:inherit; font-size:14px; cursor:pointer; }
.sandbox-switch button[aria-pressed="true"] { color:#142334; background:#f1cb74; font-weight:700; }
.sandbox-story button:focus-visible,.sandbox-story a:focus-visible { outline:3px solid #b27b22; outline-offset:3px; }
#tour-main { height:100%; min-height:0; min-width:0; }
.object-popup-content.sandbox-story,.exhibit-popup-content.sandbox-story { padding:0; container:udvar-popup / inline-size; }
/* Share the existing title/close row; reserve the rightmost 70px for the native X. */
.sandbox-story .udvar-popup-header { position:sticky; top:0; z-index:3; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px; min-height:72px; margin:0; padding:12px 70px 12px 28px; background:#1d2529; border-bottom:1px solid #C96F43; }
.sandbox-story .udvar-popup-header h2 { position:static; display:block; min-height:0; margin:0 !important; padding:0 !important; background:none !important; color:#fff !important; border:0 !important; font:600 clamp(20px,2vw,28px)/1.18 "IBM Plex Sans Condensed","Segoe UI",sans-serif !important; overflow-wrap:anywhere; }
.udvar-popup-header .sandbox-switch { align-self:start; white-space:nowrap; }
.sandbox-story .udvar-popup-body { padding:24px 28px 32px; }
.sandbox-story .udvar-popup-body > .sandbox-overview { margin:0 auto 18px; }
.sandbox-story .sandbox-overview { max-width:1000px; font-size:clamp(18px,2vw,22px) !important; line-height:1.6 !important; }
.sandbox-story[data-reading-level="overview"] .udvar-hero { margin-top:24px !important; }
.sandbox-sources { max-width:1000px; margin:24px auto 0; padding:20px 0 0; border-top:1px solid #bdc9d0; }
.sandbox-sources h3 { color:#142334; margin:0 0 8px; font-size:18px; }
.sandbox-story .sandbox-sources p { color:#4e5b64 !important; font-size:13px !important; line-height:1.5 !important; }
.sandbox-sources a { display:inline-block; margin:4px 16px 8px 0; }
@media(max-width:720px) {
 .sandbox-switch button { min-height:36px; padding:6px 12px; }
 .sandbox-story .udvar-popup-body { padding:20px 16px 24px; }
}
.exhibit-popup-content.sandbox-story > .udvar-popup-body { padding:24px 28px 32px !important; }
@media(max-width:720px) { .exhibit-popup-content.sandbox-story > .udvar-popup-body { padding:20px 16px 24px !important; } }
@container udvar-popup (max-width:540px) {
 .sandbox-story .udvar-popup-header { gap:10px; padding-left:16px; }
 .udvar-popup-header .sandbox-switch { flex-direction:column; gap:2px; padding:2px; }
 .udvar-popup-header .sandbox-switch button { min-height:30px; padding:4px 8px; font-size:12px; }
}
/* The live tag style's percentage cap collapses its auto-sized label. */
.tag div,.tag p { max-width:none !important; }
.sandbox-story .udvar-hero { max-width:1000px; margin:0 auto 28px !important; padding:0 !important; }
.sandbox-story .udvar-hero img { display:block; max-width:100% !important; max-height:48vh !important; object-fit:contain; margin:0 auto !important; }
.sandbox-story .udvar-hero figcaption { padding:8px 0 0; text-align:center; font-size:12px; line-height:1.5; color:#52616b; }
.sandbox-story .udvar-article { max-width:850px; margin:0 auto; padding:0 !important; }
.sandbox-story .udvar-deck { margin:0 0 30px !important; padding:0 0 24px !important; border-bottom:1px solid #c6c9c8; font-size:clamp(19px,2vw,23px) !important; line-height:1.65 !important; color:#354956 !important; }
.sandbox-story .udvar-chapter { margin:30px 0 !important; padding:0 !important; }
.sandbox-story .udvar-chapter h3,.sandbox-story .udvar-connections h3 { padding:0 !important; margin:0 0 14px !important; font:600 clamp(23px,2.4vw,29px)/1.2 "IBM Plex Sans Condensed","Segoe UI",sans-serif !important; color:#193547 !important; background:none !important; border:0 !important; }
.sandbox-story .udvar-chapter p { padding:0 !important; margin:0 0 17px !important; font-size:18px !important; line-height:1.75 !important; color:#283c49 !important; text-align:left !important; }
.sandbox-story .udvar-picture { min-width:0; margin:0 !important; padding:0 !important; }
.sandbox-story .udvar-picture img { display:block; width:100% !important; max-width:100% !important; height:auto; max-height:440px; object-fit:contain; background:#e5e3dd; margin:0 !important; border:0 !important; }
.sandbox-story .udvar-picture figcaption { margin:0; padding:12px 0 0; font-size:14px; line-height:1.5; color:#344958; }
.sandbox-story .udvar-picture figcaption span { display:block; margin-top:6px; font-size:11px; color:#52616b; }
.sandbox-story .udvar-picture a,.sandbox-story .udvar-hero a,.sandbox-story .sandbox-sources a { color:#195475 !important; text-decoration:underline; text-underline-offset:3px; }
.sandbox-story .udvar-archive { padding:0 !important; margin:30px 0 38px !important; }
.sandbox-story .udvar-connections { padding-top:26px; margin-top:32px; border-top:1px solid #c6c9c8; }
.sandbox-story .udvar-gallery { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr)); gap:24px; padding:0 !important; }
.sandbox-story .udvar-gallery img { height:220px; }
.sandbox-story .sandbox-sources { max-width:850px; }
.sandbox-story .sandbox-sources a { display:block; font-size:14px; line-height:1.5; margin:8px 0; }
.sandbox-story .object-credit { max-width:850px; margin:26px auto 0 !important; padding:10px 14px !important; font-size:12px !important; line-height:1.5 !important; }
@media(max-width:600px) {
 .sandbox-story .udvar-chapter p { font-size:17px !important; line-height:1.65 !important; }
 .sandbox-story .udvar-gallery { grid-template-columns:1fr; }
 .sandbox-story .udvar-hero img { max-height:36vh !important; }
}
