/* Prime London glossary — loaded only on pages using [bb_glossary]. */

:root {
    --gloss-ink: #211F1F;
    --gloss-ivory: #f7f5ef;
    --gloss-accent: #A0B100;
    --gloss-rule: rgba(33, 31, 31, 0.12);
    --gloss-muted: rgba(33, 31, 31, 0.62);
}

/* ---------------------------------------------------------------------------
 * Hero: the testimonials ink band (bb-quotes-band carries the ground and the
 * watermark), as on the Stamp Duty calculator.
 * ------------------------------------------------------------------------ */

.bb-gloss-hero.bb-quotes-band {
    padding: 128px 0 72px;
    color: var(--gloss-ivory);
    text-align: center;
}

@media (min-width: 850px) {
    .bb-gloss-hero.bb-quotes-band {
        padding: 160px 0 96px;
    }
}

.bb-gloss-hero .container,
.bb-gloss-section .container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1482px;
    margin: 0 auto;
    padding: 0 30px;
}

@media (min-width: 1540px) {
    .bb-gloss-hero .container,
    .bb-gloss-section .container {
        padding: 0;
    }
}

.bb-gloss-hero .bb-quotes-eyebrow {
    margin-bottom: 26px !important;
}

.bb-gloss-hero .bb-gloss-hero-title {
    margin: 0 auto 20px;
    max-width: none;
    color: var(--gloss-ivory);
}

.bb-gloss-hero .bb-gloss-hero-lead {
    max-width: 40em;
    margin: 0 auto;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(247, 245, 239, 0.6);
}

.bb-gloss-hero .bb-faq-review {
    margin: 28px 0 0;
    font-size: 13px;
    color: rgba(247, 245, 239, 0.6);
}

.bb-gloss-hero .bb-faq-review a,
.bb-gloss-hero .bb-faq-review a:hover {
    color: var(--gloss-ivory) !important;
    text-decoration: underline;
    text-decoration-color: rgba(247, 245, 239, 0.35);
    text-underline-offset: 3px;
}

/* ---------------------------------------------------------------------------
 * The glossary.
 * ------------------------------------------------------------------------ */

.bb-gloss-section {
    padding: 56px 0 88px;
    background: var(--gloss-ivory);
    overflow-x: clip;
}

@media (min-width: 850px) {
    .bb-gloss-section {
        padding: 72px 0 120px;
    }
}

.bb-gloss {
    max-width: 1040px;
    margin: 0 auto;
    color: var(--gloss-ink);
}

.bb-gloss [hidden] {
    display: none !important;
}

/* Tools: search, A-Z and topics, pinned under the site header while the list scrolls. */
.bb-gloss__tools {
    position: sticky;
    top: var(--gloss-header, 68px);
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 24px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gloss-rule);
    background: var(--gloss-ivory);
    transition: border-color 0.2s ease;
}

.bb-gloss__tools::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: var(--gloss-ivory);
    box-shadow: 0 10px 24px rgba(33, 31, 31, 0);
    transition: box-shadow 0.2s ease;
}

.bb-gloss__tools.is-stuck {
    border-bottom-color: transparent;
}

.bb-gloss__tools.is-stuck::before {
    box-shadow: 0 10px 24px rgba(33, 31, 31, 0.08);
}

.bb-gloss__search {
    flex: 1 1 100%;
}

.bb-gloss__az {
    flex: 1 1 100%;
}

.bb-gloss__groups {
    order: 3;
    flex: 1 1 100%;
}

@media (min-width: 850px) {
    .bb-gloss__search {
        flex: 1 1 260px;
    }

    .bb-gloss__az {
        flex: 0 0 auto;
    }
}

.bb-gloss .bb-gloss__search input[type="search"] {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 16px 0 46px !important;
    border: 1px solid rgba(33, 31, 31, 0.2);
    border-radius: 0;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23211F1F' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 16px center;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 16px;
    color: var(--gloss-ink);
    -webkit-appearance: none;
    appearance: none;
}

.bb-gloss .bb-gloss__search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    margin: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%23211F1F' stroke-width='1' viewBox='0 0 10 10'%3E%3Cpath d='M.5.5l9 9M9.5.5l-9 9'/%3E%3C/svg%3E") no-repeat center / 10px 10px;
    cursor: pointer;
}

.bb-gloss .bb-gloss__search input[type="search"]:focus {
    outline: 2px solid var(--gloss-ink);
    outline-offset: 2px;
}

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

.bb-gloss__chip {
    height: 32px;
    padding: 0 13px;
    border: 1px solid rgba(33, 31, 31, 0.2);
    border-radius: 16px;
    background: transparent;
    font-family: "Hanken Grotesk", sans-serif;
    font-size: 13px;
    color: var(--gloss-ink);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bb-gloss__chip:hover {
    border-color: var(--gloss-ink);
}

.bb-gloss__chip.is-active {
    border-color: var(--gloss-accent);
    background: var(--gloss-accent);
    color: #fff;
}

.bb-gloss__chip:focus-visible {
    outline: 2px solid var(--gloss-ink);
    outline-offset: 2px;
}

.bb-gloss__az {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.bb-gloss__az a,
.bb-gloss__az span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 32px;
    font-family: "Larken", serif;
    font-size: 17px;
    text-decoration: none;
}

.bb-gloss__az a {
    color: var(--gloss-ink);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.bb-gloss__az a:hover,
.bb-gloss__az a:focus-visible {
    background: var(--gloss-ink);
    color: var(--gloss-ivory);
}

.bb-gloss__az a.is-current {
    background: var(--gloss-accent);
    color: #fff;
}

.bb-gloss__az span,
.bb-gloss__az a.is-off {
    color: rgba(33, 31, 31, 0.25);
    pointer-events: none;
}

.bb-gloss__empty {
    margin: 40px 0 0;
    font-size: 17px;
}

.bb-gloss .bb-gloss__empty a {
    color: inherit !important;
}

/* One letter: the letter on the left, its terms on the right. */
.bb-gloss__letter {
    display: grid;
    gap: 8px;
    padding-top: 40px;
    scroll-margin-top: calc(var(--gloss-offset, 220px) + 8px);
}

@media (min-width: 850px) {
    .bb-gloss__letter {
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 0 40px;
        padding-top: 56px;
    }
}

.bb-gloss__letter-title {
    margin: 0 !important;
    font-family: "Larken", serif !important;
    font-size: 56px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    color: rgba(33, 31, 31, 0.16) !important;
    transition: color 0.25s ease;
}

.bb-gloss__letter.is-current .bb-gloss__letter-title {
    color: var(--gloss-accent) !important;
}

@media (min-width: 850px) {
    .bb-gloss__letter-title {
        position: sticky;
        top: calc(var(--gloss-offset, 200px) + 24px);
        align-self: start;
        font-size: 72px !important;
    }
}

.bb-gloss__list {
    margin: 0;
}

.bb-gloss__term {
    padding: 24px 0 26px;
    border-bottom: 1px solid var(--gloss-rule);
    scroll-margin-top: calc(var(--gloss-offset, 220px) + 8px);
}

.bb-gloss__term:first-child {
    padding-top: 8px;
}

.bb-gloss__term.is-target {
    animation: bb-gloss-flash 2.4s ease-out 1;
}

@keyframes bb-gloss-flash {
    0%, 30% { background: rgba(160, 177, 0, 0.14); }
    100% { background: transparent; }
}

.bb-gloss__name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin: 0 0 10px;
}

.bb-gloss__name dfn {
    font-family: "Larken", serif;
    font-size: 26px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.2;
}

.bb-gloss__anchor {
    font-size: 16px;
    color: rgba(33, 31, 31, 0.35);
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.bb-gloss__term:hover .bb-gloss__anchor,
.bb-gloss__anchor:focus-visible {
    opacity: 1;
}

.bb-gloss__anchor:hover {
    color: var(--gloss-ink);
}

@media (hover: none) {
    .bb-gloss__anchor {
        opacity: 1;
    }
}

.bb-gloss__tag {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gloss-muted);
}

.bb-gloss__body {
    margin: 0;
}

.bb-gloss__def {
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
}

.bb-gloss__prime {
    margin: 14px 0 0;
    padding-left: 16px;
    border-left: 2px solid var(--gloss-accent);
    font-size: 15px;
    line-height: 1.6;
    color: var(--gloss-muted);
}

.bb-gloss__prime-label,
.bb-gloss__meta-label {
    font-weight: 600;
    color: var(--gloss-ink);
}

.bb-gloss__prime-label::after {
    content: ".";
}

.bb-gloss__meta {
    margin: 14px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gloss-muted);
}

.bb-gloss .bb-gloss__meta a {
    color: var(--gloss-ink) !important;
    text-decoration: underline;
    text-decoration-color: rgba(33, 31, 31, 0.3);
    text-underline-offset: 3px;
}

.bb-gloss .bb-gloss__meta a:hover {
    text-decoration-color: var(--gloss-ink);
}

.bb-gloss__sep {
    margin: 0 10px;
}

.bb-gloss .bb-faq-review {
    margin: 48px 0 0;
    font-size: 13px;
    color: var(--gloss-muted);
}

.bb-gloss .bb-faq-review a,
.bb-gloss .bb-faq-review a:hover {
    color: var(--gloss-ink) !important;
}

/* Mobile: topics and letters as single swipeable rows. */
@media (max-width: 849px) {
    .bb-gloss__tools {
        gap: 8px;
        padding: 10px 0;
    }

    .bb-gloss .bb-gloss__search input[type="search"] {
        height: 42px;
    }

    .bb-gloss__groups,
    .bb-gloss__az {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -30px;
        padding: 0 30px 4px;
        scrollbar-width: none;
    }

    .bb-gloss__groups::-webkit-scrollbar,
    .bb-gloss__az::-webkit-scrollbar {
        display: none;
    }

    .bb-gloss__chip {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .bb-gloss__az a,
    .bb-gloss__az span {
        flex: 0 0 auto;
    }

    .bb-gloss__tag {
        margin-left: 0;
        flex-basis: 100%;
        order: -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bb-gloss__term.is-target {
        animation: none;
    }
}
