/* Trova T91, proposal A: blue head like the list pages, then one ink field with the list
   and a dark map that runs to the right edge. Pins are skewed squares; the chosen centre goes yellow, on air. */

.ctr-head {
    background: var(--blue);
    color: var(--white);
    padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 3vw, 40px);
    overflow: hidden;
}

.ctr-head__inner {
    display: grid;
    grid-template-columns: 1fr minmax(0, 420px);
    grid-template-areas: "crumbs crumbs" "title side";
    align-items: end;
    gap: 16px 48px;
}

.ctr-head .crumbs {
    grid-area: crumbs;
}

.ctr-head h1 {
    grid-area: title;
    font-size: clamp(3rem, 8.5vw, 7.5rem);
    line-height: .78;
    margin-bottom: -.04em;
}

.ctr-head__side {
    grid-area: side;
    padding-bottom: 12px;
}

.ctr-head__side p {
    margin: 0;
    color: var(--muted-on-blue);
    font-size: .9375rem;
}

.ctr-head__count {
    margin-bottom: 8px !important;
    color: var(--white) !important;
    font-stretch: 87.5%;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ctr-head__count b {
    margin-right: 4px;
    color: var(--yellow);
    font-size: 2.6rem;
}

/* ---------- The ink field ---------- */

.ctr {
    background: var(--ink);
    color: var(--white);
    padding: clamp(24px, 3vw, 40px) 0 clamp(40px, 5vw, 64px);
}

.ctr__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(20px, 2.4vw, 32px);
}

.ctr__search {
    position: relative;
    flex: 1 1 280px;
    max-width: 420px;
}

.ctr__search .ico {
    position: absolute;
    left: 16px;
    top: 50%;
    margin-top: -.6em;
    color: var(--muted-on-ink);
    pointer-events: none;
}

.ctr__search input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 48px;
    border: 1px solid var(--ink-3);
    border-radius: 0;
    background: var(--ink-2);
    color: var(--white);
    caret-color: var(--yellow);
    font: inherit;
}

.ctr__search input::placeholder {
    color: var(--muted-on-ink);
}

.ctr__areas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ctr__chip {
    min-height: 44px;
    padding: 0 26px 0 16px;
    border: 0;
    background: var(--ink-2);
    color: var(--white);
    font-stretch: 87.5%;
    font-weight: 700;
    font-size: .875rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    transition: background .2s;
}

.ctr__chip:hover {
    background: var(--ink-3);
}

.ctr__chip[aria-pressed="true"] {
    background: var(--yellow);
    color: var(--ink);
}

.ctr__near {
    margin-left: auto;
}

.ctr__near[aria-busy="true"] {
    opacity: .6;
    pointer-events: none;
}

/* List column inside the page grid, map bleeding to the right edge. */
.ctr__body {
    display: grid;
    grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
    gap: clamp(20px, 2.4vw, 36px);
    height: clamp(520px, 74vh, 760px);
    padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}

.ctr__list-wrap {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ctr__status {
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 4px solid var(--white);
    color: var(--muted-on-ink);
}

.ctr__list {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: var(--ink-3) transparent;
}

.ctr__item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 44px;
    align-items: center;
    gap: 8px;
    padding: 2px 4px 2px 0;
    border-bottom: 1px solid var(--ink-3);
    transition: background .2s, padding .3s var(--ease);
}

.ctr__pick {
    display: grid;
    gap: 2px;
    padding: 12px 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ctr__pick b {
    font-stretch: 100%;
    font-weight: 800;
    font-size: 1.375rem;
    line-height: 1;
    text-transform: uppercase;
    transition: color .2s;
}

.ctr__pick span {
    font-size: .875rem;
    color: var(--muted-on-ink);
}

.ctr__pick:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}

.ctr__km {
    font-size: 1.25rem;
    white-space: nowrap;
}

.ctr__go {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: inherit;
    transition: background .2s;
}

.ctr__go:hover {
    background: var(--ink-3);
}

.ctr__go .ico {
    transform: rotate(-45deg);
}

.ctr__item:hover .ctr__pick b {
    color: var(--yellow);
}

/* Chosen centre: a lower-third plate, yellow cap on the left like the ticker's LIVE. */
.ctr__item.is-on {
    padding-left: 18px;
    background: var(--ink-2);
}

.ctr__item.is-on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: var(--yellow);
}

.ctr__item.is-on .ctr__pick b {
    color: var(--yellow);
}

.ctr__empty {
    padding: 24px 0;
    color: var(--muted-on-ink);
}

.ctr__empty a {
    color: var(--white);
}

.ctr .demo-note {
    margin-top: 20px;
    color: var(--muted-on-ink);
}

/* ---------- Map ---------- */

.ctr__map {
    /* Leaflet panes use z-index 400+: keep them in their own stacking context, under the sticky header. */
    position: relative;
    z-index: 0;
    isolation: isolate;
    min-height: 0;
    background: var(--ink-2);
    font-family: var(--f);
}

.ctr__map .leaflet-control-zoom {
    border: 0;
    margin: 0 16px 16px 0;
}

.ctr__map .leaflet-control-zoom a {
    width: 44px;
    height: 44px;
    margin-top: 4px;
    border: 0;
    border-radius: 0 !important;
    background: var(--ink);
    color: var(--white);
    font: 700 1.375rem/44px var(--f);
}

.ctr__map .leaflet-control-zoom a:hover {
    background: var(--ink-3);
}

.ctr__map .leaflet-control-attribution {
    background: rgba(10, 12, 18, .8);
    color: var(--muted-on-ink);
    font-size: .6875rem;
}

.ctr__map .leaflet-control-attribution a {
    color: var(--white);
}

.ctr-pin {
    background: var(--white);
    box-shadow: 0 0 0 2px var(--ink);
    transform: skewX(-12deg);
    transition: transform .2s var(--ease), background .2s;
}

.ctr-pin:hover {
    background: var(--yellow);
}

.ctr-pin.is-on {
    background: var(--yellow);
    box-shadow: 0 0 0 3px var(--ink), 0 10px 18px -6px rgba(0, 0, 0, .6);
    animation: ctr-pin-in .45s var(--ease);
}

@keyframes ctr-pin-in {
    from {
        transform: skewX(-12deg) scale(.3);
    }
}

.ctr-me {
    fill: var(--blue);
    fill-opacity: .35;
    stroke: var(--white);
    stroke-width: 3;
}

/* ---------- Closing field ---------- */

.ctr-cta .sec__head {
    margin-bottom: 0;
}

.ctr-cta h2 {
    font-size: clamp(2.4rem, 5.6vw, 4.6rem);
}

.ctr-cta__side {
    display: grid;
    gap: 24px;
    justify-items: start;
    max-width: 46ch;
}

.ctr-cta__side p {
    margin: 0;
    color: var(--muted-on-blue);
}

.ctr-cta__btns {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
}

@media (max-width: 900px) {
    .ctr-head__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "crumbs" "title" "side";
    }

    .ctr__near {
        margin-left: 0;
    }

    .ctr__body {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "map" "list";
        height: auto;
        padding: 0 var(--gutter);
    }

    .ctr__map {
        grid-area: map;
        height: 56vh;
        min-height: 320px;
        margin-inline: calc(var(--gutter) * -1);
    }

    .ctr__list-wrap {
        grid-area: list;
    }

    .ctr__list {
        overflow: visible;
    }

    .ctr__areas {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: calc(100% + var(--gutter));
        margin-right: calc(var(--gutter) * -1);
        padding-right: var(--gutter);
        scrollbar-width: none;
    }

    .ctr__areas::-webkit-scrollbar {
        display: none;
    }

    .ctr__chip {
        flex: none;
    }

    .ctr__search {
        max-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ctr-pin.is-on {
        animation: none;
    }
}
