/* mamalist browse site — layout only; components come from brand.css
   (README-mamalist.md). Scope .mls. Built for one hand on a phone: the
   first product sits right under the heading, cards stay ~120px tall. */
.mls .mc-shell { padding-top: 8px; }
.mls__text { font-size: .92rem; margin: 0; max-width: 60ch; }
.mls__hint { font-size: .8rem; margin: 0; color: var(--mc-ink-soft); }
.mls__plain { color: inherit; text-decoration: none; }
.mls__list { display: grid; gap: 10px; }
.mls__row { text-decoration: none; color: inherit; }
.mls__row-title { display: block; font-family: var(--mc-font-heading); font-weight: 500; font-size: 1.05rem; }

/* header: wordmark centred in a 60px bar. "My list" is a compact pill
   pinned to the top-right corner of the viewport (so a saved heart always
   has somewhere to fly to), 44px tall and centred on the wordmark's line,
   with a small heart badge carrying the saved count after the label. The
   hover fill only exists where hover exists: a tap must not leave a tint. */
.mls__topbar { position: relative; }
/* .mc-topbar a sets min-height 60 / padding 20: the pill overrides both */
.mc-topbar .mls__mylink {
  position: fixed; right: 12px; top: 8px; z-index: 30;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; min-height: 44px; padding: 0 16px;
  font-family: var(--mc-font-body); font-size: var(--mc-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--mc-track-label);
  color: var(--mc-ink); text-decoration: none; white-space: nowrap;
  background: var(--mc-bg); border-radius: var(--mc-r-pill); transition: background-color var(--mc-ease);
}
@media (hover: hover) { .mls__mylink:hover { background: rgba(253, 200, 149, .3); } }
.mls__mylink:focus-visible { outline: 2px solid var(--mc-peach); outline-offset: 2px; }
.mls__mylink-heart { position: relative; display: inline-flex; width: 22px; height: 22px; }
.mls__mylink-heart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) { .mls__mylink-heart svg { transition: transform .2s ease; } }
.mls__mylink.has-saves .mls__mylink-heart svg { fill: var(--mc-pink); stroke: var(--mc-pink); }
.mls__mylink-count {
  position: absolute; left: 0; right: 0; top: 46%; transform: translateY(-50%);
  text-align: center; color: #0b0b0b; /* fixed */ /* on the pink heart in both schemes */
  font-size: 10px; font-weight: 500; letter-spacing: 0; line-height: 1;
}
.mls__mylink-count[hidden] { display: none; }
.mls__mylink.is-bump .mls__mylink-heart svg { transform: scale(1.3); }
/* the flying heart: a fixed clone of the tapped heart, animated by JS */
.mls__fly { position: fixed; z-index: 40; pointer-events: none; width: 22px; height: 22px; }
.mls__fly svg { width: 100%; height: 100%; fill: var(--mc-pink); stroke: var(--mc-ink); stroke-width: 1.5; stroke-linejoin: round; }

/* subcategory head: h1, the prompt in plain body type, then the tally:
   a peach dot per rating + "5 products rated". Space is reserved so the
   first tap never shifts the page. */
.mls__head { display: grid; gap: 4px; }
.mls__head .mc-page-head { margin: 0; }
.mls__prompt { font-size: var(--mc-body); line-height: var(--mc-lh-body); margin: 0; }
.mls__tally { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-top: 4px; }
.mls__tally-dots { display: inline-flex; gap: 4px; }
.mls__tally-dots i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--mc-peach);
  border: 1px solid var(--mc-border); box-sizing: border-box;
}
.mls__tally .mc-meta { opacity: .75; }
@media (prefers-reduced-motion: no-preference) {
  .mls__tally-dots i { animation: mls-pop .35s ease both; }
  @keyframes mls-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
}

/* the product card: the one bordered layer. Title, split, vote, brands. */
.mls__card {
  display: grid; gap: 8px;
  padding: 12px 14px 12px;
  border: 1px solid var(--mc-border); border-radius: var(--mc-r-dense);
  scroll-margin-top: 12px;
}
.mls__card:target { outline: 2px solid var(--mc-peach); outline-offset: 2px; }
.mls__title { font-family: var(--mc-font-heading); font-weight: 500; font-size: 1.05rem; line-height: 1.25; letter-spacing: var(--mc-track-heading); margin: 0; }
.mls__meta { display: block; margin: 0; }
.mls__meta:empty { display: none; }
.mls__note { font-size: .85rem; line-height: 1.4; margin: 0; max-width: 60ch; opacity: .8; }
.mls__card > .mc-voterow { margin-top: 2px; }

/* brands: a plain fold, then indented rows split by hairlines */
.mls__brands { margin: 2px 0 0; }
.mls__brands-sum {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  min-height: 36px; margin: 0 -4px; padding: 0 4px;
  font-family: var(--mc-font-body); font-size: var(--mc-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--mc-track-label); opacity: .75;
  border-radius: var(--mc-r-pill);
}
.mls__brands-sum::-webkit-details-marker { display: none; }
.mls__brands-sum::after { content: "\2304"; font-size: 1.1rem; line-height: 1; margin-left: auto; }
.mls__brands[open] > .mls__brands-sum::after { content: "\2303"; }
.mls__brands-sum:hover { opacity: 1; }
.mls__brands-sum:focus-visible { outline: 2px solid var(--mc-peach); outline-offset: 2px; }
.mls__count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border: 1px solid var(--mc-border); border-radius: var(--mc-r-pill);
  font-size: var(--mc-small); font-weight: 500; letter-spacing: 0;
}
.mls__brand-list { display: grid; }
.mls__brand { display: grid; gap: 6px; padding: 10px 0 10px 12px; border-top: 1px solid var(--mc-rule); scroll-margin-top: 12px; }
.mls__brand:target { outline: 2px solid var(--mc-peach); outline-offset: 2px; border-radius: 8px; }
.mls__brand-head { display: flex; align-items: center; gap: 10px; }
.mls__brand-title { font-family: var(--mc-font-heading); font-weight: 500; font-size: .98rem; line-height: 1.25; margin: 0; }
.mls__card-text { flex: 1; min-width: 0; }
.mls__thumb { width: 32px; height: 32px; flex: none; border-radius: 8px; border: 1px solid var(--mc-border); object-fit: cover; }
.mls__brand .mc-save { margin: -4px -6px -4px 0; }

/* My Mamalist rows reuse the card with a head row */
.mls__card-head { display: flex; align-items: flex-start; gap: 10px; }
.mls__card .mls__card-head .mc-save { margin: -6px -8px 0 0; }

/* the end of a subcategory: back link (left) + Continue (right) */
.mls__end { display: grid; gap: 12px; margin-top: 8px; }
.mls__endrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mls__back {
  flex: 1 1 0; min-width: 0; min-height: 44px; margin-left: -8px;
  display: inline-flex; align-items: center; gap: 2px; padding: 0 8px;
  font-family: var(--mc-font-body); font-size: var(--mc-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: var(--mc-track-label);
  color: var(--mc-ink); text-decoration: none; border-radius: var(--mc-r-pill);
  transition: background-color var(--mc-ease);
}
.mls__back svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mls__back-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mls__back:hover { background: rgba(253, 200, 149, .3); }
.mls__next {
  flex: 0 0 68%; text-align: center; padding-left: 12px; padding-right: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.mls__next svg { width: 18px; height: 18px; flex: none; margin-right: -6px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* My Mamalist: the list first, the upgrade second */
.mls__status { display: inline-flex; align-items: center; gap: 6px; margin: -4px 0 6px; font-size: .85rem; opacity: .8; }
.mls__status svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mls__my { display: grid; gap: 14px; }
.mls__my-group { display: grid; gap: 6px; }
.mls__my-group .mc-q { margin: 0; }
.mls__my .mls__meta { text-transform: none; letter-spacing: 0; font-size: .8rem; opacity: .7; }
.mls__vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mls__upgrade { display: grid; gap: 6px; justify-items: center; margin-top: 14px; }
.mls__upgrade .mc-btn { width: 100%; }
.mls__save-hint { font-size: .8rem; margin: 0; opacity: .7; }
.mls__save-done { font-size: .85rem; margin: 12px 0 0; text-align: center; }
.mls__toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 35;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  padding: 8px 8px 8px 16px; background: var(--mc-ink); color: var(--mc-bg);
  border-radius: var(--mc-r-pill); font-size: .85rem; white-space: nowrap;
}
.mls__toast[hidden] { display: none; }
.mls__toast .mc-action { color: var(--mc-bg); border-color: var(--mc-bg); min-height: 40px; padding: 4px 12px; }
.mls__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mls__err { text-transform: none; letter-spacing: 0; opacity: 1; color: var(--mc-error); font-size: .85rem; font-weight: 500; margin: 0; }
.mls__foot {
  font-family: var(--mc-font-body);
  text-align: center; margin: 0;
  padding: 10px 20px calc(14px + env(safe-area-inset-bottom));
  font-size: .72rem; line-height: 1.5; opacity: .55;
}
