/* The brand top page, the brand list and the brand search (docs/implementation/46-brand-pages-ux-mock.html), on top of
   the shared entity parts (entity-ui.css): the word tile that stands in for a logo, the sections, the initial groups of
   the list with their compact rows, and the places at its end. Sizes are in px (the theme's rem is 10px, 8.8px below
   900px); body 15px, headings 18px, notes 12px, spacing in steps of 8px. */
.tkl-brand-page { box-sizing: border-box; max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; color: var(--tkl-entity-ink, #30252b); font-size: 15px; line-height: 1.7; }
.tkl-brand-page *, .tkl-brand-page *::before, .tkl-brand-page *::after { box-sizing: border-box; }

/* The word tile: the name in letters on one of six soft colours picked from the URL (not the brand's colours; no logos until they are allowed). */
.tkl-brand__head { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; }
.tkl-brand__head .tkl-entity-head { margin-top: 16px; }
.tkl-brand-tile { display: grid; place-items: center; width: 72px; height: 72px; margin-top: 16px; padding: 6px; overflow: hidden; border-radius: 12px; background: var(--tkl-tile, #f6e3e8); text-align: center; }
.tkl-brand-tile span { display: -webkit-box; overflow: hidden; font-size: 12px; font-weight: 700; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.tkl-brand-tile .is-latin { letter-spacing: .02em; }
.tkl-entity-card--brand[style] .tkl-entity-card__media { background: var(--tkl-tile); }
@media (min-width: 768px) { .tkl-brand__head { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; } .tkl-brand-tile { width: 88px; height: 88px; } .tkl-brand-tile span { font-size: 14px; } }

.tkl-brand__line { margin: -8px 0 8px; color: var(--tkl-entity-muted, #6b6168); font-size: 14px; }
.tkl-brand__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0; font-size: 14px; }
.tkl-brand__sub .tkl-icon { width: 18px; height: 18px; flex: 0 0 18px; color: var(--tkl-entity-muted, #6b6168); }
.tkl-brand__fine { margin: 8px 0; color: var(--tkl-entity-muted, #6b6168); font-size: 12px; }
.tkl-brand__acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tkl-brand-section { margin: 32px 0 0; }
.tkl-brand-section__title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding-top: 16px; border-top: 1px solid var(--tkl-entity-line, #e9dde3); font-size: 18px; font-weight: 700; line-height: 1.4; }
.tkl-brand-section__title .tkl-icon { width: 22px; height: 22px; flex: 0 0 22px; color: var(--tkl-entity-accent, #b7354b); }
.tkl-brand-section__title small { color: var(--tkl-entity-muted, #6b6168); font-size: 13px; font-weight: 400; }
.tkl-brand-section__sub { margin: 16px 0 8px; font-size: 15px; font-weight: 700; }
.tkl-brand-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tkl-brand-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--tkl-entity-line, #e9dde3); border-radius: 999px; color: var(--tkl-entity-ink, #30252b); font-size: 14px; text-decoration: none; }
.tkl-brand-links a:hover { border-color: var(--tkl-entity-accent, #b7354b); color: var(--tkl-entity-accent, #b7354b); }
.tkl-brand-description { margin: 0 0 8px; white-space: pre-line; }
.tkl-brand-page .tkl-entity-fold.tkl-brand-section { margin-top: 32px; }
.tkl-brand-page .tkl-dir-price { margin: 8px 0; }

/* The list: the hint under the shared search box, the moving brands, the bar of filters, order and initials, and the initial groups. */
.tkl-brands-search__hint { margin: 4px 0 0; color: var(--tkl-entity-muted, #6b6168); font-size: 12px; }
.tkl-brands-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0 0; }
.tkl-brands-bar .tkl-entity-filterbar { flex: 1 1 auto; margin: 0; }
.tkl-brands-group { margin: 24px 0 0; scroll-margin-top: 72px; }
.tkl-brands-group__title { margin: 0; padding: 4px 0; border-bottom: 2px solid var(--tkl-entity-accent, #b7354b); font-size: 18px; font-weight: 700; line-height: 1.4; }
.tkl-brands-group__note { margin: 4px 0 0; color: var(--tkl-entity-muted, #6b6168); font-size: 12px; }
.tkl-brands-compact { margin: 8px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--tkl-entity-line, #e9dde3); }
.tkl-brands-compact li { border-bottom: 1px solid var(--tkl-entity-line, #e9dde3); }
.tkl-brands-compact a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-height: 44px; padding: 10px 0; color: var(--tkl-entity-ink, #30252b); font-size: 15px; text-decoration: none; }
.tkl-brands-compact a:hover b { color: var(--tkl-entity-accent, #b7354b); }
.tkl-brands-compact small { color: var(--tkl-entity-muted, #6b6168); font-size: 12px; }
.tkl-brands-compact .tkl-brands-count { margin-left: auto; color: var(--tkl-entity-muted, #6b6168); font-size: 12px; }
.tkl-brands-rest { margin: 8px 0 0; }
.tkl-brands-rest > summary { display: flex; align-items: center; gap: 4px; min-height: 44px; color: var(--tkl-entity-accent, #b7354b); font-size: 14px; font-weight: 700; cursor: pointer; list-style: none; }
.tkl-brands-rest > summary::-webkit-details-marker { display: none; }
.tkl-brands-rest[open] > summary .tkl-entity-chev { transform: rotate(180deg); }
.tkl-brands-hint { color: var(--tkl-entity-muted, #6b6168); font-size: 12px; }
@media (min-width: 768px) {
  .tkl-brands-compact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
}

/* Light lists (mock 46 "カード・一覧は軽く"): the brand pages keep the phone's row with an 80px picture from 768px too,
   two and then three to a line, instead of the shared tall cards (most products and posts have no photo yet). */
@media (min-width: 768px) {
  .tkl-brand-page .tkl-entity-cards--rows, #article-brand-section .tkl-entity-cards--rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; border-top: 1px solid var(--tkl-entity-line, #e9dde3); }
  /* Under a post the rows sit in the article's column, so they stay one to a line. */
  #article-brand-section .tkl-entity-cards--rows { grid-template-columns: minmax(0, 1fr); }
  .tkl-brand-page .tkl-entity-cards--rows .tkl-entity-card, #article-brand-section .tkl-entity-cards--rows .tkl-entity-card { border: 0; border-bottom: 1px solid var(--tkl-entity-line, #e9dde3); border-radius: 0; background: none; }
  .tkl-brand-page .tkl-entity-cards--rows .tkl-entity-card > a, #article-brand-section .tkl-entity-cards--rows .tkl-entity-card > a { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 12px; min-height: 96px; padding: 8px 0; }
  .tkl-brand-page .tkl-entity-cards--rows .tkl-entity-card__media, #article-brand-section .tkl-entity-cards--rows .tkl-entity-card__media { width: 80px; height: 80px; aspect-ratio: auto; border-radius: 8px; }
  .tkl-brand-page .tkl-entity-cards--rows .tkl-entity-card__body, #article-brand-section .tkl-entity-cards--rows .tkl-entity-card__body { padding: 0; }
}
@media (min-width: 1024px) {
  .tkl-brand-page .tkl-entity-cards--rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Under a post the article's link colour (#… :where(.art__cont a)) would turn the rows blue; they keep the card's ink. */
#article-brand-section .tkl-entity-card > a { color: var(--tkl-entity-ink, #30252b); }
#article-brand-section .tkl-entity-card > a:hover .tkl-entity-card__title { color: var(--tkl-entity-accent, #b7354b); }
