@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");

html,
body,
#react-entry-point,
#_dash-app-content {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    background-color: #111111;
}

* {
    box-sizing: border-box;
}

.staging-banner {
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
    padding: 5px 12px;
    border: 1px solid #f59e0b;
    border-radius: 6px;
    background-color: #fbbf24;
    color: #111111;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
    pointer-events: none;
}

.floating-control-panel {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    width: 150px;
    color: #dddddd;
    background-color: rgba(21, 21, 21, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.floating-control-panel summary {
    cursor: pointer;
    list-style: none;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #eeeeee;
    background-color: rgba(35, 35, 35, 0.95);
}

.floating-control-panel summary::-webkit-details-marker {
    display: none;
}

.floating-control-panel summary::before {
    content: "☰ ";
    color: #cccccc;
}

.floating-control-panel[open] {
    width: 190px;
}

.control-sidebar {
    padding: 10px;
    color: #dddddd;
}

.control-sidebar label,
.control-sidebar span {
    color: #dddddd !important;
}

.control-sidebar input {
    accent-color: #cccccc;
}

.type-dropdown .Select-control {
    min-height: 30px;
    height: 30px;
}

.type-dropdown .Select-placeholder,
.type-dropdown .Select-value,
.type-dropdown .Select-value-label {
    line-height: 30px !important;
}

.type-dropdown .Select-menu-outer {
    z-index: 9999;
}

.mobile-map-note {
    display: none;
}

/* Mobile layout: map-only dashboard */
@media screen and (max-width: 900px) {
    .app-shell {
        height: 100dvh !important;
        width: 100vw !important;
        overflow: hidden !important;
    }

    .top-bar {
        height: auto !important;
        min-height: 122px !important;
        padding: 10px 12px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

    .title-block {
        width: 100% !important;
    }

    .type-control {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 4px !important;
    }

    .type-dropdown {
        width: 100% !important;
        max-width: none !important;
    }

    .type-dropdown .Select-control {
        width: 100% !important;
    }

    .mobile-map-note {
        display: block !important;
        color: #aaaaaa;
        font-size: 12px;
        line-height: 16px;
    }

    .dashboard-grid {
        height: calc(100dvh - 122px) !important;
        width: 100vw !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr !important;
        gap: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .daily-panel,
    .scatter-panel {
        display: none !important;
    }

    .map-panel {
        grid-column: 1 !important;
        grid-row: 1 !important;
        height: 100% !important;
        min-height: 0 !important;
        width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .map-graph,
    .map-panel .dash-graph,
    .map-panel .js-plotly-plot,
    .map-panel .plot-container,
    .map-panel .svg-container {
        height: 100% !important;
        width: 100% !important;
    }

    .floating-control-panel {
        right: 10px !important;
        top: auto !important;
        bottom: 12px !important;
        transform: none !important;
        width: 145px !important;
        max-width: calc(100vw - 20px) !important;
    }

    .floating-control-panel[open] {
        width: min(220px, calc(100vw - 20px)) !important;
    }

        /* Mobile map title: keep the title, shrink it, and hide long subtitle lines */
    .map-panel .gtitle {
        display: block !important;
        font-size: 12px !important;
        font-weight: 600 !important;
    }

    .map-panel .gtitle tspan {
        font-size: 12px !important;
    }

    .map-panel .gtitle tspan:nth-child(n+2) {
        display: none !important;
    }

    /* Mobile map legend: move point legend to top-left and make it smaller */
    .map-panel .legend {
        transform: translate(8px, 44px) !important;
    }

    .map-panel .legend text {
        font-size: 9px !important;
    }

    .map-panel .legendtitletext {
        font-size: 10px !important;
    }

    .map-panel .legend .bg {
        fill-opacity: 0.55 !important;
        stroke-opacity: 0.25 !important;
    }

        /* Mobile map hover labels: shrink Plotly hover text */
    .map-panel .hoverlayer .hovertext text {
        font-size: 9px !important;
    }

    .map-panel .hoverlayer .hovertext tspan {
        font-size: 9px !important;
    }

    .map-panel .hoverlayer .hovertext path {
        stroke-width: 1px !important;
    }

    .expand-button {
        display: none !important;
    }
}

.dashboard-panel {
    position: relative;
}

.crime-map-panel {
    display: flex;
    flex-direction: column;
    background: #181818 !important;
}

.crime-map-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 10px 44px 10px 12px;
    border-bottom: 1px solid #333333;
    flex: 0 0 auto;
}

.crime-map-heading {
    color: #bbbbbb;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.crime-map-radio label {
    color: #ffffff !important;
    font-size: 11px;
    margin-right: 10px;
    cursor: pointer;
    white-space: nowrap;
}

.crime-map-radio input {
    margin-right: 4px;
}

.crime-map-graph-container {
    flex: 1;
    min-height: 0;
    width: 100%;
}

.crime-map-panel .expand-button {
    display: block !important;
}

.expand-button {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    background-color: rgba(20, 20, 20, 0.72);
    color: #eeeeee;
    font-size: 15px;
    line-height: 22px;
    cursor: pointer;
}

.expand-button:hover {
    background-color: rgba(60, 60, 60, 0.9);
}

.fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background-color: #111111;
    padding: 10px;
}

.fullscreen-overlay.hidden {
    display: none !important;
}

.fullscreen-header {
    height: 38px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 8px 4px;
    color: #eeeeee;
}

.fullscreen-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    color: #eeeeee;
}

.close-fullscreen-button {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    background-color: rgba(30, 30, 30, 0.9);
    color: #eeeeee;
    font-size: 22px;
    line-height: 24px;
    cursor: pointer;
}

.close-fullscreen-button:hover {
    background-color: rgba(70, 70, 70, 0.95);
}

.fullscreen-graph {
    flex: 1;
    min-height: 0;
    width: 100%;
}
/* =========================================================
   LANDING PAGE
   ========================================================= */

.landing-site-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    color: #ffffff;
    background: #102e5c;
    font-family: "Open Sans", Arial, sans-serif;
}


/* =========================================================
   TOP BANNER
   ========================================================= */

.landing-topbar {
    position: relative;
    z-index: 20;
    width: 100%;
    min-height: 78px;
    background: #ffffff;
    border-bottom: 1px solid rgba(20, 55, 105, 0.12);
    box-shadow: 0 3px 16px rgba(0, 20, 50, 0.12);
}

.landing-topbar-inner {
    width: min(1320px, calc(100% - 64px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}


/* =========================================================
   SEATTLE BRAND LINK
   ========================================================= */

.landing-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #173f79;
    text-decoration: none;
    transition:
        color 160ms ease,
        transform 160ms ease;
}

.landing-brand-link:hover {
    color: #086cae;
    transform: translateY(-1px);
}

.landing-brand-logo {
    display: block;
    width: auto;
    height: 44px;
    max-width: 72px;
    object-fit: contain;
    border: 0;
}

.landing-brand-text {
    color: inherit;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}


/* =========================================================
   RIGHT-SIDE TOP LINKS
   ========================================================= */

.landing-external-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.landing-topbar-link {
    color: #173f79;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition:
        color 160ms ease,
        transform 160ms ease;
}

.landing-topbar-link:hover {
    color: #086cae;
    transform: translateY(-1px);
}

.landing-topbar-divider {
    width: 1px;
    height: 30px;
    background: rgba(23, 63, 121, 0.22);
}

.landing-linkedin-link {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    text-decoration: none;
    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

.landing-linkedin-link:hover {
    opacity: 0.78;
    transform: translateY(-1px);
}

.landing-linkedin-link:focus-visible {
    outline: 2px solid #086cae;
    outline-offset: 4px;
}

.landing-linkedin-logo {
    display: block;
    width: 27px;
    height: 27px;
    object-fit: contain;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
}


/* =========================================================
   HERO BACKGROUND
   ========================================================= */

.landing-hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 78px);
    min-height: calc(100dvh - 78px);
    overflow: hidden;
    display: flex;
    align-items: center;
    background-color: #173f79;
    background-image:
        linear-gradient(
            180deg,
            rgba(29, 80, 154, 0.35) 0%,
            rgba(16, 54, 112, 0.52) 42%,
            rgba(5, 25, 57, 0.85) 100%
        ),
        url("/assets/seattle-hero.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.landing-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 50% 12%,
            rgba(133, 187, 245, 0.24),
            transparent 48%
        );
}

.landing-hero-content {
    width: min(1280px, calc(100% - 64px));
    margin: 0 auto;
    padding: clamp(66px, 9vh, 108px) 0 36px;
}


/* =========================================================
   HERO TITLE AND DESCRIPTION
   ========================================================= */

.landing-intro {
    max-width: 1080px;
    margin: 0 auto;
    text-align: center;
}

.landing-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
    text-align: center;
    text-wrap: balance;
    text-shadow:
        0 3px 14px rgba(0, 0, 0, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.4);
}

.landing-subtitle {
    max-width: 960px;
    margin: 30px auto 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1.02rem, 1.65vw, 1.32rem);
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
    text-wrap: pretty;
    text-shadow: 0 2px 9px rgba(0, 0, 0, 0.35);
}

.landing-inline-link {
    color: #ffffff;
    font-weight: 600;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(255, 255, 255, 0.78);
    text-underline-offset: 4px;
    transition: color 160ms ease;
}

.landing-inline-link:hover {
    color: #d9efff;
}


/* =========================================================
   LANDING-PAGE CARDS
   ========================================================= */

.landing-card-grid {
    width: 100%;
    margin: clamp(56px, 8vh, 88px) auto 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 22px;
}

.landing-card-wrapper {
    display: block;
    min-width: 0;
    height: 100%;
    color: inherit;
    text-decoration: none;
    outline: none;
}

.landing-card {
    position: relative;
    min-height: 320px;
    height: 100%;
    padding: 34px 32px 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(24, 63, 135, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 8px;
    box-shadow: 0 16px 38px rgba(0, 15, 40, 0.30);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        transform 180ms ease,
        background 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.landing-card::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.90);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.landing-card-wrapper:hover .landing-card,
.landing-card-wrapper:focus-visible .landing-card {
    transform: translateY(-6px);
    background: rgba(24, 70, 151, 0.72);
    border-color: rgba(255, 255, 255, 0.58);
    box-shadow: 0 22px 48px rgba(0, 15, 40, 0.42);
}

.landing-card-wrapper:hover .landing-card::after,
.landing-card-wrapper:focus-visible .landing-card::after {
    transform: scaleX(1);
}


/* =========================================================
   CARD ICONS
   ========================================================= */

.landing-card-icon-frame {
    width: 86px;
    height: 86px;
    margin-bottom: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
}

.landing-card-icon-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 0;
    background: transparent;
}


/* =========================================================
   CARD TEXT
   ========================================================= */

.landing-card-title {
    margin: 0;
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1.25;
}

.landing-card-text {
    margin: 16px 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.02rem;
    font-weight: 400;
    line-height: 1.55;
}

.landing-card-link {
    margin-top: auto;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.55);
    text-underline-offset: 5px;
}


/* =========================================================
   DISCLAIMER
   ========================================================= */

.landing-disclaimer {
    max-width: 900px;
    margin: 32px auto 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 960px) {
    .landing-topbar-inner {
        width: min(100% - 40px, 1320px);
    }

    .landing-hero-content {
        width: min(100% - 40px, 1280px);
    }

    .landing-card-grid {
        max-width: 720px;
        grid-template-columns: 1fr;
    }

    .landing-card {
        min-height: 260px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {
    .landing-topbar {
        min-height: auto;
    }

    .landing-topbar-inner {
        width: calc(100% - 30px);
        min-height: auto;
        padding: 15px 0;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .landing-brand-logo {
        height: 38px;
        max-width: 62px;
    }

    .landing-brand-text {
        font-size: 1.35rem;
    }

    .landing-external-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px 16px;
    }

    .landing-topbar-divider {
        display: none;
    }

    .landing-linkedin-link {
        width: 30px;
        height: 30px;
    }

    .landing-linkedin-logo {
        width: 24px;
        height: 24px;
    }

    .landing-hero {
        min-height: calc(100vh - 132px);
        min-height: calc(100dvh - 132px);
        background-position: center center;
    }

    .landing-hero-content {
        width: calc(100% - 30px);
        padding: 55px 0 28px;
    }

    .landing-title {
        font-size: clamp(2.35rem, 11vw, 3.3rem);
        line-height: 1.1;
    }

    .landing-subtitle {
        margin-top: 23px;
        font-size: 1rem;
        line-height: 1.58;
    }

    .landing-card-grid {
        margin-top: 46px;
        gap: 17px;
    }

    .landing-card {
        min-height: 0;
        padding: 28px 24px;
    }

    .landing-card-icon-frame {
        width: 74px;
        height: 74px;
        margin-bottom: 19px;
    }

    .landing-card-title {
        font-size: 1.38rem;
    }

    .landing-card-text {
        font-size: 0.96rem;
    }

    .landing-disclaimer {
        margin-top: 26px;
        font-size: 0.78rem;
    }
}

/* Crime dashboard floating filter dropdowns */
.floating-control-panel {
    overflow: visible !important;
    z-index: 2000 !important;
}

.floating-control-panel .Select {
    width: 100%;
}

.floating-control-panel .Select-control {
    min-height: 36px;
}

.floating-control-panel .Select-menu-outer {
    z-index: 3000 !important;
    max-height: 240px;
    overflow-y: auto;
}

.floating-control-panel .Select-menu {
    max-height: 220px;
}

.floating-control-panel .Select-option {
    color: #111111;
    font-size: 12px;
}

.floating-control-panel .Select-placeholder {
    color: #777777;
}

/* Crime analysis controls occupy normal flow above the visualizations. */
.crime-app-shell { display: flex; flex-direction: column; }
.crime-page-heading {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 8px 12px; color: #bbbbbb; font-size: 11px;
}
.crime-page-heading h1 { margin: 0; font-size: 19px; color: white; }
.crime-analysis-controls {
    display: grid; grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(0, 1fr));
    gap: 12px; padding: 10px 12px; background: #1c1c1c;
    border-block: 1px solid #3b3b3b; flex-shrink: 0;
}
.crime-analysis-controls label {
    display: block; margin-bottom: 6px; color: #dddddd; font-size: 12px; font-weight: 600;
}
.crime-analysis-control { min-width: 0; color: #111111; font-size: 12px; }
.crime-analysis-period-values {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
    color: #fbbf24; font-size: 16px; font-weight: 600;
}
@media screen and (max-width: 1100px) {
    .crime-analysis-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 900px) {
    .crime-app-shell { height: calc(100dvh - 36px) !important; overflow-y: auto !important; }
    .crime-app-shell .crime-dashboard-grid {
        height: auto !important; min-height: 800px; flex: none !important;
        grid-template-rows: 400px 400px !important; overflow: visible !important;
    }
    .crime-app-shell .daily-panel { display: block !important; grid-column: 1 !important; grid-row: 2 !important; }
    .crime-page-heading { flex-wrap: wrap; }
}
@media screen and (max-width: 520px) {
    .crime-analysis-controls { grid-template-columns: minmax(0, 1fr); }
}

/* Compact keyboard-editable dates that read as part of the yellow summary. */
#crime-analysis-period-label {
    display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 5px;
}
.crime-analysis-date-caption { color: #dddddd; font-size: 12px; font-weight: 600; }
.crime-analysis-date-caption + .crime-analysis-date-input { margin-right: 9px; }
.crime-analysis-date-input {
    width: 14ch; min-width: 14ch; flex: 0 0 14ch;
    box-sizing: content-box; padding: 0;
    background: transparent; border: 0; border-bottom: 1px solid transparent;
    border-radius: 0; outline: none; box-shadow: none;
    color: #fbbf24; font: inherit; font-size: 14px; font-weight: 600;
}
.crime-analysis-date-input:hover {
    color: #fcd34d; border-bottom-color: rgba(251, 191, 36, 0.35);
}
.crime-analysis-date-input:focus {
    color: #fde68a; border-bottom-color: #fbbf24;
}

/* Temporary /crime-v1-1 composition. The document owns vertical scrolling. */
html:has(.crime-v11-page) {
    height: auto;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
body:has(.crime-v11-page),
#react-entry-point:has(.crime-v11-page),
#_dash-app-content:has(.crime-v11-page),
.site-shell:has(.crime-v11-page),
#page-content:has(.crime-v11-page) {
    height: auto;
    min-height: 100%;
    overflow: visible !important;
}
html:has(.crime-v11-page .fullscreen-overlay:not(.hidden)) {
    overflow: hidden !important;
}
.crime-v11-page {
    min-height: calc(100dvh - 36px);
    height: auto;
    background: #111111;
    color: #ffffff;
    font-family: Arial, sans-serif;
}
.crime-v11-content { max-width: 1700px; margin: auto; padding: 16px; }
.crime-v11-header { margin-bottom: 16px; }
.crime-v11-header h1 { font-size: 23px; margin: 0 0 8px; }
.crime-v11-header #crime-map-point-window-label { color: #aaaaaa; font-size: 12px; }
.crime-v11-kpi-grid, .crime-v11-primary-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}
.crime-v11-card {
    min-width: 0;
    background: #181818;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 16px;
}
.crime-v11-card-header {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    align-items: center; gap: 10px; margin-bottom: 12px;
}
.crime-v11-card h2 {
    color: #bbbbbb; font-size: 12px; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; margin: 0;
}
.crime-v11-kpi-grid {
    grid-template-columns: minmax(160px, .9fr) minmax(190px, 1.1fr) minmax(0, 2.4fr);
    align-items: stretch;
}
.crime-v11-kpi-grid > .crime-v11-card { padding: 10px 12px; }
.crime-v11-kpi-grid .crime-v11-card-header { min-height: 28px; gap: 4px 8px; margin-bottom: 4px; }
.crime-v11-kpi-grid .crime-v11-card-header h2 { flex: 1; }
.crime-v11-kpi-grid .crime-v11-card-header .crime-v11-radio { flex-wrap: nowrap; }
.crime-v11-kpi-grid .crime-v11-note { margin-top: 4px; line-height: 1.3; }
.crime-v11-kpi-grid .crime-v11-table th,
.crime-v11-kpi-grid .crime-v11-table td { padding: 5px 6px; }
.crime-v11-kpi-grid #crime-v11-count-body,
.crime-v11-kpi-grid #crime-v11-rate-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0 8px;
}
.crime-v11-kpi-grid .crime-v11-kpi-number { font-size: 30px; margin-top: 0; }
.crime-v11-kpi-grid .crime-v11-change { font-size: 18px; margin-top: 0; }
.crime-v11-kpi-grid #crime-v11-count-body > .crime-v11-note,
.crime-v11-kpi-grid #crime-v11-rate-body > .crime-v11-note { grid-column: 1 / -1; }
.crime-v11-subtitle { font-style: italic; }
.crime-v11-section-label {
    margin: 0 0 8px; padding: 8px 12px; background: #181818;
    border: 1px solid #333333; border-radius: 6px;
    color: #bbbbbb; font-size: 12px; font-weight: 600;
}
.crime-v11-response-region {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 16px; align-items: start;
}
.crime-v11-response-kpis { display: grid; gap: 16px; min-width: 0; }
.crime-v11-context-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.crime-v11-context-card { background: #181818; border: 1px solid #333333; }
.crime-v11-context-card h2 { font-size: 11px; }
.crime-v11-context-card .crime-v11-kpi-number { line-height: 40px; margin-top: 3px; }
.crime-v11-context-card .crime-v11-note {
    font-size: 10px; line-height: 14px; color: #888888; font-style: italic; margin-top: 5px;
}
.crime-v11-context-card .crime-v11-note + .crime-v11-note { margin-top: 2px; }
.crime-v11-figure-pair {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
}
.crime-v11-map-card { height: 640px; padding: 0; overflow: hidden; }
.crime-v11-daily-card { height: 640px; padding: 0; }
.crime-v11-kpi-number { font-size: 36px; line-height: 1.2; font-weight: 700; margin-top: 10px; }
.crime-v11-change { font-size: 24px; font-weight: 700; margin-top: 6px; }
.crime-v11-note { color: #999999; font-size: 11px; line-height: 1.5; margin: 12px 0 0; }
.crime-v11-radio { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 11px; }
.crime-v11-radio label { color: #ffffff; cursor: pointer; }
.crime-v11-radio input { margin-right: 4px; }
.crime-v11-response-card > label { display: block; color: #aaaaaa; font-size: 11px; margin-bottom: 8px; }
.crime-v11-ranking-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.crime-v11-ranking-controls label { font-size: 11px; }
.dash-input-container:has(> #crime-v11-ranking-min-events) {
    width: 55px; height: 26px; background: #111111; color: #dddddd;
    border: 1px solid #444444; border-radius: 4px; font-size: 11px;
}
#crime-v11-ranking-min-events {
    width: 100%; padding: 4px; border: none; border-radius: 4px;
}
/* Dash 4 adds stepper buttons to dcc.Input; keep this control a single field. */
.dash-input-container:has(> #crime-v11-ranking-min-events) > .dash-input-stepper {
    display: none;
}
.crime-v11-ranking-panel:not(.fullscreen-overlay) { position: relative; }
.crime-v11-ranking-panel .crime-v11-ranking-header {
    height: auto; min-height: 30px; padding: 0 34px 0 0; flex-shrink: 0;
}
.crime-v11-ranking-panel .expand-button { top: 0; right: 0; }
.crime-v11-ranking-panel.fullscreen-overlay { background: #181818; }
.crime-v11-ranking-panel.fullscreen-overlay .crime-v11-ranking-header { padding: 0 4px 8px; }
.crime-v11-ranking-panel .close-fullscreen-button { flex-shrink: 0; }
.crime-v11-ranking-panel .crime-v11-ranking-controls > span { color: #888888; font-size: 10px; }
.crime-v11-ranking-panel.fullscreen-overlay .crime-v11-ranking-controls { flex-shrink: 0; }
.crime-v11-ranking-panel.fullscreen-overlay #crime-v11-ranking-body {
    flex: 1; min-height: 0; overflow-y: auto;
}
.crime-v11-ranking-panel .crime-v11-multimetric-table th,
.crime-v11-ranking-panel .crime-v11-multimetric-table td {
    width: auto; padding: 7px 6px; color: #dddddd; font-weight: 600;
}
.crime-v11-ranking-panel .crime-v11-multimetric-table th { text-transform: uppercase; font-size: 10px; color: #777777; }
.crime-v11-ranking-panel .crime-v11-multimetric-table td:first-child { color: #888888; }
.crime-v11-ranking-panel .crime-v11-multimetric-table td:nth-child(2) { color: #ffffff; }
.crime-v11-ranking-panel .crime-v11-multimetric-table td:nth-child(n+3) { font-size: 13px; }
.crime-v11-ranking-panel .crime-v11-multimetric-table .crime-v11-ranked-metric { color: #ffffff; font-weight: 700; }
.crime-v11-response-n { color: #777777; font-size: 9px; font-weight: 400; margin-top: 1px; }
.crime-v11-ranking-panel #crime-v11-ranking-body > .crime-v11-note {
    color: #777777; font-size: 9px; line-height: 13px; margin-top: 9px;
}
.crime-v11-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.crime-v11-table th, .crime-v11-table td {
    text-align: right; padding: 10px 6px; border-bottom: 1px solid #333333;
    overflow-wrap: anywhere;
}
.crime-v11-table th { color: #aaaaaa; font-size: 11px; }
.crime-v11-table th:first-child, .crime-v11-table td:first-child { width: 12%; text-align: left; }
.crime-v11-table th:nth-child(2), .crime-v11-table td:nth-child(2) { text-align: left; width: 38%; }
.crime-v11-category-table th, .crime-v11-category-table td { width: 26% !important; text-align: center !important; }
.crime-v11-category-table th:first-child { width: 22% !important; text-align: left !important; }
.crime-v11-display-controls { grid-column: 1 / -1; border: 1px solid #333333; border-radius: 6px; padding: 10px; }
.crime-v11-display-controls summary { cursor: pointer; font-size: 12px; }
.crime-v11-display-controls .control-sidebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.crime-v11-display-controls hr { display: none; }
.crime-v11-display-controls input[type="text"] { max-width: 320px; }
.crime-v11-page .expand-button { display: block !important; }
@media (max-width: 1100px) {
    .crime-v11-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .crime-v11-figure-pair { grid-template-columns: minmax(0, 1fr); }
    .crime-v11-category-card { grid-column: 1 / -1; }
    .crime-v11-response-region { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .crime-v11-content { padding: 10px; }
    .crime-v11-header h1 { font-size: 20px; }
    .crime-v11-kpi-grid { grid-template-columns: minmax(0, 1fr); }
    .crime-v11-context-grid { grid-template-columns: minmax(0, 1fr); }
    .crime-v11-map-card { height: 600px; }
    .crime-v11-daily-card { height: 480px; }
    .crime-v11-card:not(.crime-v11-map-card):not(.crime-v11-daily-card) { padding: 12px; }
}
