/* Trova T91, proposal B: the black head, then one chalk band with the list and a monochrome
   map that runs to the right edge. Pins are black dots; the chosen centre wears the T91 mark. */

.ctr-head {
    padding: clamp(16px, 2vw, 28px) 0 clamp(40px, 5vw, 72px);
}

.ctr-head__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: end;
    gap: 28px clamp(32px, 6vw, 112px);
    margin-top: clamp(16px, 2.4vw, 32px);
}

.ctr-head h1 {
    font-size: clamp(3.2rem, 8.4vw, 7rem);
    line-height: .86;
    letter-spacing: 0;
}

.ctr-head h1 .mark > .br {
    bottom: -.08em;
    height: .2em;
    stroke-width: 8;
}

.ctr-head__side {
    display: grid;
    gap: 18px;
    max-width: 46ch;
}

.ctr-head__side p {
    font-weight: 500;
}

.ctr-head__count {
    display: flex;
    align-items: baseline;
    gap: .55em;
    font-size: 1.125rem;
    font-weight: 700;
}

.ctr-head__count b {
    font-size: 3.4rem;
    line-height: 1;
}

.ctr-head__count .loop > .br {
    inset: -30% -40%;
    width: 180%;
    height: 160%;
}

/* ---------- The chalk band ---------- */

.ctr {
    padding: clamp(28px, 3vw, 44px) 0 clamp(40px, 5vw, 72px);
}

.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: 20px;
    top: 50%;
    margin-top: -.625em;
    pointer-events: none;
}

.ctr__search input {
    width: 100%;
    height: 52px;
    padding: 0 22px 0 52px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--ink);
    color: var(--ink);
    caret-color: var(--ink);
    font-weight: 600;
}

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

.ctr__search input:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

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

.ctr__chip {
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: inset 0 0 0 2px var(--ink);
    color: var(--ink);
    font-size: .9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.ctr__chip:hover {
    background: rgba(12, 12, 12, .07);
}

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

.ctr__near {
    margin-left: auto;
    height: 52px;
}

.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, 76vh, 780px);
    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 {
    padding-bottom: 12px;
    font-size: .9375rem;
    font-weight: 700;
    box-shadow: 0 2px 0 var(--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) transparent;
}

.ctr__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 44px;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 0;
    border-bottom: 1px solid var(--ink-line);
    transition: background-color .2s, color .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-size: 1.1875rem;
    font-weight: 800;
    font-family: var(--fd);
    font-variation-settings: var(--fd-var);
    line-height: 1.05;
    letter-spacing: 0;
}

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

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

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

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

.ctr__go:hover {
    background: rgba(12, 12, 12, .08);
}

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

.ctr__item:hover .ctr__pick b {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: .18em;
}

/* Chosen centre: the row turns black, like a selected chip. */
.ctr__item.is-on {
    padding-left: 16px;
    background: var(--ink);
    color: var(--on-ink);
}

.ctr__item.is-on .ctr__pick span {
    color: inherit;
    opacity: .75;
}

.ctr__item.is-on .ctr__go:hover {
    background: rgba(242, 240, 236, .14);
}

.ctr__empty {
    padding: 24px 0;
    font-weight: 500;
}

.ctr .demo-note {
    margin-top: 20px;
}

/* ---------- 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(--paper-2);
    font-family: var(--f);
}

.ctr__map .leaflet-tile-pane {
    filter: grayscale(1) contrast(1.06) brightness(1.02);
}

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

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

.ctr__map .leaflet-control-zoom a:hover {
    background: #2a2a2a;
}

.ctr__map .leaflet-control-attribution {
    background: rgba(242, 240, 236, .85);
    color: #5c5955;
    font-size: .6875rem;
}

.ctr__map .leaflet-control-attribution a {
    color: #0c0c0c;
}

.ctr-pin {
    border-radius: 999px;
    background: #0c0c0c;
    box-shadow: 0 0 0 3px #f2f0ec;
    transition: transform .2s var(--ease);
}

.ctr-pin:hover {
    transform: scale(1.35);
}

.ctr-pin.is-on {
    display: grid;
    place-items: center;
    color: #f2f0ec;
    box-shadow: 0 0 0 3px #f2f0ec, 0 10px 18px -6px rgba(0, 0, 0, .5);
    animation: ctr-pin-in .45s var(--ease);
}

.ctr-pin.is-on:hover {
    transform: none;
}

.ctr-pin svg {
    width: 72%;
    height: auto;
    fill: currentColor;
}

@keyframes ctr-pin-in {
    from {
        transform: scale(.4);
    }
}

.ctr-me {
    fill: #0c0c0c;
    fill-opacity: .18;
    stroke: #0c0c0c;
    stroke-width: 3;
}

/* ---------- Closing band ---------- */

.ctr-cta {
    padding: var(--sec) 0;
}

.ctr-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: end;
    gap: 32px clamp(32px, 5vw, 80px);
}

.ctr-cta__title {
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    line-height: .86;
    letter-spacing: 0;
}

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

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

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

    .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;
    }
}
