/* ==========================================================================
   /Compare/{Brand}/ - the per-brand comparison landing
   Layered over tyres-for.css (the tf- shell) and compare-hub.css (the cmp-
   cards, tables and record chips). Only what is new here carries .cbl-.
   ========================================================================== */

/* --- Hero: logo chip beside the title, washed in the brand colour ---------- */

.cbl-headgrid {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    margin-top: 14px;
}

/* The source logos are drawn for white; the chip gives them one, with the
   brand's own colour as a quiet signature underneath. */
.cbl-logochip {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    min-height: 74px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 12px;
    border-bottom: 4px solid var(--cbl-bc, var(--tf-cyan, #0db1e7));
}

.cbl-logochip img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60px;
    object-fit: contain;
}

.cbl-headmain { min-width: 0; flex: 1 1 auto; }
.cbl-headmain .tf-head__title { margin-top: 0; }

/* The verdict list carries the reading beside the link; three cells wide
   once there is room. The reading is a sentence, not a score, so it wraps
   and drops the mono weight. */
.cbl .tf-verdict__list li { grid-template-columns: 1fr; }
.cbl .tf-verdict__score {
    white-space: normal;
    font-family: inherit;
    font-weight: 400;
    font-size: 0.88rem;
    color: var(--tf-muted-on-ink, #b9c2cc);
}

@media screen and (min-width: 720px) {
    .cbl .tf-verdict__list li {
        grid-template-columns: 170px max-content minmax(0, 1fr);
        align-items: center;
    }
}

@media screen and (max-width: 640px) {
    .cbl-headgrid { flex-direction: column; gap: 14px; }
    .cbl-logochip { width: 128px; min-height: 62px; }
}

/* --- Empty state ------------------------------------------------------------ */

.cbl-routes {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.cbl-routes a {
    display: block;
    padding: 12px 16px;
    border: 1px solid var(--tf-line, #dfe4e9);
    border-radius: 6px;
    background: #fff;
    text-decoration: none;
    font-weight: 600;
}

.cbl-routes a:hover { border-color: var(--tf-cyan, #0db1e7); }

/* --- Rival strip ------------------------------------------------------------ */

.cbl-rivals {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.cbl-rival {
    display: grid;
    gap: 4px;
    padding: 14px 16px 12px;
    background: #fff;
    border: 1px solid var(--tf-line, #dfe4e9);
    border-radius: 6px;
    transition: border-color 0.15s;
}

.cbl-rival.is-active { border-color: var(--tf-cyan, #0db1e7); box-shadow: inset 0 0 0 1px var(--tf-cyan, #0db1e7); }

a.cbl-rival__name,
a.cbl-rival__name:link,
a.cbl-rival__name:visited {
    color: var(--tf-text, #1a2027);
    font-weight: 700;
    text-decoration: none;
    line-height: 1.3;
}

a.cbl-rival__name:hover { color: var(--tf-cyan, #0db1e7); }
.cbl-rival__name i { font-style: normal; color: var(--tf-muted, #5d6a75); font-weight: 400; padding: 0 3px; }

.cbl-rival__meta,
.cbl-rival__rec {
    font-family: var(--tf-mono);
    font-size: 0.78rem;
    color: var(--tf-muted, #5d6a75);
}

.cbl-rival__rec { color: var(--tf-text, #1a2027); }
.cbl-rival__rec--none { color: var(--tf-muted, #5d6a75); }

/* The rivals past the twelfth card, as a chip row. */
.cbl-rivals__rest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 16px 0 0;
    font-size: 0.85rem;
    color: var(--tf-muted, #5d6a75);
}

.cbl-rivals__rest > span { margin-right: 4px; }
.cbl-rivals__rest .tf-chip { text-decoration: none; }
.cbl-rivals__rest .tf-chip b { font-family: var(--tf-mono); font-weight: 600; margin-left: 4px; color: var(--tf-muted, #5d6a75); }

/* The filter control only means anything with JavaScript, which reveals it. */
.cbl-rival__filter {
    display: none;
    justify-self: start;
    margin-top: 6px;
    padding: 4px 10px;
    border: 1px solid var(--tf-line, #dfe4e9);
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--tf-muted, #5d6a75);
    cursor: pointer;
}

.cbl.has-js .cbl-rival__filter { display: inline-flex; }
.cbl-rival__filter:hover,
.cbl-rival__filter[aria-pressed="true"] {
    border-color: var(--tf-cyan, #0db1e7);
    color: var(--tf-cyan, #0db1e7);
}

.cbl-filternote {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 16px 0 0;
    font-size: 0.9rem;
    color: var(--tf-text, #1a2027);
}

.cbl-filternote__clear {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    color: var(--tf-cyan, #0db1e7);
    text-decoration: underline;
    cursor: pointer;
}

/* --- Season tables ------------------------------------------------------------ */

.cbl-count {
    font-family: var(--tf-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tf-muted, #5d6a75);
    margin-left: 8px;
    vertical-align: middle;
}

.cbl-table { min-width: 820px; }

.cbl-table__them a,
.cbl-table__them a:link,
.cbl-table__them a:visited {
    color: var(--tf-text, #1a2027);
    text-decoration: none;
}

.cbl-table__them a:hover { color: var(--tf-cyan, #0db1e7); }

/* The record chip from the brand's side: the brand ahead reads as the site's
   emphasis colour, the rival ahead reads as plain text. Neither is red. */
.cmp-rec--me b { color: var(--tf-cyan-ink, #0a7ba3); }

.cbl-table__empty {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: var(--tf-muted, #5d6a75);
}

/* Filtered rows leave the table; the rank column keeps its numbers so a row
   still says where it stood in the full list. */
.cbl-table tr.is-filtered { display: none; }

/* The expander leaves rank numbering alone but hides rows past the cut; an
   active filter reveals them all so no match is hidden by the fold. */
.cbl .tsz-collapse.is-filtering tr.tsz-more { display: table-row; }
.cbl .tsz-collapse.is-filtering .tsz-showall { display: none; }
