/* Brands: the index, the profile, a group's full grid, and "Similar to this" in the open item. */

/* ---------- shared: crumbs, controls, chips ---------- */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: var(--fs-13); color: var(--t3); padding: 32px var(--page-x) 0; }
.crumbs a { color: var(--t2); text-decoration: none; padding: 4px 0; }
.crumbs a:hover { color: var(--t1); }
.crumbs .sl { color: var(--t3); }
.crumbs [aria-current] { color: var(--t1); }
.bhead { padding-bottom: 0; }
.bctl { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.bsearch { display: flex; align-items: center; gap: 10px; height: 40px; width: min(360px, 100%); padding: 0 14px; border-radius: var(--r-ctl); background: var(--s2); color: var(--t3); transition: background var(--dur-quick); }
.bsearch:hover { background: var(--s3); }
.bsearch:focus-within { outline: 2px solid var(--t1); outline-offset: 2px; color: var(--t1); }
.bsearch input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: 0; font-size: var(--fs-14); color: var(--t1); }
.bsearch input::placeholder { color: var(--t3); opacity: 1; }
.bsearch input::-webkit-search-cancel-button { display: none; }
.bfilter { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; }
.bf-l { font-size: var(--fs-12); font-weight: 500; color: var(--t3); padding-top: 8px; width: 48px; flex: none; }
.bf-c { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.bhead + .bwrap, .bidx .bwrap { margin-top: 8px; }
.bgroups-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-bottom: 8px; }

/* ---------- the brands index ---------- */
.bwrap { padding: 24px var(--page-x) 120px; }
.bgrid { position: relative; contain: layout; }
.bcell { position: absolute; left: 0; top: 0; will-change: transform; }
.bcell.static { position: relative; will-change: auto; }
.bcard { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--s1); border-radius: var(--r-card); padding: 8px; transition: background var(--dur-quick) var(--ease-out), box-shadow var(--dur-quick) var(--ease-out); min-width: 0; outline: 0; }
.bcard:hover { background: var(--s2); box-shadow: 0 0 0 1px var(--line-2); }
.bcard:focus-visible { outline: 2px solid var(--t1); outline-offset: 3px; border-radius: var(--r-card); }
.bmark { position: relative; display: block; height: 152px; flex: none; overflow: hidden; border-radius: var(--r-media); background: var(--s2); }
.bmark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.bmark.is-logo { background: var(--c0, #fff); }
.bmark.is-logo img { object-fit: contain; object-position: center; padding: 14%; }
.bgrid:not(.compact) .bcard:not(.row) .bmark { flex: 1 0 152px; }
.bgrid:not(.compact) .bcard:not(.row) .bbody { flex: none; }
.bmark.big { width: 100%; height: auto; aspect-ratio: 1; }
.bbody { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 14px 8px 8px; gap: 6px; }
.btop { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.bname { font: 600 var(--fs-16)/1.25 var(--sans); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bcount { font-size: var(--fs-12); color: var(--t3); font-variant-numeric: tabular-nums; flex: none; }
.bone { flex: none; font-size: var(--fs-13); line-height: 1.45; color: var(--t2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bone .bgroups { color: var(--t3); }
.bfoot { margin-top: auto; min-height: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.kchips { display: flex; flex-wrap: wrap; gap: 0 8px; min-width: 0; font-size: var(--fs-12); color: var(--t3); }
.kchip { white-space: nowrap; }
.kchip + .kchip::before { content: "\00b7"; margin-right: 8px; }
.kchip b { font-weight: 500; color: var(--t2); }
.bsector { font-size: var(--fs-12); color: var(--t3); white-space: nowrap; }
.bidx .bwrap .bnone, .bnf .bnone { padding-top: 48px; }
.bnear { margin-top: -8px; }
.bnear a { text-underline-offset: 3px; }
.bnf .bnone .fixes { margin-top: 8px; justify-content: flex-start; }
.bnf .state.empty { justify-items: start; text-align: left; padding-left: var(--page-x); }
.bnf .state p { max-width: 520px; }
body:has(#view-other:not([hidden])) .bottombar { display: none; }
body:has(#view-other:not([hidden])) .main { padding-bottom: 0; }
.bnf .btn { text-decoration: none; }
.bnf .btn .n { margin-left: 2px; color: inherit; opacity: .7; }

/* narrow: the index becomes a list, mark at the left */
.bgrid.compact .bcard, .bsim .bcard.row { flex-direction: row; }
.bgrid.compact .bmark { width: 104px; height: 100%; }
.bgrid.compact .bbody { padding: 4px 8px 4px 16px; gap: 4px; justify-content: center; }
.bgrid.compact .bone { -webkit-line-clamp: 1; }
.bgrid.compact .bfoot { margin-top: 2px; }
.bgrid.compact .kchip:nth-child(n+3) { display: none; }

/* ---------- the profile ---------- */
.bp { padding-bottom: 120px; }
.bp-head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 24px 24px; align-items: start; padding: 32px var(--page-x) 0; }
.bp-head.has-why { grid-template-columns: 72px minmax(0, 1fr) minmax(300px, 440px); gap: 24px 40px; }
.bp-mark { width: 72px; height: 72px; background: var(--s1); border-radius: var(--r-card); overflow: hidden; }
.bp-mark .bmark { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; }
.bp-id { min-width: 0; }
.bp-id .sentence { font-size: var(--fs-40); line-height: 1.1; letter-spacing: -.03em; max-width: none; }
.bp-one { font-size: var(--fs-16); line-height: 1.5; color: var(--t2); margin-top: 12px; max-width: 40em; text-wrap: pretty; }
.bp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin-top: 16px; font-size: var(--fs-13); color: var(--t3); }
.bp-meta a { display: inline-flex; align-items: center; gap: 5px; color: var(--t2); text-underline-offset: 3px; text-decoration-color: var(--t3); }
.bp-meta a:hover { color: var(--t1); text-decoration-color: var(--t1); }
.bp-meta a .ic { width: 12px; height: 12px; }
.bp-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: var(--fs-13); color: var(--t3); }
.bp-counts .num { font-weight: 500; color: var(--t2); margin-right: -8px; }
.bp-counts .kchips { font-size: var(--fs-13); }
.bp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.bp-ag { margin-top: 16px; font-size: var(--fs-13); color: var(--t3); }
.bp-why { background: var(--s1); padding: 24px; border-radius: var(--r-card); }
.bp-why h2 { font: 500 var(--fs-12)/1 var(--sans); color: var(--t3); margin-bottom: 12px; }
.bp-why p { font-size: var(--fs-16); line-height: 1.55; color: var(--t1); text-wrap: pretty; }
.bp-note { padding: 0 var(--page-x); margin-top: 16px; font-size: var(--fs-14); color: var(--t3); }
.bp-rows { padding: 48px var(--page-x) 0; max-width: 1760px; }
.bp-row { margin-bottom: 48px; }
.bp-row.v-row { padding-top: 0; }
.bp-h .n { font-size: var(--fs-13); font-weight: 400; }
.row-tools { display: inline-flex; align-items: center; gap: 8px; }
.strip-btns { display: inline-flex; gap: 4px; }
.sb { width: 32px; height: 32px; border-radius: var(--r-ctl); background: var(--s2); }
.sb:hover:not(:disabled) { background: var(--s3); }
.sb:disabled { opacity: .35; }
.sb .ic { width: 14px; height: 14px; }
.no-scroll .strip-btns { display: none; }
.row-all { text-decoration: none; }
.bstrip { gap: 24px; scroll-padding: 0 40px; padding-bottom: 16px; }
.bstrip:focus-visible { outline-offset: -2px; border-radius: 6px; }
.bp-row .row-t { height: var(--rh, 196px); }
.bstrip.is-big .row-t { --rh: 300px; max-width: min(520px, 100%); }
.sim-cell { flex: none; display: flex; flex-direction: column; gap: 8px; }
.sim-cell .row-t { max-width: 320px; }
.sim-cap { display: block; width: 0; min-width: 100%; font-size: var(--fs-12); line-height: 16px; color: var(--t3); }
.sim-b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sim-cell:hover .sim-cap { color: var(--t2); }
.more-cell { flex: none; align-self: flex-start; height: var(--rh, 196px); width: 136px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--s1); border-radius: var(--r-media); text-decoration: none; color: var(--t2); font-size: var(--fs-13); transition: background var(--dur-quick), color var(--dur-quick); }
.more-cell b { font: 600 var(--fs-20)/1 var(--sans); color: var(--t1); }
.more-cell:hover { background: var(--s2); color: var(--t1); }
.sim-row .row-t { height: 168px; }
.bp-sim { margin: 0 var(--page-x); padding-top: 24px; }
.bsim { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 24px; margin-top: 4px; }
.bsim .bcell.static { height: 276px; }

/* ---------- a group's full grid ---------- */
.bgv .lede .sentence { max-width: 1100px; }
.bgv .lede .sentence em { font-style: normal; color: var(--t2); }
.bgv .wall-wrap { padding-top: 24px; }

@media (max-width: 1180px) {
  .bp-head.has-why { grid-template-columns: 72px minmax(0, 1fr); }
  .bp-head.has-why .bp-why { grid-column: 1 / -1; max-width: 720px; }
}
@media (max-width: 820px) {
  .bnf .state.empty { padding-left: var(--page-x); }
  .crumbs { padding-top: 16px; }
  .bwrap { padding: 16px var(--page-x) 96px; }
  .bfilter { margin-top: 12px; gap: 12px; margin-inline: calc(var(--page-x) * -1); padding-inline: var(--page-x); overflow-x: auto; scrollbar-width: none; }
  .bfilter .bf-c { flex-wrap: nowrap; }
  .bfilter .chip { flex: none; }
  .bf-l { display: none; }
  .bctl { gap: 12px; margin-top: 16px; }
  .bctl .sel { margin-left: auto; }
  .bp-head, .bp-head.has-why { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding-top: 24px; }
  .bp-mark { width: 56px; height: 56px; border-radius: 14px; }
  .bp-head .bp-why { grid-column: 1 / -1; max-width: none; }
  .bp-id { display: contents; }
  .bp-mark { grid-column: 1; grid-row: 1; }
  .bp-id .sentence { grid-column: 2; grid-row: 1; align-self: center; font-size: 30px; }
  .bp-id .bp-one, .bp-id .bp-meta, .bp-id .bp-counts, .bp-id .bp-chips, .bp-id .bp-ag { grid-column: 1 / -1; margin-top: 0; }
  .bp-meta { gap: 4px 16px; }
  .bp-rows { padding: 32px var(--page-x) 0; }
  .bp-row .row-t { --rh: 150px; }
  .bstrip { gap: 16px; }
  .bstrip.is-big .row-t { --rh: 240px; }
  .more-cell { --rh: 150px; width: 104px; }
  .bp-sim { margin-inline: var(--page-x); }
  .bsim { grid-template-columns: 1fr; gap: 12px; }
  .bsim .bcell.static { height: 116px; }
  .bsim .bcard { flex-direction: row; }
  .bsim .bmark { width: 104px; height: 100%; }
  .bsim .bbody { padding: 4px 8px 4px 16px; gap: 4px; justify-content: center; }
  .bsim .bone { -webkit-line-clamp: 1; }
  .bsim .kchip:nth-child(n+3) { display: none; }
  .strip-btns { display: none; }
  .bgroups-nav { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--page-x) * -1); padding-inline: var(--page-x); scrollbar-width: none; }
  .bgroups-nav .chip { flex: none; }
  .bgv .wall-wrap { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { .bcard, .more-cell { transition: none; } }
