.motor-firm-mark {
  --firm-mark-size: 18px;
  align-items: center;
  background: var(--firm-mark-bg, #52656b);
  border-radius: 6px;
  box-sizing: border-box;
  color: var(--firm-mark-fg, #fff);
  display: inline-flex;
  flex: 0 0 var(--firm-mark-size);
  font-family: Arial, sans-serif;
  font-size: 8px;
  font-weight: 800;
  height: var(--firm-mark-size);
  justify-content: center;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
  width: var(--firm-mark-size);
}

.motor-firm-mark--card { --firm-mark-size: 24px; border-radius: 7px; font-size: 10px; }
.motor-firm-mark--sidebar { --firm-mark-size: 28px; border-radius: 8px; font-size: 11px; }
.motor-firm-mark--npc { border-radius: 50%; }

.motor-firm-mark__symbol {
  color: inherit;
  display: block;
  height: 68%;
  overflow: visible;
  pointer-events: none;
  width: 68%;
}

/* The bar chart nests the symbol as an <svg width="16" height="16"> inside
   its own SVG. The 68% above is for the HTML badge; inside the chart it made
   the symbol 68% of the whole chart (live bug 5.-6.10.2026). */
.motor-chart-firm__mark .motor-firm-mark__symbol {
  display: inline;
  height: 16px;
  width: 16px;
}

.motor-firm-mark-line {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
  vertical-align: middle;
}

/* The student's own firm mark leads the firm line at the top of the page
   (owner 7.10.2026), where the café's green dot is: small, and 15px so it
   stays inside the line's own 16px height and nothing below it moves. */
.motor-theme .sm5-team-status-bar__brand {
  align-items: center;
  display: flex;
  gap: 6px;
}

.motor-theme .sm5-team-status-bar__brand > .motor-firm-mark {
  --firm-mark-size: 15px;
  border-radius: 4px;
  font-size: 7px;
}

/* The text owns the row height and wraps only in its second grid column. The
   24px badge is positioned in the first column without making a one-line card
   taller. */
.motor-now-card__subhead .motor-firm-mark-line {
  column-gap: 6px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  position: relative;
  vertical-align: baseline;
}

.motor-now-card__subhead .motor-firm-mark-line > span:last-child,
.motor-now-thensell__n .motor-firm-mark-line > span:last-child {
  grid-column: 2;
  min-width: 0;
}

.motor-now-card__subhead .motor-firm-mark--card {
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.motor-now-thensell__n .motor-firm-mark-line {
  column-gap: 6px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  position: relative;
  vertical-align: baseline;
}

.motor-now-thensell__n .motor-firm-mark--card {
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

/* The 24px identity mark sits in the Live Chart standings title without
   increasing the locked row height. The title keeps its original line box. */
.sm4-firm-row__title.motor-firm-mark-line {
  display: block;
  padding-left: 30px;
  position: relative;
}

.sm4-firm-row__title.motor-firm-mark-line > .motor-firm-mark {
  left: 0;
  position: absolute;
  top: -3.5px;
}

.motor-now-chat > summary {
  padding-left: 24px;
  position: relative;
}

.motor-now-chat > summary > .motor-firm-mark {
  left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.motor-trade__chat-title,
.motor-deal-chat__title,
.projector-val-chart__leg-i {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.projector-lb-name > .motor-firm-mark-line {
  display: flex;
  max-width: 100%;
  width: 100%;
}

.projector-lb-name__text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* styles.css makes descriptive spans in the teacher row block-level. These
   specific rules preserve the fixed 18px mark and keep its initials centred. */
.teacher-motor-person__name > .motor-firm-mark-line {
  align-items: center;
  display: flex;
  gap: 6px;
  margin-top: 2px;
  min-width: 0;
}

.teacher-motor-person__name .motor-firm-mark {
  color: var(--firm-mark-fg, #fff);
  display: inline-flex;
  flex: 0 0 18px;
  font-size: 8px;
  height: 18px;
  margin-top: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  width: 18px;
}

.teacher-motor-person__name .motor-firm-mark-line > span:last-child {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Final-result styles target every descendant span. Keep the decorative 24px
   badge from inheriting the result label's block layout and typography. */
.motor-final-firm .motor-firm-mark,
.motor-final-all__row .motor-firm-mark,
.projector-motor-final__firm .motor-firm-mark {
  color: var(--firm-mark-fg, #fff);
  display: inline-flex;
  font-family: Arial, sans-serif;
  font-size: 10px;
  height: 24px;
  letter-spacing: -0.02em;
  margin-top: 0;
  text-transform: uppercase;
  width: 24px;
}

/* styles.css gives every span in this list muted small text. The logo keeps
   the colour and size supplied by the reviewed mark instead. */
.motor-theme .motor-final-all__row .motor-firm-mark {
  color: var(--firm-mark-fg, #fff);
  font-size: 10px;
}
