/* The map opens in its own readable workspace; its content keeps Tableau's light palette. */
dialog.abacus-tableau-section {
    position:static;inset:auto;display:block;width:100%;max-width:none;max-height:none;
    margin:0;padding:0;border:0;color:inherit;background:transparent;overflow:visible;
}
dialog.abacus-tableau-section:not([open]) { display:none; }
.abacus-home .abacus-data-section.is-tableau-open { grid-template-columns:minmax(0,1fr);gap:28px; }
.abacus-data-section.is-tableau-open .abacus-section-intro { display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);column-gap:64px;align-items:end; }
.abacus-data-section.is-tableau-open .abacus-section-intro > .abacus-kicker { grid-column:1; }
.abacus-data-section.is-tableau-open .abacus-section-intro h2 { grid-column:1;margin-bottom:0; }
.abacus-data-section.is-tableau-open .abacus-section-intro > p:not(.abacus-kicker) { grid-column:2;grid-row:1 / 3;margin:0; }
.abacus-tableau-section .abacus-tableau-toolbar { display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 24px;padding:0 0 16px;border:0;background:transparent; }
.abacus-tableau-actions { display:flex;align-items:center;justify-content:flex-end;gap:12px 20px;flex-wrap:wrap; }
.abacus-tableau-actions a,.abacus-tableau-expand { font-size:13px;line-height:1.4; }
.abacus-tableau-expand { display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:9px 14px;border:1px solid var(--abacus-rule);border-radius:999px;background:var(--abacus-raised);color:var(--abacus-ink);font-weight:550;cursor:pointer; }
.abacus-tableau-expand:hover { border-color:var(--abacus-ink); }
.abacus-tableau-expand[hidden],.abacus-tableau-stage[hidden],.abacus-tableau-help[hidden] { display:none; }
.abacus-tableau-actions .abacus-tableau-fallback { color:var(--abacus-ink);font-weight:500;text-underline-offset:4px; }
.abacus-tableau-actions .abacus-tableau-fallback::after { content:none; }
.abacus-tableau-section .abacus-tableau-frame[data-tableau-state="loading"],
.abacus-tableau-section .abacus-tableau-frame[data-tableau-state="loaded"] {
    position:relative;display:grid;place-items:center;width:100%;height:clamp(620px,62vw,840px);min-height:0;
    overflow:hidden;padding:0;border:1px solid var(--abacus-rule);border-radius:12px;background:#fff;color:#171717;color-scheme:light;
}
.abacus-tableau-stage { position:absolute;inset:0;display:block;min-width:0;min-height:0;background:#fff;color-scheme:light; }
.abacus-tableau-stage tableau-viz { display:block;width:100%;height:100%;background:#fff; }
.abacus-tableau-frame[data-tableau-state="loading"] .abacus-tableau-stage { opacity:1;pointer-events:none; }
.abacus-tableau-frame[data-tableau-state="loading"] .abacus-tableau-consent h3 { color:#171717; }
.abacus-tableau-frame[data-tableau-state="loading"] .abacus-tableau-consent > p { color:#636360; }
.abacus-tableau-section .abacus-tableau-help { margin:12px 0 0;color:var(--abacus-muted);font-size:13px;line-height:1.5; }
/* A native dialog gives the expanded view focus containment, Escape and a real backdrop. */
dialog.abacus-tableau-section:modal {
    position:fixed;inset:16px;display:flex;flex-direction:column;gap:0;width:calc(100vw - 32px);height:calc(100dvh - 32px);
    max-width:none;max-height:none;margin:0;padding:20px;border:1px solid var(--abacus-rule);border-radius:16px;background:var(--abacus-paper);color:var(--abacus-ink);overflow:hidden;
}
dialog.abacus-tableau-section::backdrop { background:rgba(0,0,0,.72); }
.abacus-tableau-section:modal .abacus-tableau-toolbar { flex-shrink:0; }
.abacus-tableau-section:modal .abacus-tableau-frame[data-tableau-state] { flex:1;min-height:0;height:auto; }
.abacus-tableau-section:modal .abacus-tableau-help { flex-shrink:0; }
@media (max-width:767px) {
    .abacus-data-section.is-tableau-open .abacus-section-intro { display:block; }
    .abacus-data-section.is-tableau-open .abacus-section-intro h2 { margin-bottom:20px; }
    .abacus-tableau-actions { justify-content:flex-start;gap:10px 16px; }
    .abacus-tableau-section .abacus-tableau-frame[data-tableau-state="loading"],
    .abacus-tableau-section .abacus-tableau-frame[data-tableau-state="loaded"] { height:680px;border-radius:8px; }
    dialog.abacus-tableau-section:modal { inset:0;width:100%;height:100dvh;padding:12px;border:0;border-radius:0; }
    .abacus-tableau-section:modal .abacus-tableau-toolbar { padding-bottom:12px; }
}
/* Keep the provider visible while it initializes; hiding its iframe can defer its rendering. */
.abacus-tableau-frame[data-tableau-state="loading"] .abacus-tableau-consent { position:absolute;z-index:2;left:16px;bottom:16px;display:block;width:auto;max-width:calc(100% - 32px);padding:12px 16px;border:1px solid #deded9;border-radius:10px;background:#fff;box-shadow:0 4px 16px #0000000d; }
.abacus-tableau-frame[data-tableau-state="loading"] .abacus-tableau-consent > :not(button) { display:none; }
.abacus-tableau-frame[data-tableau-state="loading"] .abacus-tableau-consent button { min-height:0;margin:0;padding:0;border:0;background:transparent;color:#636360;opacity:1;font-size:13px; }
/* Preserve legible map labels on phones; the wide canvas scrolls inside its own frame. */
.abacus-tableau-stage { overflow:auto;overscroll-behavior-x:contain; }
.abacus-tableau-mobile-note { display:none;margin:0 0 12px;color:var(--abacus-muted);font-size:13px;line-height:1.5; }
.abacus-tableau-mobile-note[hidden] { display:none; }
.abacus-tableau-section:modal .abacus-tableau-mobile-note { flex-shrink:0; }
@media (max-width:1023px) {
    .abacus-tableau-mobile-note:not([hidden]) { display:block; }
}
