.font-size-control {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-right: 0.6rem;
}

.font-size-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  border: none;
  border-radius: 0.2rem;
  background: transparent;
  color: var(--md-primary-bg-color);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}

.font-size-btn:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.15);
}

.font-size-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Hide on collapsed/mobile header to avoid crowding */
@media screen and (max-width: 76.1875em) {
  .font-size-control {
    display: none;
  }
}

/* Font size levels — applied to rendered content only, not chrome/nav */
body[data-md-font-size="small"] .md-typeset {
  font-size: 0.7rem;
}
body[data-md-font-size="normal"] .md-typeset {
  font-size: 0.8rem;
}
body[data-md-font-size="large"] .md-typeset {
  font-size: 0.9rem;
}
body[data-md-font-size="xlarge"] .md-typeset {
  font-size: 1rem;
}