/* Brand pages (#380): single-brands.php and archive-brands.php, the Front Porch "brand" page
   (reports/site-concepts/frontporch/fp-b.html). Reads tokens.css; shared pieces (.sh, .crumbs, .btn, .add, .price,
   .kick, .tag, .ci, .empty, .pager) come from shell.css, and the product listing's (filters, toolbar, grid) from
   category.css, which brand pages load too. Breakpoints follow the shell: 1100, 960, 560. */

/* ---------- header band ---------- */
.br-top{background:var(--mist);border-bottom:1px solid var(--line)}
.br-top .crumbs ol{padding-bottom:6px}
.br-h{display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,340px);gap:24px 32px;align-items:center;padding:6px 0 32px}
.br-h.no-best{grid-template-columns:auto minmax(0,1fr)}
.br-h.no-logo{grid-template-columns:minmax(0,1fr) minmax(0,340px)}
.br-h.no-logo.no-best{grid-template-columns:minmax(0,1fr)}
.br-logo{width:136px;height:136px;background:var(--white);border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;padding:12px}
.br-logo img{max-width:100%;max-height:100%;object-fit:contain}
.br-h h1{font-size:clamp(2.4rem,4.4vw,3.4rem)}
.br-line{font-size:1.08rem;margin-top:10px;max-width:60ch}
.br-rm{font-weight:700;white-space:nowrap;text-decoration:underline;text-underline-offset:3px}
.br-facts{display:flex;flex-wrap:wrap;gap:6px 22px;margin-top:12px;font-size:.92rem;color:var(--muted)}
.br-facts b{color:var(--navy)}
.br-admin{margin-top:14px;display:inline-block;background:var(--mist-2);border:1px solid var(--brick);color:var(--brick);border-radius:4px;padding:6px 12px;font-size:.88rem;font-weight:600}
/* No best seller (.no-best: every brand while it's switched off, owner's preview note 113, 2026-11-19): on wide windows
   the brand's line sits beside its name, in the room the card had, so the band has no empty right side; the name, its
   kicker and facts are centred on the line (the 1fr rows take what the line's extra height leaves). At 960 px and under
   the hero is stacked as it always was (scoped by width: on phones .br-ht is display:contents). */
@media (min-width:961px){
.br-h.no-best:not(.no-line) .br-ht{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);grid-template-rows:1fr auto auto auto auto 1fr;column-gap:40px}
.br-h.no-best:not(.no-line) .br-ht>.kick{grid-area:2/1}
.br-h.no-best:not(.no-line) .br-ht>h1{grid-area:3/1}
.br-h.no-best:not(.no-line) .br-ht>.br-facts{grid-area:4/1}
.br-h.no-best:not(.no-line) .br-ht>.br-admin{grid-area:5/1;justify-self:start}
.br-h.no-best:not(.no-line) .br-ht>.br-line{grid-area:1/2/-1;align-self:center;margin-top:0;max-width:68ch}
}
/* The best seller card: kept for the switch (hwb_brand_page_best_seller_shown()); drawn only while it's on. */
.br-best{display:grid;grid-template-columns:78px minmax(0,1fr);gap:6px 14px;align-items:center;background:var(--white);border:1px solid var(--line);border-radius:8px;padding:14px 16px 14px 14px}
.br-best .ci{grid-row:span 3;width:78px;--pad:6px}
.br-best .tag{justify-self:start}
.br-best p{font-size:.92rem;line-height:1.4}
.br-best p a{color:var(--navy)}
.br-best .cf{padding-top:2px}

/* ---------- curriculum ---------- */
.br-sec{padding:44px 0 8px}
.br-sec .sh .more{align-self:flex-end;min-height:44px}
.br-tags{display:flex;flex-wrap:wrap;gap:6px;margin:-12px 0 22px}
.br-tags li{font-size:.8rem;font-weight:600;color:var(--navy);background:var(--mist);border-radius:999px;padding:3px 11px}
.br-band{display:inline-block;font-size:.74rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--white);background:var(--roof);border-radius:3px;padding:2px 8px;white-space:nowrap}

/* a sequence of curricula (#355): each one under the group's heading */
.br-prog{padding:8px 0 26px;border-top:1px solid var(--line)}
.br-prog:first-of-type{border-top:0;padding-top:0}
.br-ph{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin:14px 0 6px}
.br-ph h3{font:400 1.5rem/1.2 var(--serif);color:var(--navy)}
.br-go{margin-left:auto;font-weight:700;display:inline-flex;align-items:center;gap:4px}
.br-go .ic,.br-more .ic,.br-all-b .ic{width:18px;height:18px}
.br-sub{color:var(--muted);max-width:70ch;margin-bottom:18px}
.br-prog .br-tags{margin:0 0 18px}

/* ordered levels (#528): a plain row per level, the same at every width; past five, "Show all N levels" */
.br-rows{border-top:1px solid var(--line)}
.br-row{display:grid;grid-template-columns:2.2rem minmax(0,1fr) minmax(0,1.5fr) minmax(10rem,auto);gap:4px 16px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.br-n{font:400 1.6rem/1 var(--serif);color:var(--muted)}
.br-nm b{display:block;font:400 1.15rem/1.2 var(--serif);color:var(--navy)}
.br-nm small,.br-cnt{display:block;font-size:.85rem;color:var(--muted)}
.br-kt{display:block;font-weight:600;color:var(--ink);line-height:1.3}
.br-cnt{font-weight:600;color:var(--roof);padding-top:2px}
.br-row .cf{padding:0;gap:14px;justify-content:flex-end}
.br-row .add{min-width:80px;justify-content:center}
.br-rest>summary{list-style:none;display:inline-flex;align-items:center;gap:4px;min-height:44px;margin-top:4px;font-weight:700;color:var(--roof);cursor:pointer}
.br-rest>summary::-webkit-details-marker{display:none}
.br-rest>summary .ic{width:18px;height:18px}
.br-rest[open]>summary .br-rest-o,.br-rest:not([open])>summary .br-rest-c{display:none}
.br-rest[open]>summary .ic{transform:rotate(180deg)}
.br-st{display:block;font-size:.8rem}

/* curriculum items: compact rows */
.br-its{display:grid;gap:10px;align-content:start}
.br-tm{position:relative;display:grid;grid-template-columns:52px minmax(0,1fr);gap:8px 10px;align-items:center;border:1px solid var(--line);border-radius:6px;padding:8px 10px 8px 8px;background:var(--white)}
.br-tm .ci{width:52px;--pad:4px}
.br-tb{display:flex;flex-direction:column;gap:2px;min-width:0}
.br-tt{font:600 .9rem/1.28 var(--sans);color:var(--ink);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.br-tm .cf{padding-top:4px;flex-wrap:wrap}
.br-tm .price{font-size:.98rem}
.br-tm .add{padding:0 10px;font-size:.85rem}
/* the title's link covers its whole item (44px+ target); Add stays on top */
.br-tt::after{content:"";position:absolute;inset:0;border-radius:6px}
.br-tb .cf-add,.br-tb .add{position:relative;z-index:1}
.br-more{display:inline-flex;align-items:center;min-height:44px;gap:4px;font-weight:700;font-size:.9rem;margin-top:-2px}

/* unordered levels: course cards, a row of them sharing rows (subgrid) so their items start level */
.br-courses{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:20px}
.br-course{display:grid;grid-row:span 3;grid-template-rows:subgrid;gap:10px;align-content:start;background:var(--mist);border-radius:8px;padding:24px 24px 26px}
.br-ch{display:grid;gap:10px;align-content:start}
.br-ch .br-band{justify-self:start}
.br-ct{font:400 1.4rem/1.15 var(--serif);color:var(--navy)}
.br-ch>p{color:var(--muted);max-width:52ch}
.br-course .br-tm{background:var(--white)}

/* items for every level / a curriculum without levels */
.br-every{margin-top:22px}
.br-et{font-size:.8rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin-bottom:10px}
.br-every-l{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr))}

/* ---------- everything the brand lists ---------- */
.br-all{padding-top:48px}
.br-all .sh h2:focus{outline:0}
.br-all .cat-b{padding-top:4px}

/* ---------- foot: the brand's story + help choosing ---------- */
.br-end{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:24px;align-items:start;padding-top:56px}
.br-end.solo{grid-template-columns:minmax(0,1fr)}
.br-about{border-top:1px solid var(--line);padding-top:28px}
.br-about h2{font-size:1.7rem;margin-bottom:12px}
.br-help{background:var(--garden-t);border-radius:8px;padding:26px 28px;display:grid;gap:10px;justify-items:start}
.br-end.solo .br-help{max-width:720px}
.br-help h2{font-size:1.45rem}
.br-help-a{display:flex;flex-wrap:wrap;align-items:center;gap:10px 22px;margin-top:4px}
.br-all-b{display:inline-flex;align-items:center;gap:4px;font-weight:700}

/* ---------- /brands/ ---------- */
.br-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px}
.br-tile{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;height:100%;padding:18px 12px 16px;border:1px solid var(--line);border-radius:8px;background:var(--white);text-align:center;color:var(--ink);text-decoration:none!important;transition:border-color .15s,background .15s}
.br-tile:hover{border-color:var(--roof);background:var(--mist)}
.br-tile img,.br-ini{width:110px;height:110px;object-fit:contain}
.br-ini{display:grid;place-items:center;border-radius:50%;background:var(--mist);font:400 1.8rem/1 var(--serif);color:var(--navy)}
.br-tile b{color:var(--navy);font-size:.98rem;line-height:1.25}

/* ---------- tablet ---------- */
@media (max-width:1100px){
.br-h,.br-h.no-logo{grid-template-columns:auto minmax(0,1fr)}
.br-h.no-logo{grid-template-columns:minmax(0,1fr)}
.br-best{grid-column:1/-1;max-width:520px}
}
@media (max-width:960px){
.br-end{grid-template-columns:minmax(0,1fr)}
.br-go{margin-left:0}
}

/* ---------- phone ---------- */
@media (max-width:560px){
.br-h{grid-template-columns:84px minmax(0,1fr);gap:12px 16px;padding-bottom:24px}
.br-h.no-logo{grid-template-columns:minmax(0,1fr)}
.br-logo{width:84px;height:84px;padding:8px;align-self:center}
.br-h h1{font-size:2.2rem}
.br-line{font-size:1rem}
.br-ht{display:contents}
.br-ht>.kick,.br-ht>h1{grid-column:2}
.br-h.no-logo .br-ht>.kick,.br-h.no-logo .br-ht>h1{grid-column:1}
.br-ht>.kick{align-self:end;margin-bottom:0}
.br-ht>h1{align-self:start}
.br-logo{grid-row:1/span 2}
.br-ht>.br-line,.br-ht>.br-facts,.br-ht>.br-admin{grid-column:1/-1;margin-top:0}
.br-sec{padding-top:32px}
.br-sec .sh .more{align-self:auto}
.br-row{grid-template-columns:1.8rem minmax(0,1fr) auto;gap:4px 12px}
.br-kit{grid-column:2/-1;grid-row:2}
.br-course{padding:20px 18px}
.br-course .br-ct{font-size:1.3rem}
.br-help{padding:22px 18px}
.br-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.br-tile img,.br-ini{width:84px;height:84px}
}
