/* The logo mark: a flat two-colour vector (plum head, cream face) served as an image file and shown in a
   round cream badge. The badge stays on every surface: plum on charcoal (the rail, the public band, the
   dark top bar) would lose the hair and ears. The mark is wider than tall (382:292): size by height, let
   the width follow. Decorative next to the wordmark (alt=""), so the link's name is its text. */
:root {
  --brand-badge-size: 40px;
  --brand-mark-height: 30px;
}

.brand-badge {
  display: inline-grid;
  flex: 0 0 auto;
  width: var(--brand-badge-size);
  height: var(--brand-badge-size);
  border-radius: 50%;
  place-items: center;
  color: var(--brand-charcoal);
  background: var(--brand-cream);
}

.brand-badge__mark {
  display: block;
  width: auto;
  height: var(--brand-mark-height);
}

.member-nav__brand,
.public-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

/* The member bar's logo zone: a slightly lighter charcoal plate flush with the left edge, full bar height, its right edge
   slanted like a forward slash (16px over the bar's height, about 15 degrees). The plate is two layers behind the badge
   and wordmark: a 1px lighter line (the lower layer, 1.5px wider) and the fill on top of it, so the slanted edge has a
   fine highlight. Both extend past the link (the link is only the badge and wordmark) to the viewport's left edge and
   30px beyond the wordmark. If clip-path were missing the plate would simply be a rectangle. Screen only. */
@media screen {
  .member-shell .member-nav__brand::before,
  .member-shell .member-nav__brand::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--member-zone-pad-start) * -1);
    right: calc(var(--member-zone-pad-end) * -1);
    clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
    pointer-events: none;
  }

  .member-shell .member-nav__brand::before {
    z-index: -2;
    right: calc(var(--member-zone-pad-end) * -1 - 1.5px);
    color: var(--chrome-ink);
    background: var(--chrome-zone-line);
  }

  .member-shell .member-nav__brand::after {
    z-index: -1;
    background: linear-gradient(var(--chrome-zone), var(--chrome-bar-top));
  }
}

/* High-contrast mode drops backgrounds and shadows; the box keeps its 1px border, and the zone's slanted edge becomes a
   1px line (the lower layer) over a plain fill, so the grouping survives. The stripe is decoration and keeps its colours. */
@media screen and (forced-colors: active) {
  .member-shell .member-nav__brand::before {
    forced-color-adjust: none;
    background: CanvasText;
  }

  .member-shell .member-nav__brand::after {
    forced-color-adjust: none;
    background: Canvas;
  }

  .member-shell .member-header::after {
    forced-color-adjust: none;
  }
}

/* The older phone rules hide the wordmark below 42rem; the bar keeps it down to 45rem. */
@media screen {
  .member-shell .member-nav__brand {
    display: inline-flex;
    align-items: center;
  }

  .member-shell .member-nav__brand-label {
    display: inline;
  }
}

/* Below 45rem the wordmark goes (before any link does) and the zone is the badge only. The link keeps its accessible name
   (its aria-label). */
@media screen and (max-width: 44.99rem) {
  .member-shell .member-nav__brand-label {
    display: none;
  }
}
