/* /supported-brokers (supported-brokers.php): "does TSB take my broker, and how?" answered by the list itself.
   The one owner of the page's look since 21 Nov (it replaced ~2,100 lines of inline layers). Built like the accepted
   public pages: the site's shell and header, content on the header's edges (--lr-content-width), the help hub's search
   (assets/docs.css), type on the kit's 12/14/16/20/24/32/44, flat rows on hairlines, no frame, no cards. Colours are the
   light public roles (--lz-*, assets/design-system/light.css); the filter plates are the header's own (site-chrome.css). */
body.public-supported-brokers {
    --sb-plate: #eeeef2;  /* the header's current-section plate (--lr-nav-current) */
    --sb-soft: #f4f4f7;   /* the header's hover (--lr-nav-soft) */
    --sb-quiet: #55555f;  /* the header's other sections (--lr-nav-quiet) */
    background: var(--lz-bg, #fff);
    color: var(--lz-text);
}

.sb-page {
    padding-bottom: 64px;
    font-family: var(--lr-font);
}

.sb-wrap {
    width: var(--lr-content-width, min(1400px, calc(100% - 96px)));
    margin-inline: auto;
}

.sb-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.sb-page .lr-icon {
    stroke-width: 1.5;
}

/* ---------- The first screen: the count, how they come in, the search ----------
   Centred on the help hub's model (/docs), Igor's pick of two (21 Nov «норм»; the other stood on the left edge). */
.sb-hero {
    padding: 64px 0 40px;
    text-align: center;
}

.sb-kicker,
.sb-hero h1,
.sb-lead,
.sb-search {
    max-width: 640px;
    margin-inline: auto;
}

.sb-kicker {
    margin-block: 0 16px;
    color: var(--lz-accent);
    font: 600 14px/20px var(--lr-font);
}

.sb-hero h1 {
    margin-block: 0;
    color: var(--lz-text);
    font: 600 44px/48px var(--lr-font);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

/* The lead's two sentences on two lines (they flow on a phone); the title breaks after the count. */
.sb-lead > span {
    display: block;
}

.sb-lead {
    margin-block: 16px 0;
    color: var(--lz-muted);
    font: 400 20px/28px var(--lr-font);
    text-wrap: balance;
}

.sb-search {
    margin-top: 32px;
}

/* Form controls carry .sb-page: public-shell.css gives every button and input on a public page `font: inherit` from a
   stronger selector (body.public-ecosystem-page button), which left the filters at 16/400. */
.sb-page .sb-search input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--lz-line-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--lz-text);
    font: 400 16px/24px var(--lr-font);
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
}

.sb-page .sb-search input::placeholder {
    color: var(--lz-dim);
}

.sb-page .sb-search input:focus-visible,
.sb-page .sb-filter:focus-visible,
.sb-page a:focus-visible {
    outline: 2px solid var(--lz-accent);
    outline-offset: 2px;
}

.sb-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.sb-page .sb-filter {
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--sb-quiet);
    font: 500 14px/20px var(--lr-font);
    cursor: pointer;
    transition: background-color 120ms, color 120ms;
}

.sb-page .sb-filter:hover {
    background: var(--sb-soft);
    color: var(--lz-text);
}

.sb-page .sb-filter.is-active {
    background: var(--sb-plate);
    color: var(--lz-text);
}

/* ---------- The list ---------- */
/* What a search or a chip found, under the search it answers, in its 640 px column (the help hub's "Didn't find it?"). */
.sb-result {
    max-width: 640px;
    margin: 16px auto 0;
    color: var(--lz-muted);
    font: 400 14px/22px var(--lr-font);
}

.sb-result[hidden],
.sb-table[hidden],
.sb-row[hidden] {
    display: none;
}

.sb-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
    align-items: stretch;
    min-height: 56px;
    padding: 12px 0;
    border-bottom: 1px solid var(--lz-line);
}

.sb-row--head {
    min-height: 0;
    padding: 8px 0;
    color: var(--lz-muted);
    font: 500 12px/20px var(--lr-font);
}

/* The list's only structure, the Group head role (DESIGN-SYSTEM §2.3: 16/24/600). */
.sb-row--group {
    min-height: 0;
    padding: 32px 0 8px;
    color: var(--lz-text);
    font: 600 16px/24px var(--lr-font);
}

.sb-row--head + .sb-row--group {
    padding-top: 24px;
}

.sb-row--group > span {
    grid-column: 1 / -1;
}

/* One middle line a row (Igor 21 Nov «по высоте все выровнять»): every cell is the row's full height (their tops meet)
   and centres what it holds, so the logo sits on the middle of its name and method, and the markets and the two marks
   on the same line. */
.sb-source {
    grid-column: span 5;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sb-row--head > :first-child {
    grid-column: span 5;
}

.sb-col-markets {
    grid-column: span 5;
    display: flex;
    align-items: center;
    color: var(--lz-muted);
    font: 400 14px/22px var(--lr-font);
}

.sb-row--head .sb-col-markets {
    font: inherit;
}

.sb-col-mark {
    grid-column: span 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sb-source-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sb-source-name {
    color: var(--lz-text);
    font: 500 14px/22px var(--lr-font);
}

.sb-source-how,
.sb-source-meta {
    color: var(--lz-muted);
    font: 400 12px/20px var(--lr-font);
}

.sb-source-how a,
.sb-link {
    color: var(--lz-accent);
    text-decoration: none;
}

/* A taller hit area on a phone without moving the line (vertical padding on an inline link). */
.sb-source-how a {
    padding-block: 8px;
}

.sb-source-how a:hover,
.sb-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* On a wide screen the markets have their own column; under the name from a tablet down, with how it comes in on a
   phone, where the two columns of marks are gone. */
.sb-source-meta,
.sb-source-ways {
    display: none;
}

.sb-mark {
    display: inline-flex;
    align-items: center;
    height: 22px;
    color: var(--lz-faint);
}

.sb-mark .lr-icon {
    width: 20px;
    height: 20px;
}

/* Ink, not the accent: 150 ticks are not "small accents", and indigo stays for what can be pressed. */
.sb-mark.is-yes {
    color: var(--lz-text);
}

/* A source's real mark on its 32 px tile, the brand map's surfaces (the header's .lr-nav-tile at row size). */
.sb-logo {
    position: relative;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    overflow: hidden;
    border-radius: 6px;
    background: #fff;
}

.sb-logo img {
    width: var(--sb-mark, 20px);
    height: var(--sb-mark, 20px);
    max-width: none;
    object-fit: contain;
}

.sb-logo[data-surface="tile"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sb-logo[data-fit="cover"] img {
    object-fit: cover;
}

.sb-logo[data-surface="dark"] {
    background: #0b0d10;
}

/* One edge on every tile, over the image too (an app icon with a white ground keeps its outline on the white page). */
.sb-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(18, 19, 34, 0.1);
    pointer-events: none;
}

/* A dark mark sits on a white tile, not a grey plate: the plate read as a placeholder beside the full icons. */
.sb-logo:is([data-surface="adaptive"], [data-surface="neutral"], [data-surface="light"]) {
    background: #fff;
    color: var(--lz-muted);
}

/* The brand-coloured carriers (assets/brand-identity.css). */
.sb-logo[data-surface="brand-yellow"] {
    background: #f3ba2f;
}

.sb-logo[data-surface="brand-blue"] {
    background: #123f8c;
}

.sb-logo[data-surface="brand-purple"] {
    background: #7135e8;
}

.sb-logo[data-surface="transparent"] {
    background: transparent;
}

.sb-logo[data-ink="white"] img {
    filter: brightness(0) invert(1);
}

.sb-logo[data-ink="dark"] img {
    filter: brightness(0);
}

.sb-logo .lr-icon {
    width: 20px;
    height: 20px;
}

/* ---------- Not on the list ---------- */
/* Centred under the list on its middle six columns (of 12; of 8 on a tablet), so its edges are on the grid. */
.sb-not-listed {
    width: calc((100% - 11 * 24px) / 12 * 6 + 5 * 24px);
    margin: 32px auto 0;
    text-align: center;
}

.sb-not-listed p {
    margin: 0;
    color: var(--lz-muted);
    font: 400 14px/22px var(--lr-font);
}

.sb-not-listed strong {
    color: var(--lz-text);
    font-weight: 600;
}

.sb-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font: 600 14px/20px var(--lr-font);
}

.sb-link .lr-icon {
    width: 16px;
    height: 16px;
}

/* ---------- Tablet: the markets move under the name ---------- */
/* 8 columns below 900 px of content (DESIGN-SYSTEM §2.1): a 963 px window with its 32 px gutters. */
@media (max-width: 963px) {
    .sb-row {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }

    .sb-source,
    .sb-row--head > :first-child {
        grid-column: span 6;
    }

    .sb-col-markets {
        display: none;
    }

    .sb-source-meta {
        display: block;
    }

    .sb-not-listed {
        width: calc((100% - 7 * 24px) / 8 * 6 + 5 * 24px);
    }
}

/* ---------- Phone: one column; how it comes in and the markets under the name ---------- */
@media (max-width: 640px) {
    .sb-hero {
        padding: 32px 0 24px;
    }

    .sb-hero h1 {
        font-size: 32px;
        line-height: 40px;
    }

    .sb-lead {
        font-size: 16px;
        line-height: 24px;
    }

    .sb-lead > span {
        display: inline;
    }

    .sb-search {
        margin-top: 24px;
    }

    /* Two full rows down to a 343 px column (a 375 px phone, or 390 with a scrollbar), never Crypto alone on a third. */
    .sb-page .sb-filter {
        padding: 0 8px;
    }

    .sb-row {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 16px;
    }

    .sb-row--head,
    .sb-col-mark {
        display: none;
    }

    .sb-source {
        grid-column: 1 / -1;
    }

    .sb-source-ways {
        display: inline;
    }

    .sb-not-listed {
        width: auto;
    }
}
