:root {
    font-family: Inter, Arial, sans-serif;
    color: #243148;
    background: #f4f5f7;
    font-size: 14px;
    --line: #dce2e9;
    --blue: #284b72
}

* {
    box-sizing: border-box
}

body {
    margin: 0
}

header {
    height: 100px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 22px 30px;
    display: flex;
    align-items: center;
    gap: 16px
}

header h1 {
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -.5px;
    margin: 0 0 6px
}

header p {
    margin: 0;
    color: #6c788b
}

.mark {
    background: #203b59;
    color: #fff;
    border-radius: 10px;
    padding: 16px 10px;
    font-size: 16px;
    letter-spacing: 2px
}

header button {
    margin-left: auto
}

button,
select,
input {
    font: inherit;
    border: 1px solid #ccd5df;
    border-radius: 6px;
    background: white;
    padding: 9px 10px;
    color: inherit
}

button {
    cursor: pointer
}

button:hover {
    background: #eaf0f7
}

button[aria-pressed=true] {
    background: #284b72;
    color: white;
    border-color: #284b72
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #c28134;
    outline-offset: 2px
}

main {
    display: grid;
    grid-template-columns: 242px minmax(300px, 1fr) 320px;
    height: calc(100vh - 100px)
}

aside {
    background: #fff;
    overflow: auto;
    padding: 24px 20px
}

.filters {
    border-right: 1px solid var(--line)
}

h2 {
    font-size: 17px;
    line-height: 1.4;
    margin-top: 0
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px
}

input,
select {
    width: 100%;
    font-weight: 400
}

.years {
    display: flex;
    gap: 8px
}

.years label {
    width: 50%
}

.hint {
    font-size: 12px;
    color: #758095;
    line-height: 1.6
}

.workspace {
    min-width: 0;
    display: flex;
    flex-direction: column
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    gap: 10px
}

.toolbar strong {
    font-size: 18px;
    display: block
}

.toolbar span {
    display: block;
    font-size: 11px;
    color: #728097;
    margin-top: 5px
}

.toolbar button {
    padding: 8px;
    font-size: 12px
}

.maptools {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line)
}

.maptools label {
    margin: 0;
    flex: 1;
    font-size: 10px
}

.maptools select {
    font-size: 11px;
    padding: 6px
}

.maptools button {
    padding: 6px
}

#map {
    position: relative;
    flex: 1;
    min-height: 320px;
    background: radial-gradient(ellipse at center, #fff 0, #f1f4f8 100%);
    overflow: hidden
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
    cursor: grab
}

.legend {
    position: absolute;
    bottom: 18px;
    left: 20px;
    padding: 12px 15px;
    background: #ffffffdf;
    border: 1px solid var(--line);
    border-radius: 8px;
    pointer-events: none;
    max-width: 95%
}

.legend span {
    font-size: 11px
}

.legend small {
    font-size: 10px;
    line-height: 1.6;
    color: #6b778b
}

.gradient {
    height: 5px;
    width: 190px;
    background: linear-gradient(to right, hsl(215 55% 55%), hsl(110 55% 55%), hsl(5 55% 55%));
    margin: 7px 0
}

#tooltip {
    position: absolute;
    max-width: 290px;
    background: #1e324b;
    color: white;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    pointer-events: none;
    z-index: 3
}

#empty {
    position: absolute;
    top: 40%;
    text-align: center;
    width: 100%
}

#status {
    padding: 8px 18px;
    font-size: 10px;
    color: #66748a;
    border-top: 1px solid var(--line);
    min-height: 30px
}

.details {
    border-left: 1px solid var(--line);
    line-height: 1.55
}

.details h2 {
    font-size: 20px
}

.details h3 {
    font-size: 12px;
    margin-top: 24px;
    text-transform: uppercase;
    letter-spacing: .7px
}

.details p {
    overflow-wrap: anywhere
}

.details a {
    color: #26619c
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 1.7px;
    color: #8a7250;
    margin-bottom: 16px
}

.chip {
    display: inline-block;
    background: #edf1f6;
    border-radius: 4px;
    padding: 4px 7px;
    margin: 2px;
    font-size: 11px;
    max-width: 100%;
    overflow-wrap: anywhere
}

.details .path {
    font-family: monospace;
    font-size: 11px;
    padding: 8px;
    background: #f4f6f8;
    overflow-wrap: anywhere
}

.stat {
    font-size: 28px;
    font-weight: 600;
    margin: 18px 0 0
}

.details .link {
    display: block;
    text-align: left;
    font-size: 12px;
    width: 100%;
    margin: 5px 0
}

.details summary {
    cursor: pointer;
    font-size: 12px
}

#list {
    overflow: auto;
    flex: 1;
    padding: 15px
}

table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
    background: white
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line)
}

th {
    position: sticky;
    top: 0;
    background: #edf1f6
}

td button {
    border: 0;
    padding: 0;
    text-align: left;
    color: #285c8c
}

td:first-child {
    min-width: 230px
}

.muted {
    color: #7b8798;
    font-size: 12px
}

@media(max-width:1100px) {
    main {
        grid-template-columns: 210px minmax(280px, 1fr)
    }

    .details {
        grid-column: 1/-1;
        border-top: 1px solid var(--line);
        max-height: 450px
    }

    main {
        height: auto
    }

    .workspace {
        height: 750px
    }

    .filters {
        max-height: 750px
    }

    header p {
        font-size: 12px
    }
}

@media(max-width:650px) {
    header {
        padding: 15px;
        height: auto
    }

    .mark {
        display: none
    }

    header h1 {
        font-size: 19px
    }

    header p {
        display: none
    }

    main {
        display: block
    }

    .filters {
        padding: 15px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        max-height: 350px
    }

    .filters h2,
    .filters #facets {
        grid-column: 1/-1
    }

    #facets {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 12px
    }

    .workspace {
        height: 650px
    }

    .toolbar {
        padding: 12px;
        flex-wrap: wrap
    }

    .maptools {
        gap: 5px;
        padding: 8px
    }

    .maptools button {
        font-size: 10px
    }

    .details {
        max-height: none
    }

    .legend {
        left: 10px
    }

    .years {
        margin: 0
    }

    label {
        margin-bottom: 10px
    }
}
