/* @boldmethod/web-ui primitives. Values come only from the tokens; a new
   value belongs in app-ios tokens.py, not here. */
@import "./tokens.css";

.bm-root {
  margin: 0;
  background: var(--bm-surface-canvas);
  color: var(--bm-content-primary);
  font-family: var(--bm-font-sans);
  font-size: var(--bm-type-body-size);
  line-height: var(--bm-type-body-line-height);
  -webkit-font-smoothing: antialiased;
}

/* Skip link (both frames) */
.bm-shell__skip {
  position: absolute;
  left: var(--bm-space-4);
  top: calc(-1 * var(--bm-space-12));
  padding: var(--bm-space-2) var(--bm-space-4);
  background: var(--bm-surface-overlay);
  border-radius: var(--bm-radius-sm);
  z-index: 10;
}

.bm-shell__skip:focus {
  top: var(--bm-space-2);
}

/* Card: the section card of the app (surface.raised, radius.lg, elevation.1) */
.bm-card {
  background: var(--bm-surface-raised);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-elevation-1);
  padding: var(--bm-space-6);
}

.bm-card__title {
  margin: 0 0 var(--bm-space-4);
  font-size: var(--bm-type-title3-size);
  font-weight: var(--bm-type-title3-weight);
  line-height: var(--bm-type-title3-line-height);
}

/* Button */
.bm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bm-space-2);
  min-height: 44px;
  padding: 0 var(--bm-space-5);
  border: 0;
  border-radius: var(--bm-radius-md);
  font: inherit;
  font-size: var(--bm-type-headline-size);
  font-weight: var(--bm-type-headline-weight);
  cursor: pointer;
  transition: background-color var(--bm-motion-fast-duration) var(--bm-motion-fast-ease);
}

.bm-button:focus-visible {
  outline: 2px solid var(--bm-border-focus);
  outline-offset: 2px;
}

.bm-button--primary {
  background: var(--bm-accent-solid);
  color: var(--bm-content-on-accent);
}

.bm-button--primary:active {
  background: var(--bm-accent-solid-pressed);
}

.bm-button--secondary {
  background: var(--bm-surface-control);
  color: var(--bm-content-primary);
}

.bm-button--danger {
  background: var(--bm-status-danger-solid);
  color: var(--bm-content-on-accent);
}

.bm-button--ghost {
  background: transparent;
  color: var(--bm-accent-text);
  padding: 0 var(--bm-space-3);
}

.bm-button--block {
  width: 100%;
}

.bm-button--compact {
  min-height: 36px;
  padding: 0 var(--bm-space-4);
  border-radius: var(--bm-radius-sm);
  font-size: var(--bm-type-subhead-strong-size);
}

a.bm-button {
  text-decoration: none;
  box-sizing: border-box;
}

.bm-button--primary:hover {
  background: var(--bm-accent-solid-pressed);
}

.bm-button:disabled {
  background: var(--bm-surface-control);
  color: var(--bm-content-disabled);
  cursor: not-allowed;
}

/* Field: label, input, hint or error */
.bm-field {
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-1);
  margin-bottom: var(--bm-space-4);
}

.bm-field__label {
  font-size: var(--bm-type-subhead-strong-size);
  font-weight: var(--bm-type-subhead-strong-weight);
}

.bm-field__input {
  min-height: 44px;
  padding: 0 var(--bm-space-3);
  border: 1px solid var(--bm-border-default);
  border-radius: var(--bm-radius-sm);
  background: var(--bm-field-fill);
  color: var(--bm-content-primary);
  font: inherit;
}

.bm-field__input::placeholder {
  color: var(--bm-field-placeholder);
}

.bm-field__input:focus {
  outline: none;
  border-color: var(--bm-field-border-focus);
  box-shadow: 0 0 0 1px var(--bm-field-border-focus);
}

.bm-field__input[aria-invalid="true"] {
  border-color: var(--bm-field-border-error);
}

.bm-field__input:disabled {
  background: var(--bm-field-fill-disabled);
  color: var(--bm-content-disabled);
}

/* A field with something drawn at its end; the input keeps room for it */
.bm-field__control {
  position: relative;
  display: flex;
  flex-direction: column;
}

.bm-field__control .bm-field__input {
  padding-right: calc(var(--bm-space-3) * 2 + 40px);
}

.bm-field__trailing {
  position: absolute;
  top: 50%;
  right: var(--bm-space-3);
  display: flex;
  align-items: center;
  color: var(--bm-content-secondary);
  transform: translateY(-50%);
  pointer-events: none;
}

.bm-field__hint {
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
}

.bm-field__error {
  color: var(--bm-status-danger-text);
  font-size: var(--bm-type-footnote-size);
}

/* Notice: a message about the whole form or page */
.bm-notice {
  margin: 0 0 var(--bm-space-4);
  padding: var(--bm-space-3) var(--bm-space-4);
  border-radius: var(--bm-radius-md);
  font-size: var(--bm-type-subhead-size);
  line-height: var(--bm-type-subhead-line-height);
}

.bm-notice--info {
  background: var(--bm-accent-wash);
  color: var(--bm-content-primary);
}

/* The status texts on their own tints are under 4.5:1 in dark, so the text
   is content.primary and the solid edge carries the tone. */
.bm-notice--success {
  background: var(--bm-status-success-tint);
  border-left: 4px solid var(--bm-status-success-solid);
  color: var(--bm-content-primary);
}

.bm-notice--danger {
  background: var(--bm-status-danger-tint);
  border-left: 4px solid var(--bm-status-danger-solid);
  color: var(--bm-content-primary);
}

.bm-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Icons and the mark */
.bm-icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bm-icon--sm {
  width: 18px;
  height: 18px;
}

.bm-icon--lg {
  width: 26px;
  height: 26px;
}

.bm-icon--solid {
  fill: currentColor;
}

/* The nav's filled drawings: no stroke, which would close their cut-outs */
.bm-icon--fill {
  fill: currentColor;
  stroke: none;
}

.bm-logo {
  flex: none;
  width: 30px;
  height: 30px;
  fill: var(--bm-accent-brand);
}

/* Avatar, as the app's ProfileImageView / ProfileAvatarRingView: a photo or
   initials on the accent, cut to a circle, or to the instructor's rounded
   hexagon. Three nested layers, each cut to the shape, so a band can follow
   a hexagon (a box-shadow or border can't): __band is the ring's band in
   the colour behind it, __seal the Gold Seal's gold band, __face the
   photo or initials. The shadow is a filter on the uncut outer box. */
.bm-avatar {
  --avatar-shape: circle(50%);
  --avatar-band: 0px;
  --avatar-band-color: var(--bm-surface-raised);
  --avatar-seal: 0px;
  flex: none;
  display: inline-block;
  width: 36px;
  height: 36px;
  font-size: var(--bm-type-footnote-size);
  font-weight: var(--bm-type-headline-weight);
  line-height: 1;
}

.bm-avatar__band,
.bm-avatar__seal,
.bm-avatar__face {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  clip-path: var(--avatar-shape);
}

.bm-avatar__band {
  padding: var(--avatar-band);
  background: var(--avatar-band-color);
}

.bm-avatar__seal {
  padding: var(--avatar-seal);
  background: var(--bm-avatar-gold-seal-ring);
}

.bm-avatar__face {
  object-fit: cover;
}

.bm-avatar__initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bm-accent-solid);
  color: var(--bm-content-on-accent);
}

/* An instructor: the app's point-up hexagon, its corners rounded (rounding 0.2) */
.bm-avatar--hex {
  --avatar-shape: polygon(
    41.34% 5%,
    44.23% 3.61%,
    47.11% 2.78%,
    50% 2.5%,
    52.89% 2.78%,
    55.77% 3.61%,
    58.66% 5%,
    84.64% 20%,
    87.29% 21.81%,
    89.45% 23.89%,
    91.14% 26.25%,
    92.34% 28.89%,
    93.06% 31.81%,
    93.3% 35%,
    93.3% 65%,
    93.06% 68.19%,
    92.34% 71.11%,
    91.14% 73.75%,
    89.45% 76.11%,
    87.29% 78.19%,
    84.64% 80%,
    58.66% 95%,
    55.77% 96.39%,
    52.89% 97.22%,
    50% 97.5%,
    47.11% 97.22%,
    44.23% 96.39%,
    41.34% 95%,
    15.36% 80%,
    12.71% 78.19%,
    10.55% 76.11%,
    8.86% 73.75%,
    7.66% 71.11%,
    6.94% 68.19%,
    6.7% 65%,
    6.7% 35%,
    6.94% 31.81%,
    7.66% 28.89%,
    8.86% 26.25%,
    10.55% 23.89%,
    12.71% 21.81%,
    15.36% 20%
  );
}

/* Gold Seal: a band 5% of the width, at least 1.5px, inside the edge */
.bm-avatar--gold {
  --avatar-seal: max(1.5px, 5%);
}

/* The header ring: a band in the colour behind it, and the card shadow */
.bm-avatar--ring {
  --avatar-band: 2px;
  /* elevation.1 (0 2px 15px) as a filter, which follows the shape */
  filter: drop-shadow(0 2px 7px rgba(0, 0, 0, 0.08));
}

.bm-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: var(--bm-type-caption2-size);
}

.bm-avatar--lg {
  width: 88px;
  height: 88px;
  font-size: var(--bm-type-title1-size);
}

.bm-avatar--lg.bm-avatar--ring {
  --avatar-band: 4px;
}

/* The band takes the colour of what the avatar sits on */
.bm-side .bm-avatar {
  --avatar-band-color: var(--bm-nav-bar);
}

/* App frame (#1792): sidebar >= 1200px, icon rail 768-1199px, top bar and
   tab bar below 768px. All three are in the markup; width picks one. */
.bm-app {
  min-height: 100vh;
}

.bm-app__frame {
  display: flex;
  min-height: 100vh;
}

.bm-side {
  flex: none;
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 248px;
  height: 100vh;
  box-sizing: border-box;
  padding: var(--bm-space-5) var(--bm-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-1);
  overflow-y: auto;
  background: var(--bm-nav-bar);
  border-right: 1px solid var(--bm-border-subtle);
}

/* The official wordmark. The PNG pads its lettering (24px left, 22px above
   and below in 368×96), so it is sized by --wordmark-h and pulled back by
   that padding: the letters line up with the content, and the bar keeps
   its height. */
.bm-wordmark {
  --wordmark-h: 44px;
  display: block;
  width: auto;
  height: var(--wordmark-h);
  margin: calc(var(--wordmark-h) * -0.23) 0 calc(var(--wordmark-h) * -0.23)
    calc(var(--wordmark-h) * -0.25);
}

.bm-side__brand {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  padding: var(--bm-space-1) var(--bm-space-3) var(--bm-space-5);
  color: var(--bm-content-primary);
  font-size: var(--bm-type-title3-size);
  font-weight: var(--bm-type-title3-weight);
  text-decoration: none;
}

.bm-nav {
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-1);
}

.bm-nav--secondary {
  margin-top: var(--bm-space-3);
  padding-top: var(--bm-space-3);
  border-top: 1px solid var(--bm-border-subtle);
}

.bm-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--bm-space-4);
  min-height: 48px;
  padding: 0 var(--bm-space-3);
  border-radius: var(--bm-radius-md);
  color: var(--bm-content-primary);
  font-size: var(--bm-type-body-size);
  text-decoration: none;
}

.bm-nav__link .bm-icon {
  color: var(--bm-nav-item-inactive);
}

.bm-nav__link:hover {
  background: var(--bm-surface-control);
}

.bm-nav__link[aria-current="page"] {
  background: var(--bm-accent-tint);
  color: var(--bm-accent-text);
  font-weight: var(--bm-type-headline-weight);
}

.bm-nav__link[aria-current="page"] .bm-icon {
  color: var(--bm-nav-item-active);
}

.bm-nav__link:focus-visible,
.bm-tabs__tab:focus-visible,
.bm-top__icon:focus-visible,
.bm-me__chip:focus-visible,
.bm-row--link:focus-visible,
.bm-seg__option:focus-visible {
  outline: 2px solid var(--bm-border-focus);
  outline-offset: 2px;
}

.bm-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 var(--bm-space-2);
  box-sizing: border-box;
  border-radius: var(--bm-radius-full);
  background: var(--bm-accent-solid);
  color: var(--bm-content-on-accent);
  font-size: var(--bm-type-caption-size);
  font-weight: var(--bm-type-eyebrow-weight);
}

.bm-side__foot {
  margin-top: auto;
  padding-top: var(--bm-space-4);
}

/* The account chip opens a menu with <details>, so no script. */
.bm-me {
  position: relative;
}

.bm-me__chip {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  padding: var(--bm-space-2) var(--bm-space-3);
  border-radius: var(--bm-radius-md);
  cursor: pointer;
  list-style: none;
}

.bm-me__chip::-webkit-details-marker {
  display: none;
}

.bm-me__chip:hover,
.bm-me[open] .bm-me__chip {
  background: var(--bm-surface-control);
}

.bm-me__who {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bm-me__who b {
  font-size: var(--bm-type-subhead-strong-size);
  font-weight: var(--bm-type-subhead-strong-weight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-me__who span {
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
}

.bm-me__more {
  color: var(--bm-content-secondary);
}

.bm-me__menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + var(--bm-space-2));
  box-sizing: border-box;
  /* Fits the sidebar's 224px inside its padding, so it never scrolls it */
  min-width: 220px;
  padding: var(--bm-space-2);
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-05);
  background: var(--bm-surface-overlay);
  border-radius: var(--bm-radius-md);
  box-shadow: var(--bm-elevation-2);
  z-index: 20;
}

.bm-menu__item {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 var(--bm-space-3);
  border: 0;
  border-radius: var(--bm-radius-sm);
  background: transparent;
  color: var(--bm-content-primary);
  font: inherit;
  font-size: var(--bm-type-subhead-size);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.bm-menu__item:hover {
  background: var(--bm-surface-control);
}

.bm-menu__item--danger {
  color: var(--bm-status-danger-text);
}

.bm-top,
.bm-tabs {
  display: none;
}

/* The top bar: the phone header, and the whole header of the signed-out
   frame (#1879), where it shows at every width. */
.bm-top {
  position: sticky;
  top: 0;
  z-index: 5;
  align-items: center;
  gap: var(--bm-space-2);
  height: 64px;
  padding: 0 var(--bm-space-6);
  background: var(--bm-nav-bar);
  border-bottom: 1px solid var(--bm-border-subtle);
}

.bm-top__brand {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--bm-space-2);
  color: var(--bm-content-primary);
  font-size: var(--bm-type-headline-size);
  font-weight: var(--bm-type-title3-weight);
  text-decoration: none;
}

.bm-top__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--bm-radius-full);
  color: var(--bm-content-primary);
}

.bm-top__icon .bm-nav__badge {
  position: absolute;
  top: 4px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 var(--bm-space-1);
  font-size: var(--bm-type-caption2-size);
}

/* Signed out: no column or rail, the page under the top bar */
.bm-app--plain .bm-app__frame {
  flex-direction: column;
}

.bm-app--plain .bm-top {
  display: flex;
}

.bm-app__main {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: var(--bm-space-10) var(--bm-space-12) var(--bm-space-16);
}

/* A page's column inside the frame */
.bm-page {
  max-width: 70rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-8);
}

.bm-page--narrow {
  max-width: 45rem;
}

@media (max-width: 1199px) {
  .bm-side {
    width: 76px;
    padding: var(--bm-space-5) var(--bm-space-2);
    align-items: center;
  }

  .bm-side__brand {
    padding: var(--bm-space-1) 0 var(--bm-space-5);
  }

  .bm-side__wordmark {
    display: none;
  }

  .bm-side .bm-side__mark {
    display: block;
  }

  .bm-side .bm-nav__label,
  .bm-side .bm-me__who,
  .bm-side .bm-me__more,
  .bm-side .bm-nav__badge {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .bm-nav__link {
    justify-content: center;
    width: 52px;
    padding: 0;
  }

  .bm-nav--secondary {
    width: 52px;
  }

  .bm-me__chip {
    padding: var(--bm-space-2);
  }

  /* The rail scrolls (overflow-y: auto makes overflow-x auto too), so a
     menu positioned inside its 76px is clipped. It opens beside the rail
     instead, fixed to the viewport, level with the chip at the rail's foot. */
  .bm-side .bm-me__menu {
    position: fixed;
    left: calc(76px + var(--bm-space-2));
    bottom: var(--bm-space-5);
  }

  .bm-app__main {
    padding: var(--bm-space-8) var(--bm-space-8) var(--bm-space-12);
  }
}

@media (max-width: 767px) {
  .bm-app__frame {
    flex-direction: column;
  }

  .bm-side {
    display: none;
  }

  .bm-top {
    display: flex;
    height: 56px;
    padding: 0 var(--bm-space-4);
  }

  .bm-top__brand .bm-wordmark {
    --wordmark-h: 34px;
  }

  .bm-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: space-around;
    height: 75px;
    box-sizing: border-box;
    padding: var(--bm-space-2) var(--bm-space-6) var(--bm-space-4);
    background: var(--bm-nav-bar);
    border-top: 1px solid var(--bm-border-subtle);
  }

  .bm-tabs__tab {
    flex: 1;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--bm-space-1);
    color: var(--bm-nav-item-inactive);
    font-size: var(--bm-type-caption2-size);
    font-weight: var(--bm-type-caption2-weight);
    text-decoration: none;
  }

  .bm-tabs__tab[aria-current="page"] {
    color: var(--bm-nav-item-active);
  }

  /* The current tab's avatar: a band in the active colour, in its shape */
  .bm-tabs__tab[aria-current="page"] .bm-avatar {
    --avatar-band: 2px;
    --avatar-band-color: var(--bm-nav-item-active);
  }

  .bm-app__main {
    padding: var(--bm-space-5) var(--bm-space-4) calc(75px + var(--bm-space-8));
  }

  .bm-page {
    gap: var(--bm-space-6);
  }
}

/* Focused frame: checkout while buying */
.bm-focus {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.bm-focus__bar {
  display: flex;
  align-items: center;
  gap: var(--bm-space-4);
  min-height: 64px;
  padding: 0 var(--bm-space-8);
  background: var(--bm-nav-bar);
  border-bottom: 1px solid var(--bm-border-subtle);
}

.bm-focus__brand {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  color: var(--bm-content-primary);
  font-size: var(--bm-type-title3-size);
  font-weight: var(--bm-type-title3-weight);
  text-decoration: none;
}

/* Secure checkout, in the brand's blue: the lock on a solid brand disc and
   the words set like a placard, tracked capitals in the accent text */
.bm-secure {
  display: inline-flex;
  align-items: center;
  gap: var(--bm-space-2);
  height: 30px;
  padding: 0 var(--bm-space-3) 0 3px;
  border-radius: var(--bm-radius-full);
  background: var(--bm-accent-tint);
  color: var(--bm-accent-text);
  font-size: var(--bm-type-caption-size);
  font-weight: var(--bm-type-headline-weight);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bm-secure__lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: var(--bm-radius-full);
  background: var(--bm-accent-solid);
  color: var(--bm-content-on-accent);
  box-shadow: 0 1px 2px rgba(10, 90, 175, 0.35);
}

.bm-secure__lock .bm-icon {
  width: 14px;
  height: 14px;
}

.bm-focus__spacer {
  flex: 1;
}

.bm-focus__back {
  white-space: nowrap;
  color: var(--bm-accent-text);
  font-size: var(--bm-type-subhead-strong-size);
  font-weight: var(--bm-type-subhead-strong-weight);
  text-decoration: none;
}

.bm-steps {
  display: flex;
  gap: var(--bm-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-steps li {
  display: flex;
  align-items: center;
  gap: var(--bm-space-2);
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
  font-weight: var(--bm-type-subhead-strong-weight);
}

.bm-steps li + li::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--bm-border-default);
}

.bm-steps__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--bm-radius-full);
  background: var(--bm-surface-control);
  color: var(--bm-content-primary);
  font-size: var(--bm-type-caption-size);
}

.bm-steps [aria-current="step"] {
  color: var(--bm-content-primary);
}

.bm-steps [aria-current="step"] .bm-steps__n {
  background: var(--bm-accent-solid);
  color: var(--bm-content-on-accent);
}

.bm-steps__done .bm-steps__n {
  background: var(--bm-accent-tint);
  color: var(--bm-accent-text);
}

.bm-focus__progress {
  display: none;
}

.bm-focus__main {
  flex: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding: var(--bm-space-10) var(--bm-space-8) var(--bm-space-16);
}

@media (max-width: 899px) {
  .bm-focus__bar {
    min-height: 56px;
    padding: 0 var(--bm-space-4);
    gap: var(--bm-space-3);
  }

  .bm-focus__brand {
    font-size: var(--bm-type-headline-size);
  }

  .bm-focus__wide,
  .bm-focus__bar .bm-steps {
    display: none;
  }

  .bm-focus__progress {
    display: flex;
    flex-direction: column;
    gap: var(--bm-space-2);
    padding: var(--bm-space-3) var(--bm-space-4);
    background: var(--bm-nav-bar);
    border-bottom: 1px solid var(--bm-border-subtle);
  }

  .bm-focus__progress-label {
    display: flex;
    justify-content: space-between;
    font-size: var(--bm-type-subhead-size);
  }

  .bm-focus__progress-label span {
    color: var(--bm-content-secondary);
    font-size: var(--bm-type-footnote-size);
  }

  .bm-focus__main {
    padding: var(--bm-space-4) var(--bm-space-4) var(--bm-space-16);
  }
}

/* Page header */
.bm-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--bm-space-3);
  flex-wrap: wrap;
}

.bm-page-head__text {
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-1);
}

.bm-page-head__title {
  margin: 0;
  font-size: var(--bm-type-title1-size);
  font-weight: var(--bm-type-title1-weight);
  line-height: var(--bm-type-title1-line-height);
  letter-spacing: var(--bm-type-title1-tracking);
}

.bm-page-head__subtitle {
  margin: 0;
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-subhead-size);
}

.bm-page-head__actions {
  display: flex;
  gap: var(--bm-space-2);
  flex-wrap: wrap;
}

/* Section: a title3 heading over its card(s) */
.bm-section {
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-3);
}

.bm-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bm-space-3);
  flex-wrap: wrap;
}

.bm-section__title {
  margin: 0;
  font-size: var(--bm-type-title3-size);
  font-weight: var(--bm-type-title3-weight);
  line-height: var(--bm-type-title3-line-height);
}

/* Rows in one bubble, with icon tiles (app-ios section card) */
.bm-rows {
  display: flex;
  flex-direction: column;
  background: var(--bm-surface-raised);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-elevation-1);
}

/* Rounded by the end rows, not overflow: hidden, which would clip a tooltip */
.bm-rows > :first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.bm-rows > :last-child {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.bm-row {
  display: flex;
  align-items: center;
  gap: var(--bm-space-4);
  min-height: 60px;
  padding: var(--bm-space-3) var(--bm-space-4);
  box-sizing: border-box;
  color: var(--bm-content-primary);
  text-decoration: none;
}

.bm-row + .bm-row {
  border-top: 1px solid var(--bm-border-subtle);
}

.bm-row--link:hover {
  background: var(--bm-accent-wash);
}

.bm-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-05);
}

.bm-row__title {
  font-size: var(--bm-type-subhead-strong-size);
  font-weight: var(--bm-type-subhead-strong-weight);
}

.bm-row__subtitle {
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
}

.bm-row__chevron {
  color: var(--bm-content-tertiary);
}

/* A list's column header (RowsHead): quiet, no hover, the rows' spacing */
.bm-row--head {
  min-height: 0;
  padding-block: var(--bm-space-2);
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
}

.bm-row--head .bm-row__title {
  font-size: var(--bm-type-footnote-size);
  font-weight: var(--bm-type-subhead-strong-weight);
}

.bm-row__lead-space {
  flex: none;
  width: var(--bm-row-lead, 36px);
}

.bm-row__chevron-space {
  flex: none;
  width: 18px;
}

/* The pill column: fixed width, so pills line up row to row. --bm-row-aside
   sets the width; --bm-row-indent lines it up under the text on a phone. */
.bm-row__aside {
  flex: none;
  box-sizing: border-box;
  width: var(--bm-row-aside, 12rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--bm-space-1);
}

@media (max-width: 40rem) {
  .bm-row--aside {
    flex-wrap: wrap;
    row-gap: var(--bm-space-1);
  }

  .bm-row--aside .bm-row__aside {
    order: 1;
    width: 100%;
    padding-left: var(--bm-row-indent, 0);
  }

  .bm-row--aside .bm-row__aside:empty {
    display: none;
  }
}

.bm-tile {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--bm-radius-sm);
  color: var(--bm-content-on-accent);
}

.bm-tile .bm-icon {
  stroke-width: 2;
}

.bm-tile--blue {
  background: var(--bm-accent-solid);
}

.bm-tile--green {
  background: var(--bm-status-success-solid);
}

.bm-tile--orange {
  background: var(--bm-status-warning-solid);
}

.bm-tile--purple {
  background: var(--bm-reaction-clap);
}

.bm-tile--gray {
  background: var(--bm-content-secondary);
}

.bm-tile--red {
  background: var(--bm-status-danger-solid);
}

/* Key-value rows inside a card */
.bm-kv {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--bm-space-4);
  min-height: 64px;
  padding: var(--bm-space-3) var(--bm-space-6);
}

.bm-kv + .bm-kv {
  border-top: 1px solid var(--bm-border-subtle);
}

.bm-kv__key {
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-subhead-size);
}

.bm-kv__value {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--bm-space-2);
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 767px) {
  .bm-kv {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--bm-space-1) var(--bm-space-3);
    padding: var(--bm-space-3) var(--bm-space-4);
  }

  .bm-kv__key {
    grid-column: 1 / -1;
    font-size: var(--bm-type-footnote-size);
  }
}

/* Chips */
.bm-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--bm-space-1);
  min-height: 24px;
  padding: 0 var(--bm-space-2);
  border-radius: var(--bm-radius-full);
  font-size: var(--bm-type-caption-size);
  font-weight: var(--bm-type-caption2-weight);
  white-space: nowrap;
  color: var(--bm-content-primary);
}

.bm-chip .bm-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.bm-chip--info {
  background: var(--bm-accent-tint);
}

.bm-chip--ok {
  background: var(--bm-status-success-tint);
}

.bm-chip--ok .bm-icon {
  color: var(--bm-status-success-solid);
}

.bm-chip--muted {
  background: var(--bm-surface-control);
}

.bm-chip--warn {
  background: var(--bm-status-warning-tint);
}

.bm-chip--danger {
  background: var(--bm-status-danger-tint);
}

/* Segmented control of links */
.bm-seg {
  display: inline-flex;
  gap: var(--bm-space-1);
  padding: var(--bm-space-1);
  border-radius: var(--bm-radius-full);
  background: var(--bm-surface-control);
}

.bm-seg__option {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--bm-space-4);
  border-radius: var(--bm-radius-full);
  color: var(--bm-content-primary);
  font-size: var(--bm-type-subhead-size);
  font-weight: var(--bm-type-subhead-strong-weight);
  text-decoration: none;
}

.bm-seg__option[aria-current="page"] {
  background: var(--bm-surface-raised);
  box-shadow: var(--bm-elevation-1);
}

/* Progress */
.bm-progress {
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: var(--bm-radius-full);
  background: var(--bm-surface-control);
  overflow: hidden;
}

.bm-progress::-webkit-progress-bar {
  background: var(--bm-surface-control);
  border-radius: var(--bm-radius-full);
}

.bm-progress::-webkit-progress-value {
  background: var(--bm-accent-brand);
  border-radius: var(--bm-radius-full);
}

.bm-progress::-moz-progress-bar {
  background: var(--bm-accent-brand);
  border-radius: var(--bm-radius-full);
}

/* Course art and the course card (app-ios CourseCollectionViewCell) */
.bm-art {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bm-surface-sunken);
  overflow: hidden;
}

.bm-art--empty {
  background: var(--bm-accent-tint);
}

.bm-art__glyph.bm-icon {
  position: absolute;
  right: -8%;
  top: -12%;
  width: 55%;
  height: auto;
  aspect-ratio: 1;
  stroke-width: 0.6;
  color: var(--bm-accent-text);
  opacity: 0.25;
}

.bm-course-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: var(--bm-space-4);
}

.bm-course {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bm-surface-raised);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-elevation-1);
  overflow: hidden;
}

.bm-course--muted .bm-art {
  filter: grayscale(1);
  opacity: 0.6;
}

.bm-course__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-2);
  padding: var(--bm-space-3) var(--bm-space-4) var(--bm-space-4);
}

.bm-course__title {
  margin: 0;
  font-size: var(--bm-type-headline-size);
  font-weight: var(--bm-type-headline-weight);
  line-height: var(--bm-type-headline-line-height);
}

.bm-course__desc {
  margin: 0;
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-subhead-size);
  line-height: var(--bm-type-subhead-line-height);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bm-course__meta {
  margin: 0;
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
}

.bm-course__foot {
  margin-top: auto;
  padding-top: var(--bm-space-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--bm-space-3);
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .bm-course-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Sections: a sub-navigation beside the pane; a back link instead below 1024px */
.bm-sections__grid {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: var(--bm-space-6);
  align-items: start;
}

.bm-sections__pane {
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-6);
  min-width: 0;
}

.bm-sections__back {
  display: none;
  align-items: center;
  gap: var(--bm-space-1);
  align-self: flex-start;
  min-height: 44px;
  color: var(--bm-accent-text);
  font-weight: var(--bm-type-subhead-strong-weight);
  text-decoration: none;
}

.bm-subnav {
  position: sticky;
  top: var(--bm-space-6);
  display: flex;
  flex-direction: column;
  gap: var(--bm-space-05);
  padding: var(--bm-space-2);
  background: var(--bm-surface-raised);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-elevation-1);
}

.bm-subnav form {
  margin: 0;
}

.bm-subnav__link {
  display: flex;
  align-items: center;
  gap: var(--bm-space-3);
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0 var(--bm-space-3);
  border: 0;
  border-radius: var(--bm-radius-sm);
  background: transparent;
  color: var(--bm-content-primary);
  font: inherit;
  font-size: var(--bm-type-subhead-size);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.bm-subnav__link .bm-icon {
  color: var(--bm-content-secondary);
}

.bm-subnav__link:hover {
  background: var(--bm-surface-control);
}

.bm-subnav__link:focus-visible {
  outline: 2px solid var(--bm-border-focus);
  outline-offset: 2px;
}

.bm-subnav__link[aria-current="page"] {
  background: var(--bm-accent-tint);
  color: var(--bm-accent-text);
  font-weight: var(--bm-type-subhead-strong-weight);
}

.bm-subnav__link[aria-current="page"] .bm-icon {
  color: var(--bm-accent-text);
}

.bm-subnav__link--danger,
.bm-subnav__link--danger .bm-icon {
  color: var(--bm-status-danger-text);
}

.bm-subnav .bm-subnav__trailing {
  margin-left: auto;
  color: var(--bm-content-tertiary);
}

.bm-subnav__sep {
  width: calc(100% - var(--bm-space-6));
  margin: var(--bm-space-1) auto;
  border: 0;
  border-top: 1px solid var(--bm-border-subtle);
}

@media (max-width: 1023px) {
  .bm-sections__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bm-subnav {
    display: none;
  }

  .bm-sections__back {
    display: inline-flex;
  }
}

/* Empty state: the picture, a title, a line, the way out (an empty cart) */
.bm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bm-space-3);
  padding: var(--bm-space-8) var(--bm-space-6);
  background: var(--bm-surface-raised);
  border-radius: var(--bm-radius-lg);
  box-shadow: var(--bm-elevation-1);
  text-align: center;
}

/* Spans the section, the section's padding the whitespace round it; on a
   wide page (My courses) it stops at 34rem so it stays a picture, not a banner */
.bm-empty-art {
  display: block;
  width: 100%;
  max-width: 34rem;
  height: auto;
  margin-bottom: var(--bm-space-3);
}

.bm-empty-art__field {
  fill: var(--bm-accent-tint);
}

.bm-empty-art__plane {
  fill: var(--bm-accent-solid);
}

.bm-empty-art__slot {
  fill: none;
  stroke: var(--bm-accent-solid);
  stroke-width: 1.3;
  stroke-opacity: 0.9;
}

.bm-empty__title {
  margin: 0;
  color: var(--bm-content-primary);
  font-size: var(--bm-type-title2-size);
  font-weight: var(--bm-type-title2-weight);
}

.bm-empty__body {
  max-width: 34ch;
  color: var(--bm-content-secondary);
}

.bm-empty__body p {
  margin: 0;
}

.bm-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--bm-space-3);
  margin-top: var(--bm-space-3);
}

/* The sidebar shows the wordmark; the rail (below) swaps in the mark */
.bm-side__mark {
  display: none;
}

/* A phone's focused header: brand, Secure and the way back on one line, so
   the wordmark is smaller and Secure is its lock (the word stays for
   screen readers) */
@media (max-width: 30rem) {
  .bm-focus__brand .bm-wordmark {
    --wordmark-h: 30px;
  }

  .bm-secure {
    padding: 3px;
  }

  .bm-secure__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Empty inside a card or list that is already there */
.bm-empty--compact {
  gap: var(--bm-space-2);
  padding: var(--bm-space-4) 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.bm-empty--compact .bm-empty-art {
  max-width: 16rem;
  margin-bottom: var(--bm-space-2);
}

.bm-empty--compact .bm-empty__title {
  font-size: var(--bm-type-headline-size);
  font-weight: var(--bm-type-headline-weight);
}

.bm-empty--compact .bm-empty__actions {
  margin-top: var(--bm-space-2);
}

/* Pager (Gmail's): the range, then previous/next as round icon buttons */
.bm-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--bm-space-1);
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
  font-variant-numeric: tabular-nums;
}

.bm-pager__range {
  margin-right: var(--bm-space-2);
  white-space: nowrap;
}

.bm-pager__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--bm-content-primary);
  transition: background-color var(--bm-motion-fast-duration) var(--bm-motion-fast-ease);
}

a.bm-pager__step:hover {
  background: var(--bm-surface-control);
}

a.bm-pager__step:focus-visible {
  outline: 2px solid var(--bm-border-focus);
  outline-offset: 2px;
}

.bm-pager__step[aria-disabled="true"] {
  color: var(--bm-content-tertiary);
  opacity: 0.5;
}

/* Symbol grid (staff lists): fixed slots, tinted squares, a tooltip on hover */
.bm-symbols {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 24px;
  gap: 3px;
  vertical-align: middle;
}

.bm-symbol {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.bm-symbol .bm-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2;
}

.bm-symbol--none::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--bm-border-default);
}

.bm-symbol--success {
  background: var(--bm-status-success-tint);
  color: var(--bm-status-success-text);
}

.bm-symbol--danger {
  background: var(--bm-status-danger-tint);
  color: var(--bm-status-danger-text);
}

.bm-symbol--warning {
  background: var(--bm-status-warning-tint);
  color: var(--bm-status-warning-text);
}

.bm-symbol--info {
  background: var(--bm-accent-tint);
  color: var(--bm-accent-text);
}

.bm-symbol--pro {
  background: color-mix(in srgb, var(--bm-reaction-clap) 16%, transparent);
  color: var(--bm-reaction-clap);
}

.bm-symbol--neutral {
  background: var(--bm-surface-control);
  color: var(--bm-content-secondary);
}

/* The tooltip: the meaning, above the symbol, on hover */
.bm-symbol[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 10;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--bm-content-primary);
  color: var(--bm-surface-raised);
  font-size: var(--bm-type-caption-size);
  font-weight: normal;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 2px);
  transition:
    opacity var(--bm-motion-fast-duration) var(--bm-motion-fast-ease),
    transform var(--bm-motion-fast-duration) var(--bm-motion-fast-ease);
}

.bm-symbol[data-tip]:hover::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bm-symbol--head {
  color: var(--bm-content-secondary);
}

.bm-symbol-legend {
  color: var(--bm-content-secondary);
  font-size: var(--bm-type-footnote-size);
}

.bm-symbol-legend summary {
  cursor: pointer;
  width: max-content;
}

.bm-symbol-legend ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--bm-space-2) var(--bm-space-4);
  margin: var(--bm-space-2) 0 0;
  padding: 0;
  list-style: none;
}

.bm-symbol-legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--bm-space-2);
}
