svg { box-sizing: content-box; }
#map { 
    margin-top: 30px;
    position: relative;
    max-width: 900px;
}
#cartogram {
    overflow: visible;
    margin-top: 15px;
    margin-bottom: 30px;
}
#cartogram.inprogress { opacity: .3; }

span.label { font-style: italic; white-space: nowrap; }
span.label.urban { color: var(--grape-dusty); }
span.label.rural { color: var(--eggshell-text); }
span.label::before {
    content: "";
    margin: 0 3px 0 2px;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 6px;
}
span.label.urban::before { background-color: var(--grape); }
span.label.rural::before { background-color: var(--eggshell-dark-muddy); }
span.label.bubble::before { 
    width: 8px;
    height: 8px;
    border: 1px solid var(--grape);
}
span.label.centroid::before { 
    width: 1px;
    height: 1px;
    border: 1px solid var(--carmine); 
    background-color: var(--carmine);
    position: relative;
    top: -4px;
    margin: 0 4px 0 3px;
}
span.label.basemap::before { 
    width: 8px;
    height: 8px;
    border: 1px solid var(--eggshell-dark-muddy);
}

path.region,
path.country {
    fill: none;
    stroke-opacity: .4;
    stroke-width: 1;
    pointer-events: none;
    stroke-linejoin: round;
}
path.region {
    stroke: var(--eggshell-text);
    stroke-width: 1.5;
}
path.country {
    stroke: var(--eggshell-dark-muddy);
    stroke-opacity: .6;
}
path.district { 
    fill: var(--eggshell-muddy);
    fill-opacity: 0;
    stroke: var(--eggshell-dark-muddy);
    stroke-width: .3;
    stroke-opacity: 1;
    stroke-linejoin: round;
    transition: fill-opacity .1s;
    cursor: help;
}
path.district.highlighted {
    fill-opacity: 1;
}
#counties path {
    transition: fill .1s ease-in;
    cursor: help;
}
#counties path.urban { 
    fill: var(--grape);
    stroke: none;
}
#counties path.rural { 
    fill: var(--eggshell-muddy);
    stroke-width: .5;
    stroke: var(--eggshell-dark-muddy);
}
#counties path.highlighted { fill: var(--yellow)!important; }
#highlights { pointer-events: none; }
#highlights path, #highlights circle { 
    fill: var(--yellow);
    stroke: var(--eggshell-dark-muddy);
}
.process svg {
    display: block;
    margin: 0 auto 30px;
}
.process .bubble * { pointer-events: none; }
.bubble circle {
    fill: none;
    stroke-width: 1;
    stroke: var(--grape);
}
.bubble path {
    fill: none;
    stroke: var(--carmine);
}
.bubble path.point {
    stroke-linecap: round;
    stroke-width: 3;
}
.bubble path.trace {
    stroke-width: .5;
}
.process .bubble.highlighted circle {
    fill: var(--grape);
    fill-opacity: .3;
}
.bubbles.colors .bubble circle { stroke: none; }
.bubble circle.total {
    fill: var(--eggshell-wet-muddy);
    stroke-width: 1;
    stroke: var(--eggshell-dark-muddy);
}
.bubble circle.urban {
    fill: var(--grape);
    stroke: none;
}

#map-alternatives svg {
    position: sticky;
    top: 30px;
    display: block;
    margin: 0 auto;
}
#map-alternatives .bubble, #map-alternatives .pie { cursor: help; }
#map-alternatives .bubble.highlighted circle.index { fill: var(--yellow)!important; }
#map-alternatives .bubble.highlighted circle.urban,
#map-alternatives .pie.highlighted .slice.urban { fill: var(--yellow); }
#map-alternatives .bubble.highlighted circle.total { fill: var(--eggshell); stroke: var(--eggshell-muddy); }
#map-alternatives .pie.highlighted .slice.rural { fill: var(--eggshell); }

#details {
    position: absolute;
    top: 35px;
    left: 0;
}
#details form { margin-bottom: 20px; }
#details form *:hover {
    color: var(--eggshell-text);
    cursor: pointer;
}
#details form label { padding-left: 7px; }

#tooltip {
	font-size: 14px;
	font-weight: 400;
	line-height: 16px;
	pointer-events: none; 
	background: #fff;
	color: var(--eggshell-text);
	position: absolute;
	padding: 15px 15px 20px;
    opacity: 0;
	z-index: 1000;
	width: 100%;
	max-width: 200px;
    border: var(--eggshell-dark-muddy) 1px solid;
    border-radius: 5px;
    transition: opacity .25s;
}
#tooltip.visible { opacity: 1; }
#tt-header {
    background-color: #F4F4F2;
    border-bottom: var(--eggshell-dark-muddy) 1px solid;
    border-radius: 5px 5px 0 0;
    padding: 15px 15px 10px;
    margin: -15px -15px 15px;
}
#tooltip.basic { padding-bottom: 0; border-bottom: 0; }
#tooltip.basic #tt-header { border-radius: 5px; margin-bottom: 0; padding-bottom: 15px; background-color: unset; }
#tt-header.blank { margin-bottom: 0; }
#tooltip .tt-name {
    font-family: 'Epilogue', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #59513E;
    margin-bottom: 2px;
}
#tooltip .tt-index {
    margin-top: 5px;
    font-size: 12px;
}
#tooltip .tt-category {
    margin-bottom: 7px;
}
#tooltip .tt-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    font-size: 12px;
    margin-bottom: 0;
}
#tooltip .tt-row.city {
    width: 100%;
    border-bottom: var(--eggshell-muddy) 1px solid;
    padding-bottom: 3px;
    margin-bottom: 5px;
    align-items: flex-end;
}
#tooltip .tt-row.city:last-child { 
    border-bottom: none;
    margin-bottom: 0;
}
#tooltip .tt-row.city .tt-category-value { white-space: nowrap; }
#tooltip #tt-status { font-size: 12px; line-height: 14px; }
#tooltip .tt-urban-list {
    font-size: 12px;
    line-height: 12px;
    margin-top: 3px;
    margin-bottom: 2px;
    font-style: italic;
    color: var(--eggshell-dark-muddy);
}
#tooltip .tt-progress {
    position: relative;
    width: 100%;
    height: 10px;
}
#tooltip .tt-progress::after {
    content: "";
    position: absolute;
    width: 100%;
    top: 5px;
    background-color: #E5E4DF;
    border-bottom: solid 1px #E5E4DF;
    z-index: 1100;
}
#tooltip .tt-bar {
    position: relative;
    height: 10px;
    z-index: 1150;
}
#tooltip .urban .tt-bar { background-color: var(--grape); }
#tooltip .rural .tt-bar { background-color: #C6C3B6; }

#tooltip .tt-index-scale {
    position: relative;
    width: 100%;
    height: 10px;
    margin-bottom: 15px;
}
#tooltip .tt-index-pointer {
    border-right: 1px solid var(--text);
    width: 100%;
    height: 12px;
    position: absolute;
}
#tooltip .tt-row.tt-index .tt-category-value { font-weight: bold; color: var(--text); }
#tooltip .tt-category.tt-index-type .tt-row {
    padding: 0 0 2px;
    border-bottom: var(--eggshell-muddy) 1px solid;
    margin: -5px 0 0;
}
#tooltip .tt-category.tt-index-type:last-child .tt-row { border-bottom: none; }
#tooltip .tt-category.tt-index-type .tt-category-value { font-weight: bold; }
#tooltip .tt-category.tt-index-type.urban .tt-category-value { color: var(--grape); }
#tooltip .tt-category.tt-index-type.rural .tt-category-value { color: var(--carmine); }
#tooltip .tt-category.tt-index-type .tt-category-value em { font-weight: normal; color: var(--eggshell-text); }

#options li.option {
    list-style-type: "\2192";
    padding-left: 7px;
    cursor: pointer;
}
#options li.option::marker { color: var(--eggshell-text); }
#options li.option:hover strong,
#options li.option:hover::marker { color: var(--carmine); }

#options li.option.active {
    list-style-type: "\2192";
    color: var(--text);
    pointer-events: none;
    opacity: 1;
}
#options li.option.active strong { 
    color: var(--eggshell-light); 
    background-color: var(--carmine);
    display: inline-block;
    padding: 0 7px;
    border-radius: 3px;
}
#options li.option.active::marker { color: var(--carmine); }

#credits {
    margin-top: 45px;
    border-top: 1px solid var(--eggshell-muddy);
    padding-top: 25px;
}
#credits p {
    font-size: 14px;
    font-style: italic;
    color: var(--eggshell-text);
    margin-bottom: 6px;
}

.legend path {
    fill: var(--eggshell-dark-muddy);
}
.legend circle {
    fill: none;
    stroke: var(--eggshell-dark-muddy);
}
.legend .label {
    font-size: 12px;
    font-style: italic;
    fill: var(--eggshell-dark-muddy);
}
.legend .refline {
    fill: none;
    stroke: var(--eggshell-muddy);
    stroke-dasharray: 3 2;
    shape-rendering: crispEdges;
}
.floating-label {
    font-size: 13px;
    font-style: italic;
    fill: var(--text);
    stroke: var(--eggshell-light);
	paint-order: stroke;
	stroke-width: 5px;
	stroke-opacity: 1;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 960px) {
    #map { margin-top: 0; }
    #cartogram { margin: 0; }
    #details { top: 20px; }
}
@media (max-width: 860px) {
    #details {
        position: inherit;
        display: flex;
        gap: 75px;
        flex-direction: row;
        justify-content: flex-start;
        margin-bottom: -20px;
    }
    .row {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 25px;
    }
    .row .row-primary { max-width: unset; }
    #map-alternatives { align-self: center; }
}
@media (max-width: 660px) {
    #details { margin-bottom: -20px; }
    #map .legend .label { font-size: 18px; }
    .process svg { margin-top: -15px; }
}
@media (max-width: 660px) {
    .row .row-secondary { max-width: 440px; }
}
@media (max-width: 520px) { 
    #details { margin-bottom: -10px; } 
    .process svg { margin-top: -25px; }
}